diff --git a/assets b/assets index f380f7b321..94872acd19 120000 --- a/assets +++ b/assets @@ -1 +1 @@ -./versions/4.0.0/demo/assets \ No newline at end of file +./versions/4.1.0/demo/assets \ No newline at end of file diff --git a/bundle.js b/bundle.js index d99066aa2e..aa69f9b69c 120000 --- a/bundle.js +++ b/bundle.js @@ -1 +1 @@ -./versions/4.0.0/demo/bundle.js \ No newline at end of file +./versions/4.1.0/demo/bundle.js \ No newline at end of file diff --git a/demo_page_by_version.html b/demo_page_by_version.html index 247048eeff..5c8953acb2 100644 --- a/demo_page_by_version.html +++ b/demo_page_by_version.html @@ -9,4 +9,4 @@ a { color: #006; } a:hover { color: #076; } -

Demo page by version

\ No newline at end of file +

Demo page by version

\ No newline at end of file diff --git a/fonts b/fonts index 61b57ab802..e0083ef45b 120000 --- a/fonts +++ b/fonts @@ -1 +1 @@ -./versions/4.0.0/demo/fonts \ No newline at end of file +./versions/4.1.0/demo/fonts \ No newline at end of file diff --git a/index.html b/index.html index fc29d631fa..5e2f8b9b80 120000 --- a/index.html +++ b/index.html @@ -1 +1 @@ -./versions/4.0.0/demo/index.html \ No newline at end of file +./versions/4.1.0/demo/index.html \ No newline at end of file diff --git a/mpd-parser.wasm b/mpd-parser.wasm index a0e9048c32..1df6ff5ccd 120000 --- a/mpd-parser.wasm +++ b/mpd-parser.wasm @@ -1 +1 @@ -./versions/4.0.0/demo/mpd-parser.wasm \ No newline at end of file +./versions/4.1.0/demo/mpd-parser.wasm \ No newline at end of file diff --git a/plus.ico b/plus.ico index 5a776209f4..45dd8cfda3 120000 --- a/plus.ico +++ b/plus.ico @@ -1 +1 @@ -./versions/4.0.0/demo/plus.ico \ No newline at end of file +./versions/4.1.0/demo/plus.ico \ No newline at end of file diff --git a/styles b/styles index 587f9cb9ce..adbbf1344d 120000 --- a/styles +++ b/styles @@ -1 +1 @@ -./versions/4.0.0/demo/styles \ No newline at end of file +./versions/4.1.0/demo/styles \ No newline at end of file diff --git a/versions/4.1.0/demo/assets/canalp.svg b/versions/4.1.0/demo/assets/canalp.svg new file mode 100644 index 0000000000..63f189e329 --- /dev/null +++ b/versions/4.1.0/demo/assets/canalp.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/versions/4.1.0/demo/assets/languages.ts b/versions/4.1.0/demo/assets/languages.ts new file mode 100644 index 0000000000..be89c8639b --- /dev/null +++ b/versions/4.1.0/demo/assets/languages.ts @@ -0,0 +1,7854 @@ +// Note: totally overkill +export default { + aaa: "Ghotuo", + aab: "Alumu-Tesu", + aac: "Ari", + aad: "Amal", + aae: "Arbëreshë Albanian", + aaf: "Aranadan", + aag: "Ambrak", + aah: "Abu' Arapesh", + aai: "Arifama-Miniafia", + aak: "Ankave", + aal: "Afade", + aan: "Anambé", + aao: "Algerian Saharan Arabic", + aap: "Pará Arára", + aaq: "Eastern Abnaki", + aar: "Afar", + aas: "Aasáx", + aat: "Arvanitika Albanian", + aau: "Abau", + aaw: "Solong", + aax: "Mandobo Atas", + aaz: "Amarasi", + aba: "Abé", + abb: "Bankon", + abc: "Ambala Ayta", + abd: "Manide", + abe: "Western Abnaki", + abf: "Abai Sungai", + abg: "Abaga", + abh: "Tajiki Arabic", + abi: "Abidji", + abj: "Aka-Bea", + abk: "Abkhazian", + abl: "Lampung Nyo", + abm: "Abanyom", + abn: "Abua", + abo: "Abon", + abp: "Abellen Ayta", + abq: "Abaza", + abr: "Abron", + abs: "Ambonese Malay", + abt: "Ambulas", + abu: "Abure", + abv: "Baharna Arabic", + abw: "Pal", + abx: "Inabaknon", + aby: "Aneme Wake", + abz: "Abui", + aca: "Achagua", + acb: "Áncá", + acd: "Gikyode", + ace: "Achinese", + acf: "Saint Lucian Creole French", + ach: "Acoli", + aci: "Aka-Cari", + ack: "Aka-Kora", + acl: "Akar-Bale", + acm: "Mesopotamian Arabic", + acn: "Achang", + acp: "Eastern Acipa", + acq: "Ta'izzi-Adeni Arabic", + acr: "Achi", + acs: "Acroá", + act: "Achterhoeks", + acu: "Achuar-Shiwiar", + acv: "Achumawi", + acw: "Hijazi Arabic", + acx: "Omani Arabic", + acy: "Cypriot Arabic", + acz: "Acheron", + ada: "Adangme", + adb: "Adabe", + add: "Dzodinka", + ade: "Adele", + adf: "Dhofari Arabic", + adg: "Andegerebinha", + adh: "Adhola", + adi: "Adi", + adj: "Adioukrou", + adl: "Galo", + adn: "Adang", + ado: "Abu", + adq: "Adangbe", + adr: "Adonara", + ads: "Adamorobe Sign Language", + adt: "Adnyamathanha", + adu: "Aduge", + adw: "Amundava", + adx: "Amdo Tibetan", + ady: "Adyghe", + adz: "Adzera", + aea: "Areba", + aeb: "Tunisian Arabic", + aec: "Saidi Arabic", + aed: "Argentine Sign Language", + aee: "Northeast Pashai", + aek: "Haeke", + ael: "Ambele", + aem: "Arem", + aen: "Armenian Sign Language", + aeq: "Aer", + aer: "Eastern Arrernte", + aes: "Alsea", + aeu: "Akeu", + aew: "Ambakich", + aey: "Amele", + aez: "Aeka", + afb: "Gulf Arabic", + afd: "Andai", + afe: "Putukwam", + afg: "Afghan Sign Language", + afh: "Afrihili", + afi: "Akrukay", + afk: "Nanubae", + afn: "Defaka", + afo: "Eloyi", + afp: "Tapei", + afr: "Afrikaans", + afs: "Afro-Seminole Creole", + aft: "Afitti", + afu: "Awutu", + afz: "Obokuitai", + aga: "Aguano", + agb: "Legbo", + agc: "Agatu", + agd: "Agarabi", + age: "Angal", + agf: "Arguni", + agg: "Angor", + agh: "Ngelima", + agi: "Agariya", + agj: "Argobba", + agk: "Isarog Agta", + agl: "Fembe", + agm: "Angaataha", + agn: "Agutaynen", + ago: "Tainae", + agq: "Aghem", + agr: "Aguaruna", + ags: "Esimbi", + agt: "Central Cagayan Agta", + agu: "Aguacateco", + agv: "Remontado Dumagat", + agw: "Kahua", + agx: "Aghul", + agy: "Southern Alta", + agz: "Mt. Iriga Agta", + aha: "Ahanta", + ahb: "Axamb", + ahg: "Qimant", + ahh: "Aghu", + ahi: "Tiagbamrin Aizi", + ahk: "Akha", + ahl: "Igo", + ahm: "Mobumrin Aizi", + ahn: "Àhàn", + aho: "Ahom", + ahp: "Aproumu Aizi", + ahr: "Ahirani", + ahs: "Ashe", + aht: "Ahtena", + aia: "Arosi", + aib: "Ainu (China)", + aic: "Ainbai", + aid: "Alngith", + aie: "Amara", + aif: "Agi", + aig: "Antigua and Barbuda Creole English", + aih: "Ai-Cham", + aii: "Assyrian Neo-Aramaic", + aij: "Lishanid Noshan", + aik: "Ake", + ail: "Aimele", + aim: "Aimol", + ain: "Ainu (Japan)", + aio: "Aiton", + aip: "Burumakok", + aiq: "Aimaq", + air: "Airoran", + ais: "Nataoran Amis", + ait: "Arikem", + aiw: "Aari", + aix: "Aighon", + aiy: "Ali", + aja: "Aja (Sudan)", + ajg: "Aja (Benin)", + aji: "Ajië", + ajn: "Andajin", + ajp: "South Levantine Arabic", + ajt: "Judeo-Tunisian Arabic", + aju: "Judeo-Moroccan Arabic", + ajw: "Ajawa", + ajz: "Amri Karbi", + aka: "Akan", + akb: "Batak Angkola", + akc: "Mpur", + akd: "Ukpet-Ehom", + ake: "Akawaio", + akf: "Akpa", + akg: "Anakalangu", + akh: "Angal Heneng", + aki: "Aiome", + akj: "Aka-Jeru", + akk: "Akkadian", + akl: "Aklanon", + akm: "Aka-Bo", + ako: "Akurio", + akp: "Siwu", + akq: "Ak", + akr: "Araki", + aks: "Akaselem", + akt: "Akolet", + aku: "Akum", + akv: "Akhvakh", + akw: "Akwa", + akx: "Aka-Kede", + aky: "Aka-Kol", + akz: "Alabama", + ala: "Alago", + alc: "Qawasqar", + ald: "Alladian", + ale: "Aleut", + alf: "Alege", + alh: "Alawa", + ali: "Amaimon", + alj: "Alangan", + alk: "Alak", + all: "Allar", + alm: "Amblong", + aln: "Gheg Albanian", + alo: "Larike-Wakasihu", + alp: "Alune", + alq: "Algonquin", + alr: "Alutor", + als: "Tosk Albanian", + alt: "Southern Altai", + alu: "'Are'are", + alw: "Alaba-K’abeena", + alx: "Amol", + aly: "Alyawarr", + alz: "Alur", + ama: "Amanayé", + amb: "Ambo", + amc: "Amahuaca", + ame: "Yanesha'", + amf: "Hamer-Banna", + amg: "Amurdak", + amh: "Amharic", + ami: "Amis", + amj: "Amdang", + amk: "Ambai", + aml: "War-Jaintia", + amm: "Ama (Papua New Guinea)", + amn: "Amanab", + amo: "Amo", + amp: "Alamblak", + amq: "Amahai", + amr: "Amarakaeri", + ams: "Southern Amami-Oshima", + amt: "Amto", + amu: "Guerrero Amuzgo", + amv: "Ambelau", + amw: "Western Neo-Aramaic", + amx: "Anmatyerre", + amy: "Ami", + amz: "Atampaya", + ana: "Andaqui", + anb: "Andoa", + anc: "Ngas", + and: "Ansus", + ane: "Xârâcùù", + anf: "Animere", + ang: "Old English (ca. 450-1100)", + anh: "Nend", + ani: "Andi", + anj: "Anor", + ank: "Goemai", + anl: "Anu-Hkongso Chin", + anm: "Anal", + ann: "Obolo", + ano: "Andoque", + anp: "Angika", + anq: "Jarawa (India)", + anr: "Andh", + ans: "Anserma", + ant: "Antakarinya", + anu: "Anuak", + anv: "Denya", + anw: "Anaang", + anx: "Andra-Hus", + any: "Anyin", + anz: "Anem", + aoa: "Angolar", + aob: "Abom", + aoc: "Pemon", + aod: "Andarum", + aoe: "Angal Enen", + aof: "Bragat", + aog: "Angoram", + aoh: "Arma", + aoi: "Anindilyakwa", + aoj: "Mufian", + aok: "Arhö", + aol: "Alor", + aom: "Ömie", + aon: "Bumbita Arapesh", + aor: "Aore", + aos: "Taikat", + aot: "Atong (India)", + aou: "A'ou", + aox: "Atorada", + aoz: "Uab Meto", + apb: "Sa'a", + apc: "North Levantine Arabic", + apd: "Sudanese Arabic", + ape: "Bukiyip", + apf: "Pahanan Agta", + apg: "Ampanang", + aph: "Athpariya", + api: "Apiaká", + apj: "Jicarilla Apache", + apk: "Kiowa Apache", + apl: "Lipan Apache", + apm: "Mescalero-Chiricahua Apache", + apn: "Apinayé", + apo: "Ambul", + app: "Apma", + apq: "A-Pucikwar", + apr: "Arop-Lokep", + aps: "Arop-Sissano", + apt: "Apatani", + apu: "Apurinã", + apv: "Alapmunte", + apw: "Western Apache", + apx: "Aputai", + apy: "Apalaí", + apz: "Safeyoka", + aqc: "Archi", + aqd: "Ampari Dogon", + aqg: "Arigidi", + aqm: "Atohwaim", + aqn: "Northern Alta", + aqp: "Atakapa", + aqr: "Arhâ", + aqt: "Angaité", + aqz: "Akuntsu", + ara: "Arabic", + arb: "Standard Arabic", + arc: "Official Aramaic (700-300 BCE)", + ard: "Arabana", + are: "Western Arrarnta", + arg: "Aragonese", + arh: "Arhuaco", + ari: "Arikara", + arj: "Arapaso", + ark: "Arikapú", + arl: "Arabela", + arn: "Mapudungun", + aro: "Araona", + arp: "Arapaho", + arq: "Algerian Arabic", + arr: "Karo (Brazil)", + ars: "Najdi Arabic", + aru: "Aruá (Amazonas State)", + arv: "Arbore", + arw: "Arawak", + arx: "Aruá (Rodonia State)", + ary: "Moroccan Arabic", + arz: "Egyptian Arabic", + asa: "Asu (Tanzania)", + asb: "Assiniboine", + asc: "Casuarina Coast Asmat", + asd: "Asas", + ase: "American Sign Language", + asf: "Australian Sign Language", + asg: "Cishingini", + ash: "Abishira", + asi: "Buruwai", + asj: "Sari", + ask: "Ashkun", + asl: "Asilulu", + asm: "Assamese", + asn: "Xingú Asuriní", + aso: "Dano", + asp: "Algerian Sign Language", + asq: "Austrian Sign Language", + asr: "Asuri", + ass: "Ipulo", + ast: "Asturian", + asu: "Tocantins Asurini", + asv: "Asoa", + asw: "Australian Aborigines Sign Language", + asx: "Muratayak", + asy: "Yaosakor Asmat", + asz: "As", + ata: "Pele-Ata", + atb: "Zaiwa", + atc: "Atsahuaca", + atd: "Ata Manobo", + ate: "Atemble", + atg: "Ivbie North-Okpela-Arhe", + ati: "Attié", + atj: "Atikamekw", + atk: "Ati", + atl: "Mt. Iraya Agta", + atm: "Ata", + atn: "Ashtiani", + ato: "Atong (Cameroon)", + atp: "Pudtol Atta", + atq: "Aralle-Tabulahan", + atr: "Waimiri-Atroari", + ats: "Gros Ventre", + att: "Pamplona Atta", + atu: "Reel", + atv: "Northern Altai", + atw: "Atsugewi", + atx: "Arutani", + aty: "Aneityum", + atz: "Arta", + aua: "Asumboa", + aub: "Alugu", + auc: "Waorani", + aud: "Anuta", + aug: "Aguna", + auh: "Aushi", + aui: "Anuki", + auj: "Awjilah", + auk: "Heyo", + aul: "Aulua", + aum: "Asu (Nigeria)", + aun: "Molmo One", + auo: "Auyokawa", + aup: "Makayam", + auq: "Anus", + aur: "Aruek", + aut: "Austral", + auu: "Auye", + auw: "Awyi", + aux: "Aurá", + auy: "Awiyaana", + auz: "Uzbeki Arabic", + ava: "Avaric", + avb: "Avau", + avd: "Alviri-Vidari", + ave: "Avestan", + avi: "Avikam", + avk: "Kotava", + avl: "Eastern Egyptian Bedawi Arabic", + avm: "Angkamuthi", + avn: "Avatime", + avo: "Agavotaguerra", + avs: "Aushiri", + avt: "Au", + avu: "Avokaya", + avv: "Avá-Canoeiro", + awa: "Awadhi", + awb: "Awa (Papua New Guinea)", + awc: "Cicipu", + awe: "Awetí", + awg: "Anguthimri", + awh: "Awbono", + awi: "Aekyom", + awk: "Awabakal", + awm: "Arawum", + awn: "Awngi", + awo: "Awak", + awr: "Awera", + aws: "South Awyu", + awt: "Araweté", + awu: "Central Awyu", + awv: "Jair Awyu", + aww: "Awun", + awx: "Awara", + awy: "Edera Awyu", + axb: "Abipon", + axe: "Ayerrerenge", + axg: "Mato Grosso Arára", + axk: "Yaka (Central African Republic)", + axl: "Lower Southern Aranda", + axm: "Middle Armenian", + axx: "Xârâgurè", + aya: "Awar", + ayb: "Ayizo Gbe", + ayc: "Southern Aymara", + ayd: "Ayabadhu", + aye: "Ayere", + ayg: "Ginyanga", + ayh: "Hadrami Arabic", + ayi: "Leyigha", + ayk: "Akuku", + ayl: "Libyan Arabic", + aym: "Aymara", + ayn: "Sanaani Arabic", + ayo: "Ayoreo", + ayp: "North Mesopotamian Arabic", + ayq: "Ayi (Papua New Guinea)", + ayr: "Central Aymara", + ays: "Sorsogon Ayta", + ayt: "Magbukun Ayta", + ayu: "Ayu", + ayy: "Tayabas Ayta", + ayz: "Mai Brat", + aza: "Azha", + azb: "South Azerbaijani", + azd: "Eastern Durango Nahuatl", + aze: "Azerbaijani", + azg: "San Pedro Amuzgos Amuzgo", + azj: "North Azerbaijani", + azm: "Ipalapa Amuzgo", + azn: "Western Durango Nahuatl", + azo: "Awing", + azt: "Faire Atta", + azz: "Highland Puebla Nahuatl", + baa: "Babatana", + bab: "Bainouk-Gunyuño", + bac: "Badui", + bae: "Baré", + baf: "Nubaca", + bag: "Tuki", + bah: "Bahamas Creole English", + baj: "Barakai", + bak: "Bashkir", + bal: "Baluchi", + bam: "Bambara", + ban: "Balinese", + bao: "Waimaha", + bap: "Bantawa", + bar: "Bavarian", + bas: "Basa (Cameroon)", + bau: "Bada (Nigeria)", + bav: "Vengo", + baw: "Bambili-Bambui", + bax: "Bamun", + bay: "Batuley", + bba: "Baatonum", + bbb: "Barai", + bbc: "Batak Toba", + bbd: "Bau", + bbe: "Bangba", + bbf: "Baibai", + bbg: "Barama", + bbh: "Bugan", + bbi: "Barombi", + bbj: "Ghomálá'", + bbk: "Babanki", + bbl: "Bats", + bbm: "Babango", + bbn: "Uneapa", + bbo: "Northern Bobo Madaré", + bbp: "West Central Banda", + bbq: "Bamali", + bbr: "Girawa", + bbs: "Bakpinka", + bbt: "Mburku", + bbu: "Kulung (Nigeria)", + bbv: "Karnai", + bbw: "Baba", + bbx: "Bubia", + bby: "Befang", + bbz: "Babalia Creole Arabic", + bca: "Central Bai", + bcb: "Bainouk-Samik", + bcc: "Southern Balochi", + bcd: "North Babar", + bce: "Bamenyam", + bcf: "Bamu", + bcg: "Baga Pokur", + bch: "Bariai", + bci: "Baoulé", + bcj: "Bardi", + bck: "Bunaba", + bcl: "Central Bikol", + bcm: "Bannoni", + bcn: "Bali (Nigeria)", + bco: "Kaluli", + bcp: "Bali (Democratic Republic of Congo)", + bcq: "Bench", + bcr: "Babine", + bcs: "Kohumono", + bct: "Bendi", + bcu: "Awad Bing", + bcv: "Shoo-Minda-Nye", + bcw: "Bana", + bcy: "Bacama", + bcz: "Bainouk-Gunyaamolo", + bda: "Bayot", + bdb: "Basap", + bdc: "Emberá-Baudó", + bdd: "Bunama", + bde: "Bade", + bdf: "Biage", + bdg: "Bonggi", + bdh: "Baka (Sudan)", + bdi: "Burun", + bdj: "Bai", + bdk: "Budukh", + bdl: "Indonesian Bajau", + bdm: "Buduma", + bdn: "Baldemu", + bdo: "Morom", + bdp: "Bende", + bdq: "Bahnar", + bdr: "West Coast Bajau", + bds: "Burunge", + bdt: "Bokoto", + bdu: "Oroko", + bdv: "Bodo Parja", + bdw: "Baham", + bdx: "Budong-Budong", + bdy: "Bandjalang", + bdz: "Badeshi", + bea: "Beaver", + beb: "Bebele", + bec: "Iceve-Maci", + bed: "Bedoanas", + bee: "Byangsi", + bef: "Benabena", + beg: "Belait", + beh: "Biali", + bei: "Bekati'", + bej: "Beja", + bek: "Bebeli", + bel: "Belarusian", + bem: "Bemba (Zambia)", + ben: "Bengali", + beo: "Beami", + bep: "Besoa", + beq: "Beembe", + bes: "Besme", + bet: "Guiberoua Béte", + beu: "Blagar", + bev: "Daloa Bété", + bew: "Betawi", + bex: "Jur Modo", + bey: "Beli (Papua New Guinea)", + bez: "Bena (Tanzania)", + bfa: "Bari", + bfb: "Pauri Bareli", + bfc: "Panyi Bai", + bfd: "Bafut", + bfe: "Betaf", + bff: "Bofi", + bfg: "Busang Kayan", + bfh: "Blafe", + bfi: "British Sign Language", + bfj: "Bafanji", + bfk: "Ban Khor Sign Language", + bfl: "Banda-Ndélé", + bfm: "Mmen", + bfn: "Bunak", + bfo: "Malba Birifor", + bfp: "Beba", + bfq: "Badaga", + bfr: "Bazigar", + bfs: "Southern Bai", + bft: "Balti", + bfu: "Gahri", + bfw: "Bondo", + bfx: "Bantayanon", + bfy: "Bagheli", + bfz: "Mahasu Pahari", + bga: "Gwamhi-Wuri", + bgb: "Bobongko", + bgc: "Haryanvi", + bgd: "Rathwi Bareli", + bge: "Bauria", + bgf: "Bangandu", + bgg: "Bugun", + bgi: "Giangan", + bgj: "Bangolan", + bgk: "Bit", + bgl: "Bo (Laos)", + bgn: "Western Balochi", + bgo: "Baga Koga", + bgp: "Eastern Balochi", + bgq: "Bagri", + bgr: "Bawm Chin", + bgs: "Tagabawa", + bgt: "Bughotu", + bgu: "Mbongno", + bgv: "Warkay-Bipim", + bgw: "Bhatri", + bgx: "Balkan Gagauz Turkish", + bgy: "Benggoi", + bgz: "Banggai", + bha: "Bharia", + bhb: "Bhili", + bhc: "Biga", + bhd: "Bhadrawahi", + bhe: "Bhaya", + bhf: "Odiai", + bhg: "Binandere", + bhh: "Bukharic", + bhi: "Bhilali", + bhj: "Bahing", + bhl: "Bimin", + bhm: "Bathari", + bhn: "Bohtan Neo-Aramaic", + bho: "Bhojpuri", + bhp: "Bima", + bhq: "Tukang Besi South", + bhr: "Bara Malagasy", + bhs: "Buwal", + bht: "Bhattiyali", + bhu: "Bhunjia", + bhv: "Bahau", + bhw: "Biak", + bhx: "Bhalay", + bhy: "Bhele", + bhz: "Bada (Indonesia)", + bia: "Badimaya", + bib: "Bissa", + bic: "Bikaru", + bid: "Bidiyo", + bie: "Bepour", + bif: "Biafada", + big: "Biangai", + bij: "Vaghat-Ya-Bijim-Legeri", + bik: "Bikol", + bil: "Bile", + bim: "Bimoba", + bin: "Bini", + bio: "Nai", + bip: "Bila", + biq: "Bipi", + bir: "Bisorio", + bis: "Bislama", + bit: "Berinomo", + biu: "Biete", + biv: "Southern Birifor", + biw: "Kol (Cameroon)", + bix: "Bijori", + biy: "Birhor", + biz: "Baloi", + bja: "Budza", + bjb: "Banggarla", + bjc: "Bariji", + bje: "Biao-Jiao Mien", + bjf: "Barzani Jewish Neo-Aramaic", + bjg: "Bidyogo", + bjh: "Bahinemo", + bji: "Burji", + bjj: "Kanauji", + bjk: "Barok", + bjl: "Bulu (Papua New Guinea)", + bjm: "Bajelani", + bjn: "Banjar", + bjo: "Mid-Southern Banda", + bjp: "Fanamaket", + bjr: "Binumarien", + bjs: "Bajan", + bjt: "Balanta-Ganja", + bju: "Busuu", + bjv: "Bedjond", + bjw: "Bakwé", + bjx: "Banao Itneg", + bjy: "Bayali", + bjz: "Baruga", + bka: "Kyak", + bkc: "Baka (Cameroon)", + bkd: "Binukid", + bkf: "Beeke", + bkg: "Buraka", + bkh: "Bakoko", + bki: "Baki", + bkj: "Pande", + bkk: "Brokskat", + bkl: "Berik", + bkm: "Kom (Cameroon)", + bkn: "Bukitan", + bko: "Kwa'", + bkp: "Boko (Democratic Republic of Congo)", + bkq: "Bakairí", + bkr: "Bakumpai", + bks: "Northern Sorsoganon", + bkt: "Boloki", + bku: "Buhid", + bkv: "Bekwarra", + bkw: "Bekwel", + bkx: "Baikeno", + bky: "Bokyi", + bkz: "Bungku", + bla: "Siksika", + blb: "Bilua", + blc: "Bella Coola", + bld: "Bolango", + ble: "Balanta-Kentohe", + blf: "Buol", + blg: "Balau", + blh: "Kuwaa", + bli: "Bolia", + blj: "Bolongan", + blk: "Pa'o Karen", + bll: "Biloxi", + blm: "Beli (Sudan)", + bln: "Southern Catanduanes Bikol", + blo: "Anii", + blp: "Blablanga", + blq: "Baluan-Pam", + blr: "Blang", + bls: "Balaesang", + blt: "Tai Dam", + blv: "Kibala", + blw: "Balangao", + blx: "Mag-Indi Ayta", + bly: "Notre", + blz: "Balantak", + bma: "Lame", + bmb: "Bembe", + bmc: "Biem", + bmd: "Baga Manduri", + bme: "Limassa", + bmf: "Bom-Kim", + bmg: "Bamwe", + bmh: "Kein", + bmi: "Bagirmi", + bmj: "Bote-Majhi", + bmk: "Ghayavi", + bml: "Bomboli", + bmm: "Northern Betsimisaraka Malagasy", + bmn: "Bina (Papua New Guinea)", + bmo: "Bambalang", + bmp: "Bulgebi", + bmq: "Bomu", + bmr: "Muinane", + bms: "Bilma Kanuri", + bmt: "Biao Mon", + bmu: "Somba-Siawari", + bmv: "Bum", + bmw: "Bomwali", + bmx: "Baimak", + bmz: "Baramu", + bna: "Bonerate", + bnb: "Bookan", + bnc: "Bontok", + bnd: "Banda (Indonesia)", + bne: "Bintauna", + bnf: "Masiwang", + bng: "Benga", + bni: "Bangi", + bnj: "Eastern Tawbuid", + bnk: "Bierebo", + bnl: "Boon", + bnm: "Batanga", + bnn: "Bunun", + bno: "Bantoanon", + bnp: "Bola", + bnq: "Bantik", + bnr: "Butmas-Tur", + bns: "Bundeli", + bnu: "Bentong", + bnv: "Bonerif", + bnw: "Bisis", + bnx: "Bangubangu", + bny: "Bintulu", + bnz: "Beezen", + boa: "Bora", + bob: "Aweer", + bod: "Tibetan", + boe: "Mundabli", + bof: "Bolon", + bog: "Bamako Sign Language", + boh: "Boma", + boi: "Barbareño", + boj: "Anjam", + bok: "Bonjo", + bol: "Bole", + bom: "Berom", + bon: "Bine", + boo: "Tiemacèwè Bozo", + bop: "Bonkiman", + boq: "Bogaya", + bor: "Borôro", + bos: "Bosnian", + bot: "Bongo", + bou: "Bondei", + bov: "Tuwuli", + bow: "Rema", + box: "Buamu", + boy: "Bodo (Central African Republic)", + boz: "Tiéyaxo Bozo", + bpa: "Daakaka", + bpb: "Barbacoas", + bpd: "Banda-Banda", + bpg: "Bonggo", + bph: "Botlikh", + bpi: "Bagupi", + bpj: "Binji", + bpk: "Orowe", + bpl: "Broome Pearling Lugger Pidgin", + bpm: "Biyom", + bpn: "Dzao Min", + bpo: "Anasi", + bpp: "Kaure", + bpq: "Banda Malay", + bpr: "Koronadal Blaan", + bps: "Sarangani Blaan", + bpt: "Barrow Point", + bpu: "Bongu", + bpv: "Bian Marind", + bpw: "Bo (Papua New Guinea)", + bpx: "Palya Bareli", + bpy: "Bishnupriya", + bpz: "Bilba", + bqa: "Tchumbuli", + bqb: "Bagusa", + bqc: "Boko (Benin)", + bqd: "Bung", + bqf: "Baga Kaloum", + bqg: "Bago-Kusuntu", + bqh: "Baima", + bqi: "Bakhtiari", + bqj: "Bandial", + bqk: "Banda-Mbrès", + bql: "Bilakura", + bqm: "Wumboko", + bqn: "Bulgarian Sign Language", + bqo: "Balo", + bqp: "Busa", + bqq: "Biritai", + bqr: "Burusu", + bqs: "Bosngun", + bqt: "Bamukumbit", + bqu: "Boguru", + bqv: "Koro Wachi", + bqw: "Buru (Nigeria)", + bqx: "Baangi", + bqy: "Bengkala Sign Language", + bqz: "Bakaka", + bra: "Braj", + brb: "Lave", + brc: "Berbice Creole Dutch", + brd: "Baraamu", + bre: "Breton", + brf: "Bera", + brg: "Baure", + brh: "Brahui", + bri: "Mokpwe", + brj: "Bieria", + brk: "Birked", + brl: "Birwa", + brm: "Barambu", + brn: "Boruca", + bro: "Brokkat", + brp: "Barapasi", + brq: "Breri", + brr: "Birao", + brs: "Baras", + brt: "Bitare", + bru: "Eastern Bru", + brv: "Western Bru", + brw: "Bellari", + brx: "Bodo (India)", + bry: "Burui", + brz: "Bilbil", + bsa: "Abinomn", + bsb: "Brunei Bisaya", + bsc: "Bassari", + bse: "Wushi", + bsf: "Bauchi", + bsg: "Bashkardi", + bsh: "Kati", + bsi: "Bassossi", + bsj: "Bangwinji", + bsk: "Burushaski", + bsl: "Basa-Gumna", + bsm: "Busami", + bsn: "Barasana-Eduria", + bso: "Buso", + bsp: "Baga Sitemu", + bsq: "Bassa", + bsr: "Bassa-Kontagora", + bss: "Akoose", + bst: "Basketo", + bsu: "Bahonsuai", + bsv: "Baga Sobané", + bsw: "Baiso", + bsx: "Yangkam", + bsy: "Sabah Bisaya", + bta: "Bata", + btc: "Bati (Cameroon)", + btd: "Batak Dairi", + bte: "Gamo-Ningi", + btf: "Birgit", + btg: "Gagnoa Bété", + bth: "Biatah Bidayuh", + bti: "Burate", + btj: "Bacanese Malay", + btm: "Batak Mandailing", + btn: "Ratagnon", + bto: "Rinconada Bikol", + btp: "Budibud", + btq: "Batek", + btr: "Baetora", + bts: "Batak Simalungun", + btt: "Bete-Bendi", + btu: "Batu", + btv: "Bateri", + btw: "Butuanon", + btx: "Batak Karo", + bty: "Bobot", + btz: "Batak Alas-Kluet", + bua: "Buriat", + bub: "Bua", + buc: "Bushi", + bud: "Ntcham", + bue: "Beothuk", + buf: "Bushoong", + bug: "Buginese", + buh: "Younuo Bunu", + bui: "Bongili", + buj: "Basa-Gurmana", + buk: "Bugawac", + bul: "Bulgarian", + bum: "Bulu (Cameroon)", + bun: "Sherbro", + buo: "Terei", + bup: "Busoa", + buq: "Brem", + bus: "Bokobaru", + but: "Bungain", + buu: "Budu", + buv: "Bun", + buw: "Bubi", + bux: "Boghom", + buy: "Bullom So", + buz: "Bukwen", + bva: "Barein", + bvb: "Bube", + bvc: "Baelelea", + bvd: "Baeggu", + bve: "Berau Malay", + bvf: "Boor", + bvg: "Bonkeng", + bvh: "Bure", + bvi: "Belanda Viri", + bvj: "Baan", + bvk: "Bukat", + bvl: "Bolivian Sign Language", + bvm: "Bamunka", + bvn: "Buna", + bvo: "Bolgo", + bvp: "Bumang", + bvq: "Birri", + bvr: "Burarra", + bvt: "Bati (Indonesia)", + bvu: "Bukit Malay", + bvv: "Baniva", + bvw: "Boga", + bvx: "Dibole", + bvy: "Baybayanon", + bvz: "Bauzi", + bwa: "Bwatoo", + bwb: "Namosi-Naitasiri-Serua", + bwc: "Bwile", + bwd: "Bwaidoka", + bwe: "Bwe Karen", + bwf: "Boselewa", + bwg: "Barwe", + bwh: "Bishuo", + bwi: "Baniwa", + bwj: "Láá Láá Bwamu", + bwk: "Bauwaki", + bwl: "Bwela", + bwm: "Biwat", + bwn: "Wunai Bunu", + bwo: "Boro (Ethiopia)", + bwp: "Mandobo Bawah", + bwq: "Southern Bobo Madaré", + bwr: "Bura-Pabir", + bws: "Bomboma", + bwt: "Bafaw-Balong", + bwu: "Buli (Ghana)", + bww: "Bwa", + bwx: "Bu-Nao Bunu", + bwy: "Cwi Bwamu", + bwz: "Bwisi", + bxa: "Tairaha", + bxb: "Belanda Bor", + bxc: "Molengue", + bxd: "Pela", + bxe: "Birale", + bxf: "Bilur", + bxg: "Bangala", + bxh: "Buhutu", + bxi: "Pirlatapa", + bxj: "Bayungu", + bxk: "Bukusu", + bxl: "Jalkunan", + bxm: "Mongolia Buriat", + bxn: "Burduna", + bxo: "Barikanchi", + bxp: "Bebil", + bxq: "Beele", + bxr: "Russia Buriat", + bxs: "Busam", + bxu: "China Buriat", + bxv: "Berakou", + bxw: "Bankagooma", + bxz: "Binahari", + bya: "Batak", + byb: "Bikya", + byc: "Ubaghara", + byd: "Benyadu'", + bye: "Pouye", + byf: "Bete", + byg: "Baygo", + byh: "Bhujel", + byi: "Buyu", + byj: "Bina (Nigeria)", + byk: "Biao", + byl: "Bayono", + bym: "Bidyara", + byn: "Bilin", + byo: "Biyo", + byp: "Bumaji", + byq: "Basay", + byr: "Baruya", + bys: "Burak", + byt: "Berti", + byv: "Medumba", + byw: "Belhariya", + byx: "Qaqet", + byz: "Banaro", + bza: "Bandi", + bzb: "Andio", + bzc: "Southern Betsimisaraka Malagasy", + bzd: "Bribri", + bze: "Jenaama Bozo", + bzf: "Boikin", + bzg: "Babuza", + bzh: "Mapos Buang", + bzi: "Bisu", + bzj: "Belize Kriol English", + bzk: "Nicaragua Creole English", + bzl: "Boano (Sulawesi)", + bzm: "Bolondo", + bzn: "Boano (Maluku)", + bzo: "Bozaba", + bzp: "Kemberano", + bzq: "Buli (Indonesia)", + bzr: "Biri", + bzs: "Brazilian Sign Language", + bzt: "Brithenig", + bzu: "Burmeso", + bzv: "Naami", + bzw: "Basa (Nigeria)", + bzx: "Kɛlɛngaxo Bozo", + bzy: "Obanliku", + bzz: "Evant", + caa: "Chortí", + cab: "Garifuna", + cac: "Chuj", + cad: "Caddo", + cae: "Lehar", + caf: "Southern Carrier", + cag: "Nivaclé", + cah: "Cahuarano", + caj: "Chané", + cak: "Kaqchikel", + cal: "Carolinian", + cam: "Cemuhî", + can: "Chambri", + cao: "Chácobo", + cap: "Chipaya", + caq: "Car Nicobarese", + car: "Galibi Carib", + cas: "Tsimané", + cat: "Catalan", + cav: "Cavineña", + caw: "Callawalla", + cax: "Chiquitano", + cay: "Cayuga", + caz: "Canichana", + cbb: "Cabiyarí", + cbc: "Carapana", + cbd: "Carijona", + cbg: "Chimila", + cbi: "Chachi", + cbj: "Ede Cabe", + cbk: "Chavacano", + cbl: "Bualkhaw Chin", + cbn: "Nyahkur", + cbo: "Izora", + cbq: "Tsucuba", + cbr: "Cashibo-Cacataibo", + cbs: "Cashinahua", + cbt: "Chayahuita", + cbu: "Candoshi-Shapra", + cbv: "Cacua", + cbw: "Kinabalian", + cby: "Carabayo", + cca: "Cauca", + ccc: "Chamicuro", + ccd: "Cafundo Creole", + cce: "Chopi", + ccg: "Samba Daka", + cch: "Atsam", + ccj: "Kasanga", + ccl: "Cutchi-Swahili", + ccm: "Malaccan Creole Malay", + cco: "Comaltepec Chinantec", + ccp: "Chakma", + ccr: "Cacaopera", + cda: "Choni", + cde: "Chenchu", + cdf: "Chiru", + cdg: "Chamari", + cdh: "Chambeali", + cdi: "Chodri", + cdj: "Churahi", + cdm: "Chepang", + cdn: "Chaudangsi", + cdo: "Min Dong Chinese", + cdr: "Cinda-Regi-Tiyal", + cds: "Chadian Sign Language", + cdy: "Chadong", + cdz: "Koda", + cea: "Lower Chehalis", + ceb: "Cebuano", + ceg: "Chamacoco", + cek: "Eastern Khumi Chin", + cen: "Cen", + ces: "Czech", + cet: "Centúúm", + cfa: "Dijim-Bwilim", + cfd: "Cara", + cfg: "Como Karim", + cfm: "Falam Chin", + cga: "Changriwa", + cgc: "Kagayanen", + cgg: "Chiga", + cgk: "Chocangacakha", + cha: "Chamorro", + chb: "Chibcha", + chc: "Catawba", + chd: "Highland Oaxaca Chontal", + che: "Chechen", + chf: "Tabasco Chontal", + chg: "Chagatai", + chh: "Chinook", + chj: "Ojitlán Chinantec", + chk: "Chuukese", + chl: "Cahuilla", + chm: "Mari (Russia)", + chn: "Chinook jargon", + cho: "Choctaw", + chp: "Chipewyan", + chq: "Quiotepec Chinantec", + chr: "Cherokee", + cht: "Cholón", + chu: "Church Slavic", + chv: "Chuvash", + chw: "Chuwabu", + chx: "Chantyal", + chy: "Cheyenne", + chz: "Ozumacín Chinantec", + cia: "Cia-Cia", + cib: "Ci Gbe", + cic: "Chickasaw", + cid: "Chimariko", + cie: "Cineni", + cih: "Chinali", + cik: "Chitkuli Kinnauri", + cim: "Cimbrian", + cin: "Cinta Larga", + cip: "Chiapanec", + cir: "Tiri", + ciw: "Chippewa", + ciy: "Chaima", + cja: "Western Cham", + cje: "Chru", + cjh: "Upper Chehalis", + cji: "Chamalal", + cjk: "Chokwe", + cjm: "Eastern Cham", + cjn: "Chenapian", + cjo: "Ashéninka Pajonal", + cjp: "Cabécar", + cjs: "Shor", + cjv: "Chuave", + cjy: "Jinyu Chinese", + ckb: "Central Kurdish", + ckh: "Chak", + ckl: "Cibak", + ckn: "Kaang Chin", + cko: "Anufo", + ckq: "Kajakse", + ckr: "Kairak", + cks: "Tayo", + ckt: "Chukot", + cku: "Koasati", + ckv: "Kavalan", + ckx: "Caka", + cky: "Cakfem-Mushere", + ckz: "Cakchiquel-Quiché Mixed Language", + cla: "Ron", + clc: "Chilcotin", + cld: "Chaldean Neo-Aramaic", + cle: "Lealao Chinantec", + clh: "Chilisso", + cli: "Chakali", + clj: "Laitu Chin", + clk: "Idu-Mishmi", + cll: "Chala", + clm: "Clallam", + clo: "Lowland Oaxaca Chontal", + clt: "Lautu Chin", + clu: "Caluyanun", + clw: "Chulym", + cly: "Eastern Highland Chatino", + cma: "Maa", + cme: "Cerma", + cmg: "Classical Mongolian", + cmi: "Emberá-Chamí", + cml: "Campalagian", + cmm: "Michigamea", + cmn: "Mandarin Chinese", + cmo: "Central Mnong", + cmr: "Mro-Khimi Chin", + cms: "Messapic", + cmt: "Camtho", + cna: "Changthang", + cnb: "Chinbon Chin", + cnc: "Côông", + cng: "Northern Qiang", + cnh: "Hakha Chin", + cni: "Asháninka", + cnk: "Khumi Chin", + cnl: "Lalana Chinantec", + cno: "Con", + cns: "Central Asmat", + cnt: "Tepetotutla Chinantec", + cnu: "Chenoua", + cnw: "Ngawn Chin", + cnx: "Middle Cornish", + coa: "Cocos Islands Malay", + cob: "Chicomuceltec", + coc: "Cocopa", + cod: "Cocama-Cocamilla", + coe: "Koreguaje", + cof: "Colorado", + cog: "Chong", + coh: "Chonyi-Dzihana-Kauma", + coj: "Cochimi", + cok: "Santa Teresa Cora", + col: "Columbia-Wenatchi", + com: "Comanche", + con: "Cofán", + coo: "Comox", + cop: "Coptic", + coq: "Coquille", + cor: "Cornish", + cos: "Corsican", + cot: "Caquinte", + cou: "Wamey", + cov: "Cao Miao", + cow: "Cowlitz", + cox: "Nanti", + coz: "Chochotec", + cpa: "Palantla Chinantec", + cpb: "Ucayali-Yurúa Ashéninka", + cpc: "Ajyíninka Apurucayali", + cpg: "Cappadocian Greek", + cpi: "Chinese Pidgin English", + cpn: "Cherepon", + cpo: "Kpeego", + cps: "Capiznon", + cpu: "Pichis Ashéninka", + cpx: "Pu-Xian Chinese", + cpy: "South Ucayali Ashéninka", + cqd: "Chuanqiandian Cluster Miao", + cra: "Chara", + crb: "Island Carib", + crc: "Lonwolwol", + crd: "Coeur d'Alene", + cre: "Cree", + crf: "Caramanta", + crg: "Michif", + crh: "Crimean Tatar", + cri: "Sãotomense", + crj: "Southern East Cree", + crk: "Plains Cree", + crl: "Northern East Cree", + crm: "Moose Cree", + crn: "El Nayar Cora", + cro: "Crow", + crq: "Iyo'wujwa Chorote", + crr: "Carolina Algonquian", + crs: "Seselwa Creole French", + crt: "Iyojwa'ja Chorote", + crv: "Chaura", + crw: "Chrau", + crx: "Carrier", + cry: "Cori", + crz: "Cruzeño", + csa: "Chiltepec Chinantec", + csb: "Kashubian", + csc: "Catalan Sign Language", + csd: "Chiangmai Sign Language", + cse: "Czech Sign Language", + csf: "Cuba Sign Language", + csg: "Chilean Sign Language", + csh: "Asho Chin", + csi: "Coast Miwok", + csj: "Songlai Chin", + csk: "Jola-Kasa", + csl: "Chinese Sign Language", + csm: "Central Sierra Miwok", + csn: "Colombian Sign Language", + cso: "Sochiapam Chinantec", + csq: "Croatia Sign Language", + csr: "Costa Rican Sign Language", + css: "Southern Ohlone", + cst: "Northern Ohlone", + csv: "Sumtu Chin", + csw: "Swampy Cree", + csy: "Siyin Chin", + csz: "Coos", + cta: "Tataltepec Chatino", + ctc: "Chetco", + ctd: "Tedim Chin", + cte: "Tepinapa Chinantec", + ctg: "Chittagonian", + cth: "Thaiphum Chin", + ctl: "Tlacoatzintepec Chinantec", + ctm: "Chitimacha", + ctn: "Chhintange", + cto: "Emberá-Catío", + ctp: "Western Highland Chatino", + cts: "Northern Catanduanes Bikol", + ctt: "Wayanad Chetti", + ctu: "Chol", + ctz: "Zacatepec Chatino", + cua: "Cua", + cub: "Cubeo", + cuc: "Usila Chinantec", + cug: "Chungmboko", + cuh: "Chuka", + cui: "Cuiba", + cuj: "Mashco Piro", + cuk: "San Blas Kuna", + cul: "Culina", + cuo: "Cumanagoto", + cup: "Cupeño", + cuq: "Cun", + cur: "Chhulung", + cut: "Teutila Cuicatec", + cuu: "Tai Ya", + cuv: "Cuvok", + cuw: "Chukwa", + cux: "Tepeuxila Cuicatec", + cvg: "Chug", + cvn: "Valle Nacional Chinantec", + cwa: "Kabwa", + cwb: "Maindo", + cwd: "Woods Cree", + cwe: "Kwere", + cwg: "Chewong", + cwt: "Kuwaataay", + cya: "Nopala Chatino", + cyb: "Cayubaba", + cym: "Welsh", + cyo: "Cuyonon", + czh: "Huizhou Chinese", + czk: "Knaanic", + czn: "Zenzontepec Chatino", + czo: "Min Zhong Chinese", + czt: "Zotung Chin", + daa: "Dangaléat", + dac: "Dambi", + dad: "Marik", + dae: "Duupa", + dag: "Dagbani", + dah: "Gwahatike", + dai: "Day", + daj: "Dar Fur Daju", + dak: "Dakota", + dal: "Dahalo", + dam: "Damakawa", + dan: "Danish", + dao: "Daai Chin", + daq: "Dandami Maria", + dar: "Dargwa", + das: "Daho-Doo", + dau: "Dar Sila Daju", + dav: "Taita", + daw: "Davawenyo", + dax: "Dayi", + daz: "Dao", + dba: "Bangime", + dbb: "Deno", + dbd: "Dadiya", + dbe: "Dabe", + dbf: "Edopi", + dbg: "Dogul Dom Dogon", + dbi: "Doka", + dbj: "Ida'an", + dbl: "Dyirbal", + dbm: "Duguri", + dbn: "Duriankere", + dbo: "Dulbu", + dbp: "Duwai", + dbq: "Daba", + dbr: "Dabarre", + dbt: "Ben Tey Dogon", + dbu: "Bondum Dom Dogon", + dbv: "Dungu", + dbw: "Bankan Tey Dogon", + dby: "Dibiyaso", + dcc: "Deccan", + dcr: "Negerhollands", + dda: "Dadi Dadi", + ddd: "Dongotono", + dde: "Doondo", + ddg: "Fataluku", + ddi: "West Goodenough", + ddj: "Jaru", + ddn: "Dendi (Benin)", + ddo: "Dido", + ddr: "Dhudhuroa", + dds: "Donno So Dogon", + ddw: "Dawera-Daweloor", + dec: "Dagik", + ded: "Dedua", + dee: "Dewoin", + def: "Dezfuli", + deg: "Degema", + deh: "Dehwari", + dei: "Demisa", + dek: "Dek", + del: "Delaware", + dem: "Dem", + den: "Slave (Athapascan)", + dep: "Pidgin Delaware", + deq: "Dendi (Central African Republic)", + der: "Deori", + des: "Desano", + deu: "German", + dev: "Domung", + dez: "Dengese", + dga: "Southern Dagaare", + dgb: "Bunoge Dogon", + dgc: "Casiguran Dumagat Agta", + dgd: "Dagaari Dioula", + dge: "Degenan", + dgg: "Doga", + dgh: "Dghwede", + dgi: "Northern Dagara", + dgk: "Dagba", + dgl: "Andaandi", + dgn: "Dagoman", + dgo: "Dogri (individual language)", + dgr: "Dogrib", + dgs: "Dogoso", + dgt: "Ndra'ngith", + dgu: "Degaru", + dgw: "Daungwurrung", + dgx: "Doghoro", + dgz: "Daga", + dhd: "Dhundari", + dhg: "Dhangu-Djangu", + dhi: "Dhimal", + dhl: "Dhalandji", + dhm: "Zemba", + dhn: "Dhanki", + dho: "Dhodia", + dhr: "Dhargari", + dhs: "Dhaiso", + dhu: "Dhurga", + dhv: "Dehu", + dhw: "Dhanwar (Nepal)", + dhx: "Dhungaloo", + dia: "Dia", + dib: "South Central Dinka", + dic: "Lakota Dida", + did: "Didinga", + dif: "Dieri", + dig: "Digo", + dih: "Kumiai", + dii: "Dimbong", + dij: "Dai", + dik: "Southwestern Dinka", + dil: "Dilling", + dim: "Dime", + din: "Dinka", + dio: "Dibo", + dip: "Northeastern Dinka", + diq: "Dimli (individual language)", + dir: "Dirim", + dis: "Dimasa", + dit: "Dirari", + diu: "Diriku", + div: "Dhivehi", + diw: "Northwestern Dinka", + dix: "Dixon Reef", + diy: "Diuwe", + diz: "Ding", + dja: "Djadjawurrung", + djb: "Djinba", + djc: "Dar Daju Daju", + djd: "Djamindjung", + dje: "Zarma", + djf: "Djangun", + dji: "Djinang", + djj: "Djeebbana", + djk: "Eastern Maroon Creole", + djm: "Jamsay Dogon", + djn: "Djauan", + djo: "Jangkang", + djr: "Djambarrpuyngu", + dju: "Kapriman", + djw: "Djawi", + dka: "Dakpakha", + dkk: "Dakka", + dkr: "Kuijau", + dks: "Southeastern Dinka", + dkx: "Mazagway", + dlg: "Dolgan", + dlk: "Dahalik", + dlm: "Dalmatian", + dln: "Darlong", + dma: "Duma", + dmb: "Mombo Dogon", + dmc: "Gavak", + dmd: "Madhi Madhi", + dme: "Dugwor", + dmg: "Upper Kinabatangan", + dmk: "Domaaki", + dml: "Dameli", + dmm: "Dama", + dmo: "Kemedzung", + dmr: "East Damar", + dms: "Dampelas", + dmu: "Dubu", + dmv: "Dumpas", + dmw: "Mudburra", + dmx: "Dema", + dmy: "Demta", + dna: "Upper Grand Valley Dani", + dnd: "Daonda", + dne: "Ndendeule", + dng: "Dungan", + dni: "Lower Grand Valley Dani", + dnj: "Dan", + dnk: "Dengka", + dnn: "Dzùùngoo", + dnr: "Danaru", + dnt: "Mid Grand Valley Dani", + dnu: "Danau", + dnv: "Danu", + dnw: "Western Dani", + dny: "Dení", + doa: "Dom", + dob: "Dobu", + doc: "Northern Dong", + doe: "Doe", + dof: "Domu", + doh: "Dong", + doi: "Dogri (macrolanguage)", + dok: "Dondo", + dol: "Doso", + don: "Toura (Papua New Guinea)", + doo: "Dongo", + dop: "Lukpa", + doq: "Dominican Sign Language", + dor: "Dori'o", + dos: "Dogosé", + dot: "Dass", + dov: "Dombe", + dow: "Doyayo", + dox: "Bussa", + doy: "Dompo", + doz: "Dorze", + dpp: "Papar", + drb: "Dair", + drc: "Minderico", + drd: "Darmiya", + dre: "Dolpo", + drg: "Rungus", + dri: "C'Lela", + drl: "Paakantyi", + drn: "West Damar", + dro: "Daro-Matu Melanau", + drq: "Dura", + drr: "Dororo", + drs: "Gedeo", + drt: "Drents", + dru: "Rukai", + dry: "Darai", + dsb: "Lower Sorbian", + dse: "Dutch Sign Language", + dsh: "Daasanach", + dsi: "Disa", + dsl: "Danish Sign Language", + dsn: "Dusner", + dso: "Desiya", + dsq: "Tadaksahak", + dta: "Daur", + dtb: "Labuk-Kinabatangan Kadazan", + dtd: "Ditidaht", + dth: "Adithinngithigh", + dti: "Ana Tinga Dogon", + dtk: "Tene Kan Dogon", + dtm: "Tomo Kan Dogon", + dtn: "Daatsʼíin", + dto: "Tommo So Dogon", + dtp: "Kadazan Dusun", + dtr: "Lotud", + dts: "Toro So Dogon", + dtt: "Toro Tegu Dogon", + dtu: "Tebul Ure Dogon", + dty: "Dotyali", + dua: "Duala", + dub: "Dubli", + duc: "Duna", + dud: "Hun-Saare", + due: "Umiray Dumaget Agta", + duf: "Dumbea", + dug: "Duruma", + duh: "Dungra Bhil", + dui: "Dumun", + duk: "Uyajitaya", + dul: "Alabat Island Agta", + dum: "Middle Dutch (ca. 1050-1350)", + dun: "Dusun Deyah", + duo: "Dupaninan Agta", + dup: "Duano", + duq: "Dusun Malang", + dur: "Dii", + dus: "Dumi", + duu: "Drung", + duv: "Duvle", + duw: "Dusun Witu", + dux: "Duungooma", + duy: "Dicamay Agta", + duz: "Duli-Gey", + dva: "Duau", + dwa: "Diri", + dwr: "Dawro", + dws: "Dutton World Speedwords", + dwu: "Dhuwal", + dww: "Dawawa", + dwy: "Dhuwaya", + dya: "Dyan", + dyb: "Dyaberdyaber", + dyd: "Dyugun", + dyg: "Villa Viciosa Agta", + dyi: "Djimini Senoufo", + dym: "Yanda Dom Dogon", + dyn: "Dyangadi", + dyo: "Jola-Fonyi", + dyu: "Dyula", + dyy: "Dyaabugay", + dza: "Tunzu", + dze: "Djiwarli", + dzg: "Dazaga", + dzl: "Dzalakha", + dzn: "Dzando", + dzo: "Dzongkha", + eaa: "Karenggapa", + ebg: "Ebughu", + ebk: "Eastern Bontok", + ebo: "Teke-Ebo", + ebr: "Ebrié", + ebu: "Embu", + ecr: "Eteocretan", + ecs: "Ecuadorian Sign Language", + ecy: "Eteocypriot", + eee: "E", + efa: "Efai", + efe: "Efe", + efi: "Efik", + ega: "Ega", + egl: "Emilian", + ego: "Eggon", + egy: "Egyptian (Ancient)", + ehu: "Ehueun", + eip: "Eipomek", + eit: "Eitiep", + eiv: "Askopan", + eja: "Ejamat", + eka: "Ekajuk", + ekc: "Eastern Karnic", + eke: "Ekit", + ekg: "Ekari", + eki: "Eki", + ekk: "Standard Estonian", + ekl: "Kol (Bangladesh)", + ekm: "Elip", + eko: "Koti", + ekp: "Ekpeye", + ekr: "Yace", + eky: "Eastern Kayah", + ele: "Elepi", + elh: "El Hugeirat", + eli: "Nding", + elk: "Elkei", + ell: "Modern Greek (1453-)", + elm: "Eleme", + elo: "El Molo", + elu: "Elu", + elx: "Elamite", + ema: "Emai-Iuleha-Ora", + emb: "Embaloh", + eme: "Emerillon", + emg: "Eastern Meohang", + emi: "Mussau-Emira", + emk: "Eastern Maninkakan", + emm: "Mamulique", + emn: "Eman", + emp: "Northern Emberá", + ems: "Pacific Gulf Yupik", + emu: "Eastern Muria", + emw: "Emplawas", + emx: "Erromintxela", + emy: "Epigraphic Mayan", + ena: "Apali", + enb: "Markweeta", + enc: "En", + end: "Ende", + enf: "Forest Enets", + eng: "English", + enh: "Tundra Enets", + enl: "Enlhet", + enm: "Middle English (1100-1500)", + enn: "Engenni", + eno: "Enggano", + enq: "Enga", + enr: "Emumu", + enu: "Enu", + env: "Enwan (Edu State)", + enw: "Enwan (Akwa Ibom State)", + enx: "Enxet", + eot: "Beti (Côte d'Ivoire)", + epi: "Epie", + epo: "Esperanto", + era: "Eravallan", + erg: "Sie", + erh: "Eruwa", + eri: "Ogea", + erk: "South Efate", + ero: "Horpa", + err: "Erre", + ers: "Ersu", + ert: "Eritai", + erw: "Erokwanas", + ese: "Ese Ejja", + esg: "Aheri Gondi", + esh: "Eshtehardi", + esi: "North Alaskan Inupiatun", + esk: "Northwest Alaska Inupiatun", + esl: "Egypt Sign Language", + esm: "Esuma", + esn: "Salvadoran Sign Language", + eso: "Estonian Sign Language", + esq: "Esselen", + ess: "Central Siberian Yupik", + est: "Estonian", + esu: "Central Yupik", + esy: "Eskayan", + etb: "Etebi", + etc: "Etchemin", + eth: "Ethiopian Sign Language", + etn: "Eton (Vanuatu)", + eto: "Eton (Cameroon)", + etr: "Edolo", + ets: "Yekhee", + ett: "Etruscan", + etu: "Ejagham", + etx: "Eten", + etz: "Semimi", + eus: "Basque", + eve: "Even", + evh: "Uvbie", + evn: "Evenki", + ewe: "Ewe", + ewo: "Ewondo", + ext: "Extremaduran", + eya: "Eyak", + eyo: "Keiyo", + eza: "Ezaa", + eze: "Uzekwe", + faa: "Fasu", + fab: "Fa d'Ambu", + fad: "Wagi", + faf: "Fagani", + fag: "Finongan", + fah: "Baissa Fali", + fai: "Faiwol", + faj: "Faita", + fak: "Fang (Cameroon)", + fal: "South Fali", + fam: "Fam", + fan: "Fang (Equatorial Guinea)", + fao: "Faroese", + fap: "Palor", + far: "Fataleka", + fas: "Persian", + fat: "Fanti", + fau: "Fayu", + fax: "Fala", + fay: "Southwestern Fars", + faz: "Northwestern Fars", + fbl: "West Albay Bikol", + fcs: "Quebec Sign Language", + fer: "Feroge", + ffi: "Foia Foia", + ffm: "Maasina Fulfulde", + fgr: "Fongoro", + fia: "Nobiin", + fie: "Fyer", + fij: "Fijian", + fil: "Filipino", + fin: "Finnish", + fip: "Fipa", + fir: "Firan", + fit: "Tornedalen Finnish", + fiw: "Fiwaga", + fkk: "Kirya-Konzəl", + fkv: "Kven Finnish", + fla: "Kalispel-Pend d'Oreille", + flh: "Foau", + fli: "Fali", + fll: "North Fali", + fln: "Flinders Island", + flr: "Fuliiru", + fly: "Flaaitaal", + fmp: "Fe'fe'", + fmu: "Far Western Muria", + fnb: "Fanbak", + fng: "Fanagalo", + fni: "Fania", + fod: "Foodo", + foi: "Foi", + fom: "Foma", + fon: "Fon", + for: "Fore", + fos: "Siraya", + fpe: "Fernando Po Creole English", + fqs: "Fas", + fra: "French", + frc: "Cajun French", + frd: "Fordata", + frk: "Frankish", + frm: "Middle French (ca. 1400-1600)", + fro: "Old French (842-ca. 1400)", + frp: "Arpitan", + frq: "Forak", + frr: "Northern Frisian", + frs: "Eastern Frisian", + frt: "Fortsenal", + fry: "Western Frisian", + fse: "Finnish Sign Language", + fsl: "French Sign Language", + fss: "Finland-Swedish Sign Language", + fub: "Adamawa Fulfulde", + fuc: "Pulaar", + fud: "East Futuna", + fue: "Borgu Fulfulde", + fuf: "Pular", + fuh: "Western Niger Fulfulde", + fui: "Bagirmi Fulfulde", + fuj: "Ko", + ful: "Fulah", + fum: "Fum", + fun: "Fulniô", + fuq: "Central-Eastern Niger Fulfulde", + fur: "Friulian", + fut: "Futuna-Aniwa", + fuu: "Furu", + fuv: "Nigerian Fulfulde", + fuy: "Fuyug", + fvr: "Fur", + fwa: "Fwâi", + fwe: "Fwe", + gaa: "Ga", + gab: "Gabri", + gac: "Mixed Great Andamanese", + gad: "Gaddang", + gae: "Guarequena", + gaf: "Gende", + gag: "Gagauz", + gah: "Alekano", + gai: "Borei", + gaj: "Gadsup", + gak: "Gamkonora", + gal: "Galolen", + gam: "Kandawo", + gan: "Gan Chinese", + gao: "Gants", + gap: "Gal", + gaq: "Gata'", + gar: "Galeya", + gas: "Adiwasi Garasia", + gat: "Kenati", + gau: "Mudhili Gadaba", + gaw: "Nobonob", + gax: "Borana-Arsi-Guji Oromo", + gay: "Gayo", + gaz: "West Central Oromo", + gba: "Gbaya (Central African Republic)", + gbb: "Kaytetye", + gbd: "Karadjeri", + gbe: "Niksek", + gbf: "Gaikundi", + gbg: "Gbanziri", + gbh: "Defi Gbe", + gbi: "Galela", + gbj: "Bodo Gadaba", + gbk: "Gaddi", + gbl: "Gamit", + gbm: "Garhwali", + gbn: "Mo'da", + gbo: "Northern Grebo", + gbp: "Gbaya-Bossangoa", + gbq: "Gbaya-Bozoum", + gbr: "Gbagyi", + gbs: "Gbesi Gbe", + gbu: "Gagadu", + gbv: "Gbanu", + gbw: "Gabi-Gabi", + gbx: "Eastern Xwla Gbe", + gby: "Gbari", + gbz: "Zoroastrian Dari", + gcc: "Mali", + gcd: "Ganggalida", + gce: "Galice", + gcf: "Guadeloupean Creole French", + gcl: "Grenadian Creole English", + gcn: "Gaina", + gcr: "Guianese Creole French", + gct: "Colonia Tovar German", + gda: "Gade Lohar", + gdb: "Pottangi Ollar Gadaba", + gdc: "Gugu Badhun", + gdd: "Gedaged", + gde: "Gude", + gdf: "Guduf-Gava", + gdg: "Ga'dang", + gdh: "Gadjerawang", + gdi: "Gundi", + gdj: "Gurdjar", + gdk: "Gadang", + gdl: "Dirasha", + gdm: "Laal", + gdn: "Umanakaina", + gdo: "Ghodoberi", + gdq: "Mehri", + gdr: "Wipi", + gds: "Ghandruk Sign Language", + gdt: "Kungardutyi", + gdu: "Gudu", + gdx: "Godwari", + gea: "Geruma", + geb: "Kire", + gec: "Gboloo Grebo", + ged: "Gade", + geg: "Gengle", + geh: "Hutterite German", + gei: "Gebe", + gej: "Gen", + gek: "Ywom", + gel: "ut-Ma'in", + geq: "Geme", + ges: "Geser-Gorom", + gev: "Eviya", + gew: "Gera", + gex: "Garre", + gey: "Enya", + gez: "Geez", + gfk: "Patpatar", + gft: "Gafat", + gga: "Gao", + ggb: "Gbii", + ggd: "Gugadj", + gge: "Guragone", + ggg: "Gurgula", + ggk: "Kungarakany", + ggl: "Ganglau", + ggt: "Gitua", + ggu: "Gagu", + ggw: "Gogodala", + gha: "Ghadamès", + ghc: "Hiberno-Scottish Gaelic", + ghe: "Southern Ghale", + ghh: "Northern Ghale", + ghk: "Geko Karen", + ghl: "Ghulfan", + ghn: "Ghanongga", + gho: "Ghomara", + ghr: "Ghera", + ghs: "Guhu-Samane", + ght: "Kuke", + gia: "Kitja", + gib: "Gibanawa", + gic: "Gail", + gid: "Gidar", + gie: "Gaɓogbo", + gig: "Goaria", + gih: "Githabul", + gil: "Gilbertese", + gim: "Gimi (Eastern Highlands)", + gin: "Hinukh", + gip: "Gimi (West New Britain)", + giq: "Green Gelao", + gir: "Red Gelao", + gis: "North Giziga", + git: "Gitxsan", + giu: "Mulao", + giw: "White Gelao", + gix: "Gilima", + giy: "Giyug", + giz: "South Giziga", + gji: "Geji", + gjk: "Kachi Koli", + gjm: "Gunditjmara", + gjn: "Gonja", + gjr: "Gurindji Kriol", + gju: "Gujari", + gka: "Guya", + gke: "Ndai", + gkn: "Gokana", + gko: "Kok-Nar", + gkp: "Guinea Kpelle", + gku: "ǂUngkue", + gla: "Scottish Gaelic", + glc: "Bon Gula", + gld: "Nanai", + gle: "Irish", + glg: "Galician", + glh: "Northwest Pashai", + gli: "Guliguli", + glj: "Gula Iro", + glk: "Gilaki", + gll: "Garlali", + glo: "Galambu", + glr: "Glaro-Twabo", + glu: "Gula (Chad)", + glv: "Manx", + glw: "Glavda", + gly: "Gule", + gma: "Gambera", + gmb: "Gula'alaa", + gmd: "Mághdì", + gmg: "Magɨyi", + gmh: "Middle High German (ca. 1050-1500)", + gml: "Middle Low German", + gmm: "Gbaya-Mbodomo", + gmn: "Gimnime", + gmu: "Gumalu", + gmv: "Gamo", + gmx: "Magoma", + gmy: "Mycenaean Greek", + gmz: "Mgbolizhia", + gna: "Kaansa", + gnb: "Gangte", + gnc: "Guanche", + gnd: "Zulgo-Gemzek", + gne: "Ganang", + gng: "Ngangam", + gnh: "Lere", + gni: "Gooniyandi", + gnk: "//Gana", + gnl: "Gangulu", + gnm: "Ginuman", + gnn: "Gumatj", + gno: "Northern Gondi", + gnq: "Gana", + gnr: "Gureng Gureng", + gnt: "Guntai", + gnu: "Gnau", + gnw: "Western Bolivian Guaraní", + gnz: "Ganzi", + goa: "Guro", + gob: "Playero", + goc: "Gorakor", + god: "Godié", + goe: "Gongduk", + gof: "Gofa", + gog: "Gogo", + goh: "Old High German (ca. 750-1050)", + goi: "Gobasi", + goj: "Gowlan", + gok: "Gowli", + gol: "Gola", + gom: "Goan Konkani", + gon: "Gondi", + goo: "Gone Dau", + gop: "Yeretuar", + goq: "Gorap", + gor: "Gorontalo", + gos: "Gronings", + got: "Gothic", + gou: "Gavar", + gow: "Gorowa", + gox: "Gobu", + goy: "Goundo", + goz: "Gozarkhani", + gpa: "Gupa-Abawa", + gpe: "Ghanaian Pidgin English", + gpn: "Taiap", + gqa: "Ga'anda", + gqi: "Guiqiong", + gqn: "Guana (Brazil)", + gqr: "Gor", + gqu: "Qau", + gra: "Rajput Garasia", + grb: "Grebo", + grc: "Ancient Greek (to 1453)", + grd: "Guruntum-Mbaaru", + grg: "Madi", + grh: "Gbiri-Niragu", + gri: "Ghari", + grj: "Southern Grebo", + grm: "Kota Marudu Talantang", + grn: "Guarani", + gro: "Groma", + grq: "Gorovu", + grr: "Taznatit", + grs: "Gresi", + grt: "Garo", + gru: "Kistane", + grv: "Central Grebo", + grw: "Gweda", + grx: "Guriaso", + gry: "Barclayville Grebo", + grz: "Guramalum", + gse: "Ghanaian Sign Language", + gsg: "German Sign Language", + gsl: "Gusilay", + gsm: "Guatemalan Sign Language", + gsn: "Nema", + gso: "Southwest Gbaya", + gsp: "Wasembo", + gss: "Greek Sign Language", + gsw: "Swiss German", + gta: "Guató", + gtu: "Aghu-Tharnggala", + gua: "Shiki", + gub: "Guajajára", + guc: "Wayuu", + gud: "Yocoboué Dida", + gue: "Gurinji", + guf: "Gupapuyngu", + gug: "Paraguayan Guaraní", + guh: "Guahibo", + gui: "Eastern Bolivian Guaraní", + guj: "Gujarati", + guk: "Gumuz", + gul: "Sea Island Creole English", + gum: "Guambiano", + gun: "Mbyá Guaraní", + guo: "Guayabero", + gup: "Gunwinggu", + guq: "Aché", + gur: "Farefare", + gus: "Guinean Sign Language", + gut: "Maléku Jaíka", + guu: "Yanomamö", + guw: "Gun", + gux: "Gourmanchéma", + guz: "Gusii", + gva: "Guana (Paraguay)", + gvc: "Guanano", + gve: "Duwet", + gvf: "Golin", + gvj: "Guajá", + gvl: "Gulay", + gvm: "Gurmana", + gvn: "Kuku-Yalanji", + gvo: "Gavião Do Jiparaná", + gvp: "Pará Gavião", + gvr: "Gurung", + gvs: "Gumawana", + gvy: "Guyani", + gwa: "Mbato", + gwb: "Gwa", + gwc: "Kalami", + gwd: "Gawwada", + gwe: "Gweno", + gwf: "Gowro", + gwg: "Moo", + gwi: "Gwichʼin", + gwj: "/Gwi", + gwm: "Awngthim", + gwn: "Gwandara", + gwr: "Gwere", + gwt: "Gawar-Bati", + gwu: "Guwamu", + gww: "Kwini", + gwx: "Gua", + gxx: "Wè Southern", + gya: "Northwest Gbaya", + gyb: "Garus", + gyd: "Kayardild", + gye: "Gyem", + gyf: "Gungabula", + gyg: "Gbayi", + gyi: "Gyele", + gyl: "Gayil", + gym: "Ngäbere", + gyn: "Guyanese Creole English", + gyr: "Guarayu", + gyy: "Gunya", + gza: "Ganza", + gzi: "Gazi", + gzn: "Gane", + haa: "Han", + hab: "Hanoi Sign Language", + hac: "Gurani", + had: "Hatam", + hae: "Eastern Oromo", + haf: "Haiphong Sign Language", + hag: "Hanga", + hah: "Hahon", + hai: "Haida", + haj: "Hajong", + hak: "Hakka Chinese", + hal: "Halang", + ham: "Hewa", + han: "Hangaza", + hao: "Hakö", + hap: "Hupla", + haq: "Ha", + har: "Harari", + has: "Haisla", + hat: "Haitian", + hau: "Hausa", + hav: "Havu", + haw: "Hawaiian", + hax: "Southern Haida", + hay: "Haya", + haz: "Hazaragi", + hba: "Hamba", + hbb: "Huba", + hbn: "Heiban", + hbo: "Ancient Hebrew", + hbs: "Serbo-Croatian", + hbu: "Habu", + hca: "Andaman Creole Hindi", + hch: "Huichol", + hdn: "Northern Haida", + hds: "Honduras Sign Language", + hdy: "Hadiyya", + hea: "Northern Qiandong Miao", + heb: "Hebrew", + hed: "Herdé", + heg: "Helong", + heh: "Hehe", + hei: "Heiltsuk", + hem: "Hemba", + her: "Herero", + hgm: "Hai//om", + hgw: "Haigwai", + hhi: "Hoia Hoia", + hhr: "Kerak", + hhy: "Hoyahoya", + hia: "Lamang", + hib: "Hibito", + hid: "Hidatsa", + hif: "Fiji Hindi", + hig: "Kamwe", + hih: "Pamosu", + hii: "Hinduri", + hij: "Hijuk", + hik: "Seit-Kaitetu", + hil: "Hiligaynon", + hin: "Hindi", + hio: "Tsoa", + hir: "Himarimã", + hit: "Hittite", + hiw: "Hiw", + hix: "Hixkaryána", + hji: "Haji", + hka: "Kahe", + hke: "Hunde", + hkk: "Hunjara-Kaina Ke", + hks: "Hong Kong Sign Language", + hla: "Halia", + hlb: "Halbi", + hld: "Halang Doan", + hle: "Hlersu", + hlt: "Matu Chin", + hlu: "Hieroglyphic Luwian", + hma: "Southern Mashan Hmong", + hmb: "Humburi Senni Songhay", + hmc: "Central Huishui Hmong", + hmd: "Large Flowery Miao", + hme: "Eastern Huishui Hmong", + hmf: "Hmong Don", + hmg: "Southwestern Guiyang Hmong", + hmh: "Southwestern Huishui Hmong", + hmi: "Northern Huishui Hmong", + hmj: "Ge", + hmk: "Maek", + hml: "Luopohe Hmong", + hmm: "Central Mashan Hmong", + hmn: "Hmong", + hmo: "Hiri Motu", + hmp: "Northern Mashan Hmong", + hmq: "Eastern Qiandong Miao", + hmr: "Hmar", + hms: "Southern Qiandong Miao", + hmt: "Hamtai", + hmu: "Hamap", + hmv: "Hmong Dô", + hmw: "Western Mashan Hmong", + hmy: "Southern Guiyang Hmong", + hmz: "Hmong Shua", + hna: "Mina (Cameroon)", + hnd: "Southern Hindko", + hne: "Chhattisgarhi", + hnh: "//Ani", + hni: "Hani", + hnj: "Hmong Njua", + hnn: "Hanunoo", + hno: "Northern Hindko", + hns: "Caribbean Hindustani", + hnu: "Hung", + hoa: "Hoava", + hob: "Mari (Madang Province)", + hoc: "Ho", + hod: "Holma", + hoe: "Horom", + hoh: "Hobyót", + hoi: "Holikachuk", + hoj: "Hadothi", + hol: "Holu", + hom: "Homa", + hoo: "Holoholo", + hop: "Hopi", + hor: "Horo", + hos: "Ho Chi Minh City Sign Language", + hot: "Hote", + hov: "Hovongan", + how: "Honi", + hoy: "Holiya", + hoz: "Hozo", + hpo: "Hpon", + hps: "Hawai'i Sign Language (HSL)", + hra: "Hrangkhol", + hrc: "Niwer Mil", + hre: "Hre", + hrk: "Haruku", + hrm: "Horned Miao", + hro: "Haroi", + hrp: "Nhirrpi", + hrt: "Hértevin", + hru: "Hruso", + hrv: "Croatian", + hrw: "Warwar Feni", + hrx: "Hunsrik", + hrz: "Harzani", + hsb: "Upper Sorbian", + hsh: "Hungarian Sign Language", + hsl: "Hausa Sign Language", + hsn: "Xiang Chinese", + hss: "Harsusi", + hti: "Hoti", + hto: "Minica Huitoto", + hts: "Hadza", + htu: "Hitu", + htx: "Middle Hittite", + hub: "Huambisa", + huc: "Err:510", + hud: "Huaulu", + hue: "San Francisco Del Mar Huave", + huf: "Humene", + hug: "Huachipaeri", + huh: "Huilliche", + hui: "Huli", + huj: "Northern Guiyang Hmong", + huk: "Hulung", + hul: "Hula", + hum: "Hungana", + hun: "Hungarian", + huo: "Hu", + hup: "Hupa", + huq: "Tsat", + hur: "Halkomelem", + hus: "Huastec", + hut: "Humla", + huu: "Murui Huitoto", + huv: "San Mateo Del Mar Huave", + huw: "Hukumina", + hux: "Nüpode Huitoto", + huy: "Hulaulá", + huz: "Hunzib", + hvc: "Haitian Vodoun Culture Language", + hve: "San Dionisio Del Mar Huave", + hvk: "Haveke", + hvn: "Sabu", + hvv: "Santa María Del Mar Huave", + hwa: "Wané", + hwc: "Hawai'i Creole English", + hwo: "Hwana", + hya: "Hya", + hye: "Armenian", + iai: "Iaai", + ian: "Iatmul", + iar: "Purari", + iba: "Iban", + ibb: "Ibibio", + ibd: "Iwaidja", + ibe: "Akpes", + ibg: "Ibanag", + ibh: "Bih", + ibl: "Ibaloi", + ibm: "Agoi", + ibn: "Ibino", + ibo: "Igbo", + ibr: "Ibuoro", + ibu: "Ibu", + iby: "Ibani", + ica: "Ede Ica", + ich: "Etkywan", + icl: "Icelandic Sign Language", + icr: "Islander Creole English", + ida: "Idakho-Isukha-Tiriki", + idb: "Indo-Portuguese", + idc: "Idon", + idd: "Ede Idaca", + ide: "Idere", + idi: "Idi", + ido: "Ido", + idr: "Indri", + ids: "Idesa", + idt: "Idaté", + idu: "Idoma", + ifa: "Amganad Ifugao", + ifb: "Batad Ifugao", + ife: "Ifè", + iff: "Ifo", + ifk: "Tuwali Ifugao", + ifm: "Teke-Fuumu", + ifu: "Mayoyao Ifugao", + ify: "Keley-I Kallahan", + igb: "Ebira", + ige: "Igede", + igg: "Igana", + igl: "Igala", + igm: "Kanggape", + ign: "Ignaciano", + igo: "Isebe", + igs: "Interglossa", + igw: "Igwe", + ihb: "Iha Based Pidgin", + ihi: "Ihievbe", + ihp: "Iha", + ihw: "Bidhawal", + iii: "Sichuan Yi", + iin: "Thiin", + ijc: "Izon", + ije: "Biseni", + ijj: "Ede Ije", + ijn: "Kalabari", + ijs: "Southeast Ijo", + ike: "Eastern Canadian Inuktitut", + iki: "Iko", + ikk: "Ika", + ikl: "Ikulu", + iko: "Olulumo-Ikom", + ikp: "Ikpeshi", + ikr: "Ikaranggal", + iks: "Inuit Sign Language", + ikt: "Inuinnaqtun", + iku: "Inuktitut", + ikv: "Iku-Gora-Ankwa", + ikw: "Ikwere", + ikx: "Ik", + ikz: "Ikizu", + ila: "Ile Ape", + ilb: "Ila", + ile: "Interlingue", + ilg: "Garig-Ilgar", + ili: "Ili Turki", + ilk: "Ilongot", + ilm: "Iranun (Malaysia)", + ilo: "Iloko", + ilp: "Iranun (Philippines)", + ils: "International Sign", + ilu: "Ili'uun", + ilv: "Ilue", + ima: "Mala Malasar", + imi: "Anamgura", + iml: "Miluk", + imn: "Imonda", + imo: "Imbongu", + imr: "Imroing", + ims: "Marsian", + imy: "Milyan", + ina: "Interlingua (International Auxiliary Language Association)", + inb: "Inga", + ind: "Indonesian", + ing: "Degexit'an", + inh: "Ingush", + inj: "Jungle Inga", + inl: "Indonesian Sign Language", + inm: "Minaean", + inn: "Isinai", + ino: "Inoke-Yate", + inp: "Iñapari", + ins: "Indian Sign Language", + int: "Intha", + inz: "Ineseño", + ior: "Inor", + iou: "Tuma-Irumu", + iow: "Iowa-Oto", + ipi: "Ipili", + ipk: "Inupiaq", + ipo: "Ipiko", + iqu: "Iquito", + iqw: "Ikwo", + ire: "Iresim", + irh: "Irarutu", + iri: "Irigwe", + irk: "Iraqw", + irn: "Irántxe", + irr: "Ir", + iru: "Irula", + irx: "Kamberau", + iry: "Iraya", + isa: "Isabi", + isc: "Isconahua", + isd: "Isnag", + ise: "Italian Sign Language", + isg: "Irish Sign Language", + ish: "Esan", + isi: "Nkem-Nkum", + isk: "Ishkashimi", + isl: "Icelandic", + ism: "Masimasi", + isn: "Isanzu", + iso: "Isoko", + isr: "Israeli Sign Language", + ist: "Istriot", + isu: "Isu (Menchum Division)", + ita: "Italian", + itb: "Binongan Itneg", + itd: "Southern Tidung", + ite: "Itene", + iti: "Inlaod Itneg", + itk: "Judeo-Italian", + itl: "Itelmen", + itm: "Itu Mbon Uzo", + ito: "Itonama", + itr: "Iteri", + its: "Isekiri", + itt: "Maeng Itneg", + itv: "Itawit", + itw: "Ito", + itx: "Itik", + ity: "Moyadan Itneg", + itz: "Itzá", + ium: "Iu Mien", + ivb: "Ibatan", + ivv: "Ivatan", + iwk: "I-Wak", + iwm: "Iwam", + iwo: "Iwur", + iws: "Sepik Iwam", + ixc: "Ixcatec", + ixl: "Ixil", + iya: "Iyayu", + iyo: "Mesaka", + iyx: "Yaka (Congo)", + izh: "Ingrian", + izr: "Izere", + izz: "Izii", + jaa: "Jamamadí", + jab: "Hyam", + jac: "Popti'", + jad: "Jahanka", + jae: "Yabem", + jaf: "Jara", + jah: "Jah Hut", + jaj: "Zazao", + jak: "Jakun", + jal: "Yalahatan", + jam: "Jamaican Creole English", + jan: "Jandai", + jao: "Yanyuwa", + jaq: "Yaqay", + jas: "New Caledonian Javanese", + jat: "Jakati", + jau: "Yaur", + jav: "Javanese", + jax: "Jambi Malay", + jay: "Yan-nhangu", + jaz: "Jawe", + jbe: "Judeo-Berber", + jbi: "Badjiri", + jbj: "Arandai", + jbk: "Barikewa", + jbn: "Nafusi", + jbo: "Lojban", + jbr: "Jofotek-Bromnya", + jbt: "Jabutí", + jbu: "Jukun Takum", + jbw: "Yawijibaya", + jcs: "Jamaican Country Sign Language", + jct: "Krymchak", + jda: "Jad", + jdg: "Jadgali", + jdt: "Judeo-Tat", + jeb: "Jebero", + jee: "Jerung", + jeh: "Jeh", + jei: "Yei", + jek: "Jeri Kuo", + jel: "Yelmek", + jen: "Dza", + jer: "Jere", + jet: "Manem", + jeu: "Jonkor Bourmataguil", + jgb: "Ngbee", + jge: "Judeo-Georgian", + jgk: "Gwak", + jgo: "Ngomba", + jhi: "Jehai", + jhs: "Jhankot Sign Language", + jia: "Jina", + jib: "Jibu", + jic: "Tol", + jid: "Bu", + jie: "Jilbe", + jig: "Djingili", + jih: "sTodsde", + jii: "Jiiddu", + jil: "Jilim", + jim: "Jimi (Cameroon)", + jio: "Jiamao", + jiq: "Guanyinqiao", + jit: "Jita", + jiu: "Youle Jinuo", + jiv: "Shuar", + jiy: "Buyuan Jinuo", + jje: "Jejueo", + jjr: "Bankal", + jka: "Kaera", + jkm: "Mobwa Karen", + jko: "Kubo", + jkp: "Paku Karen", + jkr: "Koro (India)", + jku: "Labir", + jle: "Ngile", + jls: "Jamaican Sign Language", + jma: "Dima", + jmb: "Zumbun", + jmc: "Machame", + jmd: "Yamdena", + jmi: "Jimi (Nigeria)", + jml: "Jumli", + jmn: "Makuri Naga", + jmr: "Kamara", + jms: "Mashi (Nigeria)", + jmw: "Mouwase", + jmx: "Western Juxtlahuaca Mixtec", + jna: "Jangshung", + jnd: "Jandavra", + jng: "Yangman", + jni: "Janji", + jnj: "Yemsa", + jnl: "Rawat", + jns: "Jaunsari", + job: "Joba", + jod: "Wojenaka", + jog: "Jogi", + jor: "Jorá", + jos: "Jordanian Sign Language", + jow: "Jowulu", + jpa: "Jewish Palestinian Aramaic", + jpn: "Japanese", + jpr: "Judeo-Persian", + jqr: "Jaqaru", + jra: "Jarai", + jrb: "Judeo-Arabic", + jrr: "Jiru", + jrt: "Jorto", + jru: "Japrería", + jsl: "Japanese Sign Language", + jua: "Júma", + jub: "Wannu", + juc: "Jurchen", + jud: "Worodougou", + juh: "Hõne", + jui: "Ngadjuri", + juk: "Wapan", + jul: "Jirel", + jum: "Jumjum", + jun: "Juang", + juo: "Jiba", + jup: "Hupdë", + jur: "Jurúna", + jus: "Jumla Sign Language", + jut: "Jutish", + juu: "Ju", + juw: "Wãpha", + juy: "Juray", + jvd: "Javindo", + jvn: "Caribbean Javanese", + jwi: "Jwira-Pepesa", + jya: "Jiarong", + jye: "Judeo-Yemeni Arabic", + jyy: "Jaya", + kaa: "Kara-Kalpak", + kab: "Kabyle", + kac: "Kachin", + kad: "Adara", + kae: "Ketangalan", + kaf: "Katso", + kag: "Kajaman", + kah: "Kara (Central African Republic)", + kai: "Karekare", + kaj: "Jju", + kak: "Kalanguya", + kal: "Kalaallisut", + kam: "Kamba (Kenya)", + kan: "Kannada", + kao: "Xaasongaxango", + kap: "Bezhta", + kaq: "Capanahua", + kas: "Kashmiri", + kat: "Georgian", + kau: "Kanuri", + kav: "Katukína", + kaw: "Kawi", + kax: "Kao", + kay: "Kamayurá", + kaz: "Kazakh", + kba: "Kalarko", + kbb: "Kaxuiâna", + kbc: "Kadiwéu", + kbd: "Kabardian", + kbe: "Kanju", + kbg: "Khamba", + kbh: "Camsá", + kbi: "Kaptiau", + kbj: "Kari", + kbk: "Grass Koiari", + kbl: "Kanembu", + kbm: "Iwal", + kbn: "Kare (Central African Republic)", + kbo: "Keliko", + kbp: "Kabiyè", + kbq: "Kamano", + kbr: "Kafa", + kbs: "Kande", + kbt: "Abadi", + kbu: "Kabutra", + kbv: "Dera (Indonesia)", + kbw: "Kaiep", + kbx: "Ap Ma", + kby: "Manga Kanuri", + kbz: "Duhwa", + kca: "Khanty", + kcb: "Kawacha", + kcc: "Lubila", + kcd: "Ngkâlmpw Kanum", + kce: "Kaivi", + kcf: "Ukaan", + kcg: "Tyap", + kch: "Vono", + kci: "Kamantan", + kcj: "Kobiana", + kck: "Kalanga", + kcl: "Kela (Papua New Guinea)", + kcm: "Gula (Central African Republic)", + kcn: "Nubi", + kco: "Kinalakna", + kcp: "Kanga", + kcq: "Kamo", + kcr: "Katla", + kcs: "Koenoem", + kct: "Kaian", + kcu: "Kami (Tanzania)", + kcv: "Kete", + kcw: "Kabwari", + kcx: "Kachama-Ganjule", + kcy: "Korandje", + kcz: "Konongo", + kda: "Worimi", + kdc: "Kutu", + kdd: "Yankunytjatjara", + kde: "Makonde", + kdf: "Mamusi", + kdg: "Seba", + kdh: "Tem", + kdi: "Kumam", + kdj: "Karamojong", + kdk: "Numèè", + kdl: "Tsikimba", + kdm: "Kagoma", + kdn: "Kunda", + kdp: "Kaningdon-Nindem", + kdq: "Koch", + kdr: "Karaim", + kdt: "Kuy", + kdu: "Kadaru", + kdw: "Koneraw", + kdx: "Kam", + kdy: "Keder", + kdz: "Kwaja", + kea: "Kabuverdianu", + keb: "Kélé", + kec: "Keiga", + ked: "Kerewe", + kee: "Eastern Keres", + kef: "Kpessi", + keg: "Tese", + keh: "Keak", + kei: "Kei", + kej: "Kadar", + kek: "Kekchí", + kel: "Kela (Democratic Republic of Congo)", + kem: "Kemak", + ken: "Kenyang", + keo: "Kakwa", + kep: "Kaikadi", + keq: "Kamar", + ker: "Kera", + kes: "Kugbo", + ket: "Ket", + keu: "Akebu", + kev: "Kanikkaran", + kew: "West Kewa", + kex: "Kukna", + key: "Kupia", + kez: "Kukele", + kfa: "Kodava", + kfb: "Northwestern Kolami", + kfc: "Konda-Dora", + kfd: "Korra Koraga", + kfe: "Kota (India)", + kff: "Koya", + kfg: "Kudiya", + kfh: "Kurichiya", + kfi: "Kannada Kurumba", + kfj: "Kemiehua", + kfk: "Kinnauri", + kfl: "Kung", + kfm: "Khunsari", + kfn: "Kuk", + kfo: "Koro (Côte d'Ivoire)", + kfp: "Korwa", + kfq: "Korku", + kfr: "Kachhi", + kfs: "Bilaspuri", + kft: "Kanjari", + kfu: "Katkari", + kfv: "Kurmukar", + kfw: "Kharam Naga", + kfx: "Kullu Pahari", + kfy: "Kumaoni", + kfz: "Koromfé", + kga: "Koyaga", + kgb: "Kawe", + kge: "Komering", + kgf: "Kube", + kgg: "Kusunda", + kgi: "Selangor Sign Language", + kgj: "Gamale Kham", + kgk: "Kaiwá", + kgl: "Kunggari", + kgm: "Karipúna", + kgn: "Karingani", + kgo: "Krongo", + kgp: "Kaingang", + kgq: "Kamoro", + kgr: "Abun", + kgs: "Kumbainggar", + kgt: "Somyev", + kgu: "Kobol", + kgv: "Karas", + kgw: "Karon Dori", + kgx: "Kamaru", + kgy: "Kyerung", + kha: "Khasi", + khb: "Lü", + khc: "Tukang Besi North", + khd: "Bädi Kanum", + khe: "Korowai", + khf: "Khuen", + khg: "Khams Tibetan", + khh: "Kehu", + khj: "Kuturmi", + khk: "Halh Mongolian", + khl: "Lusi", + khm: "Central Khmer", + khn: "Khandesi", + kho: "Khotanese", + khp: "Kapori", + khq: "Koyra Chiini Songhay", + khr: "Kharia", + khs: "Kasua", + kht: "Khamti", + khu: "Nkhumbi", + khv: "Khvarshi", + khw: "Khowar", + khx: "Kanu", + khy: "Kele (Democratic Republic of Congo)", + khz: "Keapara", + kia: "Kim", + kib: "Koalib", + kic: "Kickapoo", + kid: "Koshin", + kie: "Kibet", + kif: "Eastern Parbate Kham", + kig: "Kimaama", + kih: "Kilmeri", + kii: "Kitsai", + kij: "Kilivila", + kik: "Kikuyu", + kil: "Kariya", + kim: "Karagas", + kin: "Kinyarwanda", + kio: "Kiowa", + kip: "Sheshi Kham", + kiq: "Kosadle", + kir: "Kirghiz", + kis: "Kis", + kit: "Agob", + kiu: "Kirmanjki (individual language)", + kiv: "Kimbu", + kiw: "Northeast Kiwai", + kix: "Khiamniungan Naga", + kiy: "Kirikiri", + kiz: "Kisi", + kja: "Mlap", + kjb: "Q'anjob'al", + kjc: "Coastal Konjo", + kjd: "Southern Kiwai", + kje: "Kisar", + kjf: "Khalaj", + kjg: "Khmu", + kjh: "Khakas", + kji: "Zabana", + kjj: "Khinalugh", + kjk: "Highland Konjo", + kjl: "Western Parbate Kham", + kjm: "Kháng", + kjn: "Kunjen", + kjo: "Harijan Kinnauri", + kjp: "Pwo Eastern Karen", + kjq: "Western Keres", + kjr: "Kurudu", + kjs: "East Kewa", + kjt: "Phrae Pwo Karen", + kju: "Kashaya", + kjv: "Kaikavian Literary Language", + kjx: "Ramopa", + kjy: "Erave", + kjz: "Bumthangkha", + kka: "Kakanda", + kkb: "Kwerisa", + kkc: "Odoodee", + kkd: "Kinuku", + kke: "Kakabe", + kkf: "Kalaktang Monpa", + kkg: "Mabaka Valley Kalinga", + kkh: "Khün", + kki: "Kagulu", + kkj: "Kako", + kkk: "Kokota", + kkl: "Kosarek Yale", + kkm: "Kiong", + kkn: "Kon Keu", + kko: "Karko", + kkp: "Gugubera", + kkq: "Kaiku", + kkr: "Kir-Balar", + kks: "Giiwo", + kkt: "Koi", + kku: "Tumi", + kkv: "Kangean", + kkw: "Teke-Kukuya", + kkx: "Kohin", + kky: "Guguyimidjir", + kkz: "Kaska", + kla: "Klamath-Modoc", + klb: "Kiliwa", + klc: "Kolbila", + kld: "Gamilaraay", + kle: "Kulung (Nepal)", + klf: "Kendeje", + klg: "Tagakaulo", + klh: "Weliki", + kli: "Kalumpang", + klj: "Turkic Khalaj", + klk: "Kono (Nigeria)", + kll: "Kagan Kalagan", + klm: "Migum", + kln: "Kalenjin", + klo: "Kapya", + klp: "Kamasa", + klq: "Rumu", + klr: "Khaling", + kls: "Kalasha", + klt: "Nukna", + klu: "Klao", + klv: "Maskelynes", + klw: "Tado", + klx: "Koluwawa", + kly: "Kalao", + klz: "Kabola", + kma: "Konni", + kmb: "Kimbundu", + kmc: "Southern Dong", + kmd: "Majukayang Kalinga", + kme: "Bakole", + kmf: "Kare (Papua New Guinea)", + kmg: "Kâte", + kmh: "Kalam", + kmi: "Kami (Nigeria)", + kmj: "Kumarbhag Paharia", + kmk: "Limos Kalinga", + kml: "Tanudan Kalinga", + kmm: "Kom (India)", + kmn: "Awtuw", + kmo: "Kwoma", + kmp: "Gimme", + kmq: "Kwama", + kmr: "Northern Kurdish", + kms: "Kamasau", + kmt: "Kemtuik", + kmu: "Kanite", + kmv: "Karipúna Creole French", + kmw: "Komo (Democratic Republic of Congo)", + kmx: "Waboda", + kmy: "Koma", + kmz: "Khorasani Turkish", + kna: "Dera (Nigeria)", + knb: "Lubuagan Kalinga", + knc: "Central Kanuri", + knd: "Konda", + kne: "Kankanaey", + knf: "Mankanya", + kng: "Koongo", + kni: "Kanufi", + knj: "Western Kanjobal", + knk: "Kuranko", + knl: "Keninjal", + knm: "Kanamarí", + knn: "Konkani (individual language)", + kno: "Kono (Sierra Leone)", + knp: "Kwanja", + knq: "Kintaq", + knr: "Kaningra", + kns: "Kensiu", + knt: "Panoan Katukína", + knu: "Kono (Guinea)", + knv: "Tabo", + knw: "Kung-Ekoka", + knx: "Kendayan", + kny: "Kanyok", + knz: "Kalamsé", + koa: "Konomala", + koc: "Kpati", + kod: "Kodi", + koe: "Kacipo-Balesi", + kof: "Kubi", + kog: "Cogui", + koh: "Koyo", + koi: "Komi-Permyak", + kok: "Konkani (macrolanguage)", + kol: "Kol (Papua New Guinea)", + kom: "Komi", + kon: "Kongo", + koo: "Konzo", + kop: "Waube", + koq: "Kota (Gabon)", + kor: "Korean", + kos: "Kosraean", + kot: "Lagwan", + kou: "Koke", + kov: "Kudu-Camo", + kow: "Kugama", + koy: "Koyukon", + koz: "Korak", + kpa: "Kutto", + kpb: "Mullu Kurumba", + kpc: "Curripaco", + kpd: "Koba", + kpe: "Kpelle", + kpf: "Komba", + kpg: "Kapingamarangi", + kph: "Kplang", + kpi: "Kofei", + kpj: "Karajá", + kpk: "Kpan", + kpl: "Kpala", + kpm: "Koho", + kpn: "Kepkiriwát", + kpo: "Ikposo", + kpq: "Korupun-Sela", + kpr: "Korafe-Yegha", + kps: "Tehit", + kpt: "Karata", + kpu: "Kafoa", + kpv: "Komi-Zyrian", + kpw: "Kobon", + kpx: "Mountain Koiali", + kpy: "Koryak", + kpz: "Kupsabiny", + kqa: "Mum", + kqb: "Kovai", + kqc: "Doromu-Koki", + kqd: "Koy Sanjaq Surat", + kqe: "Kalagan", + kqf: "Kakabai", + kqg: "Khe", + kqh: "Kisankasa", + kqi: "Koitabu", + kqj: "Koromira", + kqk: "Kotafon Gbe", + kql: "Kyenele", + kqm: "Khisa", + kqn: "Kaonde", + kqo: "Eastern Krahn", + kqp: "Kimré", + kqq: "Krenak", + kqr: "Kimaragang", + kqs: "Northern Kissi", + kqt: "Klias River Kadazan", + kqu: "Seroa", + kqv: "Okolod", + kqw: "Kandas", + kqx: "Mser", + kqy: "Koorete", + kqz: "Korana", + kra: "Kumhali", + krb: "Karkin", + krc: "Karachay-Balkar", + krd: "Kairui-Midiki", + kre: "Panará", + krf: "Koro (Vanuatu)", + krh: "Kurama", + kri: "Krio", + krj: "Kinaray-A", + krk: "Kerek", + krl: "Karelian", + krn: "Sapo", + krp: "Korop", + krr: "Krung", + krs: "Gbaya (Sudan)", + krt: "Tumari Kanuri", + kru: "Kurukh", + krv: "Kavet", + krw: "Western Krahn", + krx: "Karon", + kry: "Kryts", + krz: "Sota Kanum", + ksa: "Shuwa-Zamani", + ksb: "Shambala", + ksc: "Southern Kalinga", + ksd: "Kuanua", + kse: "Kuni", + ksf: "Bafia", + ksg: "Kusaghe", + ksh: "Kölsch", + ksi: "Krisa", + ksj: "Uare", + ksk: "Kansa", + ksl: "Kumalu", + ksm: "Kumba", + ksn: "Kasiguranin", + kso: "Kofa", + ksp: "Kaba", + ksq: "Kwaami", + ksr: "Borong", + kss: "Southern Kisi", + kst: "Winyé", + ksu: "Khamyang", + ksv: "Kusu", + ksw: "S'gaw Karen", + ksx: "Kedang", + ksy: "Kharia Thar", + ksz: "Kodaku", + kta: "Katua", + ktb: "Kambaata", + ktc: "Kholok", + ktd: "Kokata", + kte: "Nubri", + ktf: "Kwami", + ktg: "Kalkutung", + kth: "Karanga", + kti: "North Muyu", + ktj: "Plapo Krumen", + ktk: "Kaniet", + ktl: "Koroshi", + ktm: "Kurti", + ktn: "Karitiâna", + kto: "Kuot", + ktp: "Kaduo", + ktq: "Katabaga", + kts: "South Muyu", + ktt: "Ketum", + ktu: "Kituba (Democratic Republic of Congo)", + ktv: "Eastern Katu", + ktw: "Kato", + ktx: "Kaxararí", + kty: "Kango (Bas-Uélé District)", + ktz: "Ju/'hoan", + kua: "Kuanyama", + kub: "Kutep", + kuc: "Kwinsu", + kud: "'Auhelawa", + kue: "Kuman (Papua New Guinea)", + kuf: "Western Katu", + kug: "Kupa", + kuh: "Kushi", + kui: "Kuikúro-Kalapálo", + kuj: "Kuria", + kuk: "Kepo'", + kul: "Kulere", + kum: "Kumyk", + kun: "Kunama", + kuo: "Kumukio", + kup: "Kunimaipa", + kuq: "Karipuna", + kur: "Kurdish", + kus: "Kusaal", + kut: "Kutenai", + kuu: "Upper Kuskokwim", + kuv: "Kur", + kuw: "Kpagua", + kux: "Kukatja", + kuy: "Kuuku-Ya'u", + kuz: "Kunza", + kva: "Bagvalal", + kvb: "Kubu", + kvc: "Kove", + kvd: "Kui (Indonesia)", + kve: "Kalabakan", + kvf: "Kabalai", + kvg: "Kuni-Boazi", + kvh: "Komodo", + kvi: "Kwang", + kvj: "Psikye", + kvk: "Korean Sign Language", + kvl: "Kayaw", + kvm: "Kendem", + kvn: "Border Kuna", + kvo: "Dobel", + kvp: "Kompane", + kvq: "Geba Karen", + kvr: "Kerinci", + kvt: "Lahta Karen", + kvu: "Yinbaw Karen", + kvv: "Kola", + kvw: "Wersing", + kvx: "Parkari Koli", + kvy: "Yintale Karen", + kvz: "Tsakwambo", + kwa: "Dâw", + kwb: "Kwa", + kwc: "Likwala", + kwd: "Kwaio", + kwe: "Kwerba", + kwf: "Kwara'ae", + kwg: "Sara Kaba Deme", + kwh: "Kowiai", + kwi: "Awa-Cuaiquer", + kwj: "Kwanga", + kwk: "Kwakiutl", + kwl: "Kofyar", + kwm: "Kwambi", + kwn: "Kwangali", + kwo: "Kwomtari", + kwp: "Kodia", + kwr: "Kwer", + kws: "Kwese", + kwt: "Kwesten", + kwu: "Kwakum", + kwv: "Sara Kaba Náà", + kww: "Kwinti", + kwx: "Khirwar", + kwy: "San Salvador Kongo", + kwz: "Kwadi", + kxa: "Kairiru", + kxb: "Krobu", + kxc: "Konso", + kxd: "Brunei", + kxf: "Manumanaw Karen", + kxh: "Karo (Ethiopia)", + kxi: "Keningau Murut", + kxj: "Kulfa", + kxk: "Zayein Karen", + kxl: "Nepali Kurux", + kxm: "Northern Khmer", + kxn: "Kanowit-Tanjong Melanau", + kxo: "Kanoé", + kxp: "Wadiyara Koli", + kxq: "Smärky Kanum", + kxr: "Koro (Papua New Guinea)", + kxs: "Kangjia", + kxt: "Koiwat", + kxu: "Kui (India)", + kxv: "Kuvi", + kxw: "Konai", + kxx: "Likuba", + kxy: "Kayong", + kxz: "Kerewo", + kya: "Kwaya", + kyb: "Butbut Kalinga", + kyc: "Kyaka", + kyd: "Karey", + kye: "Krache", + kyf: "Kouya", + kyg: "Keyagana", + kyh: "Karok", + kyi: "Kiput", + kyj: "Karao", + kyk: "Kamayo", + kyl: "Kalapuya", + kym: "Kpatili", + kyn: "Northern Binukidnon", + kyo: "Kelon", + kyp: "Kang", + kyq: "Kenga", + kyr: "Kuruáya", + kys: "Baram Kayan", + kyt: "Kayagar", + kyu: "Western Kayah", + kyv: "Kayort", + kyw: "Kudmali", + kyx: "Rapoisi", + kyy: "Kambaira", + kyz: "Kayabí", + kza: "Western Karaboro", + kzb: "Kaibobo", + kzc: "Bondoukou Kulango", + kzd: "Kadai", + kze: "Kosena", + kzf: "Da'a Kaili", + kzg: "Kikai", + kzi: "Kelabit", + kzk: "Kazukuru", + kzl: "Kayeli", + kzm: "Kais", + kzn: "Kokola", + kzo: "Kaningi", + kzp: "Kaidipang", + kzq: "Kaike", + kzr: "Karang", + kzs: "Sugut Dusun", + kzu: "Kayupulau", + kzv: "Komyandaret", + kzw: "Karirí-Xocó", + kzx: "Kamarian", + kzy: "Kango (Tshopo District)", + kzz: "Kalabra", + laa: "Southern Subanen", + lab: "Linear A", + lac: "Lacandon", + lad: "Ladino", + lae: "Pattani", + laf: "Lafofa", + lag: "Langi", + lah: "Lahnda", + lai: "Lambya", + laj: "Lango (Uganda)", + lak: "Laka (Nigeria)", + lal: "Lalia", + lam: "Lamba", + lan: "Laru", + lao: "Lao", + lap: "Laka (Chad)", + laq: "Qabiao", + lar: "Larteh", + las: "Lama (Togo)", + lat: "Latin", + lau: "Laba", + lav: "Latvian", + law: "Lauje", + lax: "Tiwa", + lay: "Lama Bai", + laz: "Aribwatsa", + lba: "Lui", + lbb: "Label", + lbc: "Lakkia", + lbe: "Lak", + lbf: "Tinani", + lbg: "Laopang", + lbi: "La'bi", + lbj: "Ladakhi", + lbk: "Central Bontok", + lbl: "Libon Bikol", + lbm: "Lodhi", + lbn: "Lamet", + lbo: "Laven", + lbq: "Wampar", + lbr: "Lohorung", + lbs: "Libyan Sign Language", + lbt: "Lachi", + lbu: "Labu", + lbv: "Lavatbura-Lamusong", + lbw: "Tolaki", + lbx: "Lawangan", + lby: "Lamu-Lamu", + lbz: "Lardil", + lcc: "Legenyem", + lcd: "Lola", + lce: "Loncong", + lcf: "Lubu", + lch: "Luchazi", + lcl: "Lisela", + lcm: "Tungag", + lcp: "Western Lawa", + lcq: "Luhu", + lcs: "Lisabata-Nuniali", + lda: "Kla-Dan", + ldb: "Dũya", + ldd: "Luri", + ldg: "Lenyima", + ldh: "Lamja-Dengsa-Tola", + ldi: "Laari", + ldj: "Lemoro", + ldk: "Leelau", + ldl: "Kaan", + ldm: "Landoma", + ldn: "Láadan", + ldo: "Loo", + ldp: "Tso", + ldq: "Lufu", + lea: "Lega-Shabunda", + leb: "Lala-Bisa", + lec: "Leco", + led: "Lendu", + lee: "Lyélé", + lef: "Lelemi", + leh: "Lenje", + lei: "Lemio", + lej: "Lengola", + lek: "Leipon", + lel: "Lele (Democratic Republic of Congo)", + lem: "Nomaande", + len: "Lenca", + leo: "Leti (Cameroon)", + lep: "Lepcha", + leq: "Lembena", + ler: "Lenkau", + les: "Lese", + let: "Lesing-Gelimi", + leu: "Kara (Papua New Guinea)", + lev: "Lamma", + lew: "Ledo Kaili", + lex: "Luang", + ley: "Lemolang", + lez: "Lezghian", + lfa: "Lefa", + lfn: "Lingua Franca Nova", + lga: "Lungga", + lgb: "Laghu", + lgg: "Lugbara", + lgh: "Laghuu", + lgi: "Lengilu", + lgk: "Lingarak", + lgl: "Wala", + lgm: "Lega-Mwenga", + lgn: "T'apo", + lgq: "Logba", + lgr: "Lengo", + lgt: "Pahi", + lgu: "Longgu", + lgz: "Ligenza", + lha: "Laha (Viet Nam)", + lhh: "Laha (Indonesia)", + lhi: "Lahu Shi", + lhl: "Lahul Lohar", + lhm: "Lhomi", + lhn: "Lahanan", + lhp: "Lhokpu", + lhs: "Mlahsö", + lht: "Lo-Toga", + lhu: "Lahu", + lia: "West-Central Limba", + lib: "Likum", + lic: "Hlai", + lid: "Nyindrou", + lie: "Likila", + lif: "Limbu", + lig: "Ligbi", + lih: "Lihir", + lij: "Ligurian", + lik: "Lika", + lil: "Lillooet", + lim: "Limburgan", + lin: "Lingala", + lio: "Liki", + lip: "Sekpele", + liq: "Libido", + lir: "Liberian English", + lis: "Lisu", + lit: "Lithuanian", + liu: "Logorik", + liv: "Liv", + liw: "Col", + lix: "Liabuku", + liy: "Banda-Bambari", + liz: "Libinza", + lja: "Golpa", + lje: "Rampi", + lji: "Laiyolo", + ljl: "Li'o", + ljp: "Lampung Api", + ljw: "Yirandali", + ljx: "Yuru", + lka: "Lakalei", + lkb: "Kabras", + lkc: "Kucong", + lkd: "Lakondê", + lke: "Kenyi", + lkh: "Lakha", + lki: "Laki", + lkj: "Remun", + lkl: "Laeko-Libuat", + lkm: "Kalaamaya", + lkn: "Lakon", + lko: "Khayo", + lkr: "Päri", + lks: "Kisa", + lkt: "Lakota", + lku: "Kungkari", + lky: "Lokoya", + lla: "Lala-Roba", + llb: "Lolo", + llc: "Lele (Guinea)", + lld: "Ladin", + lle: "Lele (Papua New Guinea)", + llf: "Hermit", + llg: "Lole", + llh: "Lamu", + lli: "Teke-Laali", + llj: "Ladji Ladji", + llk: "Lelak", + lll: "Lilau", + llm: "Lasalimu", + lln: "Lele (Chad)", + llo: "Khlor", + llp: "North Efate", + llq: "Lolak", + lls: "Lithuanian Sign Language", + llu: "Lau", + llx: "Lauan", + lma: "East Limba", + lmb: "Merei", + lmc: "Limilngan", + lmd: "Lumun", + lme: "Pévé", + lmf: "South Lembata", + lmg: "Lamogai", + lmh: "Lambichhong", + lmi: "Lombi", + lmj: "West Lembata", + lmk: "Lamkang", + lml: "Hano", + lmn: "Lambadi", + lmo: "Lombard", + lmp: "Limbum", + lmq: "Lamatuka", + lmr: "Lamalera", + lmu: "Lamenu", + lmv: "Lomaiviti", + lmw: "Lake Miwok", + lmx: "Laimbue", + lmy: "Lamboya", + lmz: "Lumbee", + lna: "Langbashe", + lnb: "Mbalanhu", + lnd: "Lundayeh", + lng: "Langobardic", + lnh: "Lanoh", + lni: "Daantanai'", + lnj: "Leningitij", + lnl: "South Central Banda", + lnm: "Langam", + lnn: "Lorediakarkar", + lno: "Lango (Sudan)", + lns: "Lamnso'", + lnu: "Longuda", + lnw: "Lanima", + lnz: "Lonzo", + loa: "Loloda", + lob: "Lobi", + loc: "Inonhan", + loe: "Saluan", + lof: "Logol", + log: "Logo", + loh: "Narim", + loi: "Loma (Côte d'Ivoire)", + loj: "Lou", + lok: "Loko", + lol: "Mongo", + lom: "Loma (Liberia)", + lon: "Malawi Lomwe", + loo: "Lombo", + lop: "Lopa", + loq: "Lobala", + lor: "Téén", + los: "Loniu", + lot: "Otuho", + lou: "Louisiana Creole", + lov: "Lopi", + low: "Tampias Lobu", + lox: "Loun", + loy: "Loke", + loz: "Lozi", + lpa: "Lelepa", + lpe: "Lepki", + lpn: "Long Phuri Naga", + lpo: "Lipo", + lpx: "Lopit", + lra: "Rara Bakati'", + lrc: "Northern Luri", + lre: "Laurentian", + lrg: "Laragia", + lri: "Marachi", + lrk: "Loarki", + lrl: "Lari", + lrm: "Marama", + lrn: "Lorang", + lro: "Laro", + lrr: "Southern Yamphu", + lrt: "Larantuka Malay", + lrv: "Larevat", + lrz: "Lemerig", + lsa: "Lasgerdi", + lsd: "Lishana Deni", + lse: "Lusengo", + lsg: "Lyons Sign Language", + lsh: "Lish", + lsi: "Lashi", + lsl: "Latvian Sign Language", + lsm: "Saamia", + lso: "Laos Sign Language", + lsp: "Panamanian Sign Language", + lsr: "Aruop", + lss: "Lasi", + lst: "Trinidad and Tobago Sign Language", + lsy: "Mauritian Sign Language", + ltc: "Late Middle Chinese", + ltg: "Latgalian", + lth: "Thur", + lti: "Leti (Indonesia)", + ltn: "Latundê", + lto: "Tsotso", + lts: "Tachoni", + ltu: "Latu", + ltz: "Luxembourgish", + lua: "Luba-Lulua", + lub: "Luba-Katanga", + luc: "Aringa", + lud: "Ludian", + lue: "Luvale", + luf: "Laua", + lug: "Ganda", + lui: "Luiseno", + luj: "Luna", + luk: "Lunanakha", + lul: "Olu'bo", + lum: "Luimbi", + lun: "Lunda", + luo: "Luo (Kenya and Tanzania)", + lup: "Lumbu", + luq: "Lucumi", + lur: "Laura", + lus: "Lushai", + lut: "Lushootseed", + luu: "Lumba-Yakkha", + luv: "Luwati", + luw: "Luo (Cameroon)", + luy: "Luyia", + luz: "Southern Luri", + lva: "Maku'a", + lvk: "Lavukaleve", + lvs: "Standard Latvian", + lvu: "Levuka", + lwa: "Lwalu", + lwe: "Lewo Eleng", + lwg: "Wanga", + lwh: "White Lachi", + lwl: "Eastern Lawa", + lwm: "Laomian", + lwo: "Luwo", + lwt: "Lewotobi", + lwu: "Lawu", + lww: "Lewo", + lya: "Layakha", + lyg: "Lyngngam", + lyn: "Luyana", + lzh: "Literary Chinese", + lzl: "Litzlitz", + lzn: "Leinong Naga", + lzz: "Laz", + maa: "San Jerónimo Tecóatl Mazatec", + mab: "Yutanduchi Mixtec", + mad: "Madurese", + mae: "Bo-Rukul", + maf: "Mafa", + mag: "Magahi", + mah: "Marshallese", + mai: "Maithili", + maj: "Jalapa De Díaz Mazatec", + mak: "Makasar", + mal: "Malayalam", + mam: "Mam", + man: "Mandingo", + maq: "Chiquihuitlán Mazatec", + mar: "Marathi", + mas: "Masai", + mat: "San Francisco Matlatzinca", + mau: "Huautla Mazatec", + mav: "Sateré-Mawé", + maw: "Mampruli", + max: "North Moluccan Malay", + maz: "Central Mazahua", + mba: "Higaonon", + mbb: "Western Bukidnon Manobo", + mbc: "Macushi", + mbd: "Dibabawon Manobo", + mbe: "Molale", + mbf: "Baba Malay", + mbh: "Mangseng", + mbi: "Ilianen Manobo", + mbj: "Nadëb", + mbk: "Malol", + mbl: "Maxakalí", + mbm: "Ombamba", + mbn: "Macaguán", + mbo: "Mbo (Cameroon)", + mbp: "Malayo", + mbq: "Maisin", + mbr: "Nukak Makú", + mbs: "Sarangani Manobo", + mbt: "Matigsalug Manobo", + mbu: "Mbula-Bwazza", + mbv: "Mbulungish", + mbw: "Maring", + mbx: "Mari (East Sepik Province)", + mby: "Memoni", + mbz: "Amoltepec Mixtec", + mca: "Maca", + mcb: "Machiguenga", + mcc: "Bitur", + mcd: "Sharanahua", + mce: "Itundujia Mixtec", + mcf: "Matsés", + mcg: "Mapoyo", + mch: "Maquiritari", + mci: "Mese", + mcj: "Mvanip", + mck: "Mbunda", + mcl: "Macaguaje", + mcm: "Malaccan Creole Portuguese", + mcn: "Masana", + mco: "Coatlán Mixe", + mcp: "Makaa", + mcq: "Ese", + mcr: "Menya", + mcs: "Mambai", + mct: "Mengisa", + mcu: "Cameroon Mambila", + mcv: "Minanibai", + mcw: "Mawa (Chad)", + mcx: "Mpiemo", + mcy: "South Watut", + mcz: "Mawan", + mda: "Mada (Nigeria)", + mdb: "Morigi", + mdc: "Male (Papua New Guinea)", + mdd: "Mbum", + mde: "Maba (Chad)", + mdf: "Moksha", + mdg: "Massalat", + mdh: "Maguindanaon", + mdi: "Mamvu", + mdj: "Mangbetu", + mdk: "Mangbutu", + mdl: "Maltese Sign Language", + mdm: "Mayogo", + mdn: "Mbati", + mdp: "Mbala", + mdq: "Mbole", + mdr: "Mandar", + mds: "Maria (Papua New Guinea)", + mdt: "Mbere", + mdu: "Mboko", + mdv: "Santa Lucía Monteverde Mixtec", + mdw: "Mbosi", + mdx: "Dizin", + mdy: "Male (Ethiopia)", + mdz: "Suruí Do Pará", + mea: "Menka", + meb: "Ikobi", + mec: "Mara", + med: "Melpa", + mee: "Mengen", + mef: "Megam", + meh: "Southwestern Tlaxiaco Mixtec", + mei: "Midob", + mej: "Meyah", + mek: "Mekeo", + mel: "Central Melanau", + mem: "Mangala", + men: "Mende (Sierra Leone)", + meo: "Kedah Malay", + mep: "Miriwung", + meq: "Merey", + mer: "Meru", + mes: "Masmaje", + met: "Mato", + meu: "Motu", + mev: "Mano", + mew: "Maaka", + mey: "Hassaniyya", + mez: "Menominee", + mfa: "Pattani Malay", + mfb: "Bangka", + mfc: "Mba", + mfd: "Mendankwe-Nkwen", + mfe: "Morisyen", + mff: "Naki", + mfg: "Mogofin", + mfh: "Matal", + mfi: "Wandala", + mfj: "Mefele", + mfk: "North Mofu", + mfl: "Putai", + mfm: "Marghi South", + mfn: "Cross River Mbembe", + mfo: "Mbe", + mfp: "Makassar Malay", + mfq: "Moba", + mfr: "Marithiel", + mfs: "Mexican Sign Language", + mft: "Mokerang", + mfu: "Mbwela", + mfv: "Mandjak", + mfw: "Mulaha", + mfx: "Melo", + mfy: "Mayo", + mfz: "Mabaan", + mga: "Middle Irish (900-1200)", + mgb: "Mararit", + mgc: "Morokodo", + mgd: "Moru", + mge: "Mango", + mgf: "Maklew", + mgg: "Mpumpong", + mgh: "Makhuwa-Meetto", + mgi: "Lijili", + mgj: "Abureni", + mgk: "Mawes", + mgl: "Maleu-Kilenge", + mgm: "Mambae", + mgn: "Mbangi", + mgo: "Meta'", + mgp: "Eastern Magar", + mgq: "Malila", + mgr: "Mambwe-Lungu", + mgs: "Manda (Tanzania)", + mgt: "Mongol", + mgu: "Mailu", + mgv: "Matengo", + mgw: "Matumbi", + mgy: "Mbunga", + mgz: "Mbugwe", + mha: "Manda (India)", + mhb: "Mahongwe", + mhc: "Mocho", + mhd: "Mbugu", + mhe: "Besisi", + mhf: "Mamaa", + mhg: "Margu", + mhi: "Ma'di", + mhj: "Mogholi", + mhk: "Mungaka", + mhl: "Mauwake", + mhm: "Makhuwa-Moniga", + mhn: "Mócheno", + mho: "Mashi (Zambia)", + mhp: "Balinese Malay", + mhq: "Mandan", + mhr: "Eastern Mari", + mhs: "Buru (Indonesia)", + mht: "Mandahuaca", + mhu: "Digaro-Mishmi", + mhw: "Mbukushu", + mhx: "Maru", + mhy: "Ma'anyan", + mhz: "Mor (Mor Islands)", + mia: "Miami", + mib: "Atatláhuca Mixtec", + mic: "Mi'kmaq", + mid: "Mandaic", + mie: "Ocotepec Mixtec", + mif: "Mofu-Gudur", + mig: "San Miguel El Grande Mixtec", + mih: "Chayuco Mixtec", + mii: "Chigmecatitlán Mixtec", + mij: "Abar", + mik: "Mikasuki", + mil: "Peñoles Mixtec", + mim: "Alacatlatzala Mixtec", + min: "Minangkabau", + mio: "Pinotepa Nacional Mixtec", + mip: "Apasco-Apoala Mixtec", + miq: "Mískito", + mir: "Isthmus Mixe", + mis: "Uncoded languages", + mit: "Southern Puebla Mixtec", + miu: "Cacaloxtepec Mixtec", + miw: "Akoye", + mix: "Mixtepec Mixtec", + miy: "Ayutla Mixtec", + miz: "Coatzospan Mixtec", + mjb: "Makalero", + mjc: "San Juan Colorado Mixtec", + mjd: "Northwest Maidu", + mje: "Muskum", + mjg: "Tu", + mjh: "Mwera (Nyasa)", + mji: "Kim Mun", + mjj: "Mawak", + mjk: "Matukar", + mjl: "Mandeali", + mjm: "Medebur", + mjn: "Ma (Papua New Guinea)", + mjo: "Malankuravan", + mjp: "Malapandaram", + mjq: "Malaryan", + mjr: "Malavedan", + mjs: "Miship", + mjt: "Sauria Paharia", + mju: "Manna-Dora", + mjv: "Mannan", + mjw: "Karbi", + mjx: "Mahali", + mjy: "Mahican", + mjz: "Majhi", + mka: "Mbre", + mkb: "Mal Paharia", + mkc: "Siliput", + mkd: "Macedonian", + mke: "Mawchi", + mkf: "Miya", + mkg: "Mak (China)", + mki: "Dhatki", + mkj: "Mokilese", + mkk: "Byep", + mkl: "Mokole", + mkm: "Moklen", + mkn: "Kupang Malay", + mko: "Mingang Doso", + mkp: "Moikodi", + mkq: "Bay Miwok", + mkr: "Malas", + mks: "Silacayoapan Mixtec", + mkt: "Vamale", + mku: "Konyanka Maninka", + mkv: "Mafea", + mkw: "Kituba (Congo)", + mkx: "Kinamiging Manobo", + mky: "East Makian", + mkz: "Makasae", + mla: "Malo", + mlb: "Mbule", + mlc: "Cao Lan", + mle: "Manambu", + mlf: "Mal", + mlg: "Malagasy", + mlh: "Mape", + mli: "Malimpung", + mlj: "Miltu", + mlk: "Ilwana", + mll: "Malua Bay", + mlm: "Mulam", + mln: "Malango", + mlo: "Mlomp", + mlp: "Bargam", + mlq: "Western Maninkakan", + mlr: "Vame", + mls: "Masalit", + mlt: "Maltese", + mlu: "To'abaita", + mlv: "Motlav", + mlw: "Moloko", + mlx: "Malfaxal", + mlz: "Malaynon", + mma: "Mama", + mmb: "Momina", + mmc: "Michoacán Mazahua", + mmd: "Maonan", + mme: "Mae", + mmf: "Mundat", + mmg: "North Ambrym", + mmh: "Mehináku", + mmi: "Musar", + mmj: "Majhwar", + mmk: "Mukha-Dora", + mml: "Man Met", + mmm: "Maii", + mmn: "Mamanwa", + mmo: "Mangga Buang", + mmp: "Siawi", + mmq: "Musak", + mmr: "Western Xiangxi Miao", + mmt: "Malalamai", + mmu: "Mmaala", + mmv: "Miriti", + mmw: "Emae", + mmx: "Madak", + mmy: "Migaama", + mmz: "Mabaale", + mna: "Mbula", + mnb: "Muna", + mnc: "Manchu", + mnd: "Mondé", + mne: "Naba", + mnf: "Mundani", + mng: "Eastern Mnong", + mnh: "Mono (Democratic Republic of Congo)", + mni: "Manipuri", + mnj: "Munji", + mnk: "Mandinka", + mnl: "Tiale", + mnm: "Mapena", + mnn: "Southern Mnong", + mnp: "Min Bei Chinese", + mnq: "Minriq", + mnr: "Mono (USA)", + mns: "Mansi", + mnu: "Mer", + mnv: "Rennell-Bellona", + mnw: "Mon", + mnx: "Manikion", + mny: "Manyawa", + mnz: "Moni", + moa: "Mwan", + moc: "Mocoví", + mod: "Mobilian", + moe: "Montagnais", + mog: "Mongondow", + moh: "Mohawk", + moi: "Mboi", + moj: "Monzombo", + mok: "Morori", + mom: "Mangue", + mon: "Mongolian", + moo: "Monom", + mop: "Mopán Maya", + moq: "Mor (Bomberai Peninsula)", + mor: "Moro", + mos: "Mossi", + mot: "Barí", + mou: "Mogum", + mov: "Mohave", + mow: "Moi (Congo)", + mox: "Molima", + moy: "Shekkacho", + moz: "Mukulu", + mpa: "Mpoto", + mpb: "Mullukmulluk", + mpc: "Mangarayi", + mpd: "Machinere", + mpe: "Majang", + mpg: "Marba", + mph: "Maung", + mpi: "Mpade", + mpj: "Martu Wangka", + mpk: "Mbara (Chad)", + mpl: "Middle Watut", + mpm: "Yosondúa Mixtec", + mpn: "Mindiri", + mpo: "Miu", + mpp: "Migabac", + mpq: "Matís", + mpr: "Vangunu", + mps: "Dadibi", + mpt: "Mian", + mpu: "Makuráp", + mpv: "Mungkip", + mpw: "Mapidian", + mpx: "Misima-Panaeati", + mpy: "Mapia", + mpz: "Mpi", + mqa: "Maba (Indonesia)", + mqb: "Mbuko", + mqc: "Mangole", + mqe: "Matepi", + mqf: "Momuna", + mqg: "Kota Bangun Kutai Malay", + mqh: "Tlazoyaltepec Mixtec", + mqi: "Mariri", + mqj: "Mamasa", + mqk: "Rajah Kabunsuwan Manobo", + mql: "Mbelime", + mqm: "South Marquesan", + mqn: "Moronene", + mqo: "Modole", + mqp: "Manipa", + mqq: "Minokok", + mqr: "Mander", + mqs: "West Makian", + mqt: "Mok", + mqu: "Mandari", + mqv: "Mosimo", + mqw: "Murupi", + mqx: "Mamuju", + mqy: "Manggarai", + mqz: "Pano", + mra: "Mlabri", + mrb: "Marino", + mrc: "Maricopa", + mrd: "Western Magar", + mre: "Martha's Vineyard Sign Language", + mrf: "Elseng", + mrg: "Mising", + mrh: "Mara Chin", + mri: "Maori", + mrj: "Western Mari", + mrk: "Hmwaveke", + mrl: "Mortlockese", + mrm: "Merlav", + mrn: "Cheke Holo", + mro: "Mru", + mrp: "Morouas", + mrq: "North Marquesan", + mrr: "Maria (India)", + mrs: "Maragus", + mrt: "Marghi Central", + mru: "Mono (Cameroon)", + mrv: "Mangareva", + mrw: "Maranao", + mrx: "Maremgi", + mry: "Mandaya", + mrz: "Marind", + msa: "Malay (macrolanguage)", + msb: "Masbatenyo", + msc: "Sankaran Maninka", + msd: "Yucatec Maya Sign Language", + mse: "Musey", + msf: "Mekwei", + msg: "Moraid", + msh: "Masikoro Malagasy", + msi: "Sabah Malay", + msj: "Ma (Democratic Republic of Congo)", + msk: "Mansaka", + msl: "Molof", + msm: "Agusan Manobo", + msn: "Vurës", + mso: "Mombum", + msp: "Maritsauá", + msq: "Caac", + msr: "Mongolian Sign Language", + mss: "West Masela", + msu: "Musom", + msv: "Maslam", + msw: "Mansoanka", + msx: "Moresada", + msy: "Aruamu", + msz: "Momare", + mta: "Cotabato Manobo", + mtb: "Anyin Morofo", + mtc: "Munit", + mtd: "Mualang", + mte: "Mono (Solomon Islands)", + mtf: "Murik (Papua New Guinea)", + mtg: "Una", + mth: "Munggui", + mti: "Maiwa (Papua New Guinea)", + mtj: "Moskona", + mtk: "Mbe'", + mtl: "Montol", + mtm: "Mator", + mtn: "Matagalpa", + mto: "Totontepec Mixe", + mtp: "Wichí Lhamtés Nocten", + mtq: "Muong", + mtr: "Mewari", + mts: "Yora", + mtt: "Mota", + mtu: "Tututepec Mixtec", + mtv: "Asaro'o", + mtw: "Southern Binukidnon", + mtx: "Tidaá Mixtec", + mty: "Nabi", + mua: "Mundang", + mub: "Mubi", + muc: "Ajumbu", + mud: "Mednyj Aleut", + mue: "Media Lengua", + mug: "Musgu", + muh: "Mündü", + mui: "Musi", + muj: "Mabire", + muk: "Mugom", + mul: "Multiple languages", + mum: "Maiwala", + muo: "Nyong", + mup: "Malvi", + muq: "Eastern Xiangxi Miao", + mur: "Murle", + mus: "Creek", + mut: "Western Muria", + muu: "Yaaku", + muv: "Muthuvan", + mux: "Bo-Ung", + muy: "Muyang", + muz: "Mursi", + mva: "Manam", + mvb: "Mattole", + mvd: "Mamboru", + mve: "Marwari (Pakistan)", + mvf: "Peripheral Mongolian", + mvg: "Yucuañe Mixtec", + mvh: "Mulgi", + mvi: "Miyako", + mvk: "Mekmek", + mvl: "Mbara (Australia)", + mvm: "Muya", + mvn: "Minaveha", + mvo: "Marovo", + mvp: "Duri", + mvq: "Moere", + mvr: "Marau", + mvs: "Massep", + mvt: "Mpotovoro", + mvu: "Marfa", + mvv: "Tagal Murut", + mvw: "Machinga", + mvx: "Meoswar", + mvy: "Indus Kohistani", + mvz: "Mesqan", + mwa: "Mwatebu", + mwb: "Juwal", + mwc: "Are", + mwe: "Mwera (Chimwera)", + mwf: "Murrinh-Patha", + mwg: "Aiklep", + mwh: "Mouk-Aria", + mwi: "Labo", + mwk: "Kita Maninkakan", + mwl: "Mirandese", + mwm: "Sar", + mwn: "Nyamwanga", + mwo: "Central Maewo", + mwp: "Kala Lagaw Ya", + mwq: "Mün Chin", + mwr: "Marwari", + mws: "Mwimbi-Muthambi", + mwt: "Moken", + mwu: "Mittu", + mwv: "Mentawai", + mww: "Hmong Daw", + mwx: "Mediak", + mwy: "Mosiro", + mwz: "Moingi", + mxa: "Northwest Oaxaca Mixtec", + mxb: "Tezoatlán Mixtec", + mxc: "Manyika", + mxd: "Modang", + mxe: "Mele-Fila", + mxf: "Malgbe", + mxg: "Mbangala", + mxh: "Mvuba", + mxi: "Mozarabic", + mxj: "Miju-Mishmi", + mxk: "Monumbo", + mxl: "Maxi Gbe", + mxm: "Meramera", + mxn: "Moi (Indonesia)", + mxo: "Mbowe", + mxp: "Tlahuitoltepec Mixe", + mxq: "Juquila Mixe", + mxr: "Murik (Malaysia)", + mxs: "Huitepec Mixtec", + mxt: "Jamiltepec Mixtec", + mxu: "Mada (Cameroon)", + mxv: "Metlatónoc Mixtec", + mxw: "Namo", + mxx: "Mahou", + mxy: "Southeastern Nochixtlán Mixtec", + mxz: "Central Masela", + mya: "Burmese", + myb: "Mbay", + myc: "Mayeka", + myd: "Maramba", + mye: "Myene", + myf: "Bambassi", + myg: "Manta", + myh: "Makah", + myi: "Mina (India)", + myj: "Mangayat", + myk: "Mamara Senoufo", + myl: "Moma", + mym: "Me'en", + myo: "Anfillo", + myp: "Pirahã", + myr: "Muniche", + mys: "Mesmes", + myu: "Mundurukú", + myv: "Erzya", + myw: "Muyuw", + myx: "Masaaba", + myy: "Macuna", + myz: "Classical Mandaic", + mza: "Santa María Zacatepec Mixtec", + mzb: "Tumzabt", + mzc: "Madagascar Sign Language", + mzd: "Malimba", + mze: "Morawa", + mzg: "Monastic Sign Language", + mzh: "Wichí Lhamtés Güisnay", + mzi: "Ixcatlán Mazatec", + mzj: "Manya", + mzk: "Nigeria Mambila", + mzl: "Mazatlán Mixe", + mzm: "Mumuye", + mzn: "Mazanderani", + mzo: "Matipuhy", + mzp: "Movima", + mzq: "Mori Atas", + mzr: "Marúbo", + mzs: "Macanese", + mzt: "Mintil", + mzu: "Inapang", + mzv: "Manza", + mzw: "Deg", + mzx: "Mawayana", + mzy: "Mozambican Sign Language", + mzz: "Maiadomu", + naa: "Namla", + nab: "Southern Nambikuára", + nac: "Narak", + nae: "Naka'ela", + naf: "Nabak", + nag: "Naga Pidgin", + naj: "Nalu", + nak: "Nakanai", + nal: "Nalik", + nam: "Ngan'gityemerri", + nan: "Min Nan Chinese", + nao: "Naaba", + nap: "Neapolitan", + naq: "Khoekhoe", + nar: "Iguta", + nas: "Naasioi", + nat: "Ca̱hungwa̱rya̱", + nau: "Nauru", + nav: "Navajo", + naw: "Nawuri", + nax: "Nakwi", + nay: "Narrinyeri", + naz: "Coatepec Nahuatl", + nba: "Nyemba", + nbb: "Ndoe", + nbc: "Chang Naga", + nbd: "Ngbinda", + nbe: "Konyak Naga", + nbg: "Nagarchal", + nbh: "Ngamo", + nbi: "Mao Naga", + nbj: "Ngarinman", + nbk: "Nake", + nbl: "South Ndebele", + nbm: "Ngbaka Ma'bo", + nbn: "Kuri", + nbo: "Nkukoli", + nbp: "Nnam", + nbq: "Nggem", + nbr: "Numana-Nunku-Gbantu-Numbu", + nbs: "Namibian Sign Language", + nbt: "Na", + nbu: "Rongmei Naga", + nbv: "Ngamambo", + nbw: "Southern Ngbandi", + nby: "Ningera", + nca: "Iyo", + ncb: "Central Nicobarese", + ncc: "Ponam", + ncd: "Nachering", + nce: "Yale", + ncf: "Notsi", + ncg: "Nisga'a", + nch: "Central Huasteca Nahuatl", + nci: "Classical Nahuatl", + ncj: "Northern Puebla Nahuatl", + nck: "Nakara", + ncl: "Michoacán Nahuatl", + ncm: "Nambo", + ncn: "Nauna", + nco: "Sibe", + ncp: "Ndaktup", + ncq: "Northern Katang", + ncr: "Ncane", + ncs: "Nicaraguan Sign Language", + nct: "Chothe Naga", + ncu: "Chumburung", + ncx: "Central Puebla Nahuatl", + ncz: "Natchez", + nda: "Ndasa", + ndb: "Kenswei Nsei", + ndc: "Ndau", + ndd: "Nde-Nsele-Nta", + nde: "North Ndebele", + ndf: "Nadruvian", + ndg: "Ndengereko", + ndh: "Ndali", + ndi: "Samba Leko", + ndj: "Ndamba", + ndk: "Ndaka", + ndl: "Ndolo", + ndm: "Ndam", + ndn: "Ngundi", + ndo: "Ndonga", + ndp: "Ndo", + ndq: "Ndombe", + ndr: "Ndoola", + nds: "Low German", + ndt: "Ndunga", + ndu: "Dugun", + ndv: "Ndut", + ndw: "Ndobo", + ndx: "Nduga", + ndy: "Lutos", + ndz: "Ndogo", + nea: "Eastern Ngad'a", + neb: "Toura (Côte d'Ivoire)", + nec: "Nedebang", + ned: "Nde-Gbite", + nee: "Nêlêmwa-Nixumwak", + nef: "Nefamese", + neg: "Negidal", + neh: "Nyenkha", + nei: "Neo-Hittite", + nej: "Neko", + nek: "Neku", + nem: "Nemi", + nen: "Nengone", + neo: "Ná-Meo", + nep: "Nepali (macrolanguage)", + neq: "North Central Mixe", + ner: "Yahadian", + nes: "Bhoti Kinnauri", + net: "Nete", + neu: "Neo", + nev: "Nyaheun", + new: "Newari", + nex: "Neme", + ney: "Neyo", + nez: "Nez Perce", + nfa: "Dhao", + nfd: "Ahwai", + nfl: "Ayiwo", + nfr: "Nafaanra", + nfu: "Mfumte", + nga: "Ngbaka", + ngb: "Northern Ngbandi", + ngc: "Ngombe (Democratic Republic of Congo)", + ngd: "Ngando (Central African Republic)", + nge: "Ngemba", + ngg: "Ngbaka Manza", + ngh: "N/u", + ngi: "Ngizim", + ngj: "Ngie", + ngk: "Dalabon", + ngl: "Lomwe", + ngm: "Ngatik Men's Creole", + ngn: "Ngwo", + ngo: "Ngoni", + ngp: "Ngulu", + ngq: "Ngurimi", + ngr: "Engdewu", + ngs: "Gvoko", + ngt: "Kriang", + ngu: "Guerrero Nahuatl", + ngv: "Nagumi", + ngw: "Ngwaba", + ngx: "Nggwahyi", + ngy: "Tibea", + ngz: "Ngungwel", + nha: "Nhanda", + nhb: "Beng", + nhc: "Tabasco Nahuatl", + nhd: "Chiripá", + nhe: "Eastern Huasteca Nahuatl", + nhf: "Nhuwala", + nhg: "Tetelcingo Nahuatl", + nhh: "Nahari", + nhi: "Zacatlán-Ahuacatlán-Tepetzintla Nahuatl", + nhk: "Isthmus-Cosoleacaque Nahuatl", + nhm: "Morelos Nahuatl", + nhn: "Central Nahuatl", + nho: "Takuu", + nhp: "Isthmus-Pajapan Nahuatl", + nhq: "Huaxcaleca Nahuatl", + nhr: "Naro", + nht: "Ometepec Nahuatl", + nhu: "Noone", + nhv: "Temascaltepec Nahuatl", + nhw: "Western Huasteca Nahuatl", + nhx: "Isthmus-Mecayapan Nahuatl", + nhy: "Northern Oaxaca Nahuatl", + nhz: "Santa María La Alta Nahuatl", + nia: "Nias", + nib: "Nakame", + nid: "Ngandi", + nie: "Niellim", + nif: "Nek", + nig: "Ngalakan", + nih: "Nyiha (Tanzania)", + nii: "Nii", + nij: "Ngaju", + nik: "Southern Nicobarese", + nil: "Nila", + nim: "Nilamba", + nin: "Ninzo", + nio: "Nganasan", + niq: "Nandi", + nir: "Nimboran", + nis: "Nimi", + nit: "Southeastern Kolami", + niu: "Niuean", + niv: "Gilyak", + niw: "Nimo", + nix: "Hema", + niy: "Ngiti", + niz: "Ningil", + nja: "Nzanyi", + njb: "Nocte Naga", + njd: "Ndonde Hamba", + njh: "Lotha Naga", + nji: "Gudanji", + njj: "Njen", + njl: "Njalgulgule", + njm: "Angami Naga", + njn: "Liangmai Naga", + njo: "Ao Naga", + njr: "Njerep", + njs: "Nisa", + njt: "Ndyuka-Trio Pidgin", + nju: "Ngadjunmaya", + njx: "Kunyi", + njy: "Njyem", + njz: "Nyishi", + nka: "Nkoya", + nkb: "Khoibu Naga", + nkc: "Nkongho", + nkd: "Koireng", + nke: "Duke", + nkf: "Inpui Naga", + nkg: "Nekgini", + nkh: "Khezha Naga", + nki: "Thangal Naga", + nkj: "Nakai", + nkk: "Nokuku", + nkm: "Namat", + nkn: "Nkangala", + nko: "Nkonya", + nkp: "Niuatoputapu", + nkq: "Nkami", + nkr: "Nukuoro", + nks: "North Asmat", + nkt: "Nyika (Tanzania)", + nku: "Bouna Kulango", + nkv: "Nyika (Malawi and Zambia)", + nkw: "Nkutu", + nkx: "Nkoroo", + nkz: "Nkari", + nla: "Ngombale", + nlc: "Nalca", + nld: "Dutch", + nle: "East Nyala", + nlg: "Gela", + nli: "Grangali", + nlj: "Nyali", + nlk: "Ninia Yali", + nll: "Nihali", + nlo: "Ngul", + nlq: "Lao Naga", + nlu: "Nchumbulu", + nlv: "Orizaba Nahuatl", + nlw: "Walangama", + nlx: "Nahali", + nly: "Nyamal", + nlz: "Nalögo", + nma: "Maram Naga", + nmb: "Big Nambas", + nmc: "Ngam", + nmd: "Ndumu", + nme: "Mzieme Naga", + nmf: "Tangkhul Naga (India)", + nmg: "Kwasio", + nmh: "Monsang Naga", + nmi: "Nyam", + nmj: "Ngombe (Central African Republic)", + nmk: "Namakura", + nml: "Ndemli", + nmm: "Manangba", + nmn: "!Xóõ", + nmo: "Moyon Naga", + nmp: "Nimanbur", + nmq: "Nambya", + nmr: "Nimbari", + nms: "Letemboi", + nmt: "Namonuito", + nmu: "Northeast Maidu", + nmv: "Ngamini", + nmw: "Nimoa", + nmx: "Nama (Papua New Guinea)", + nmy: "Namuyi", + nmz: "Nawdm", + nna: "Nyangumarta", + nnb: "Nande", + nnc: "Nancere", + nnd: "West Ambae", + nne: "Ngandyera", + nnf: "Ngaing", + nng: "Maring Naga", + nnh: "Ngiemboon", + nni: "North Nuaulu", + nnj: "Nyangatom", + nnk: "Nankina", + nnl: "Northern Rengma Naga", + nnm: "Namia", + nnn: "Ngete", + nno: "Norwegian Nynorsk", + nnp: "Wancho Naga", + nnq: "Ngindo", + nnr: "Narungga", + nns: "Ningye", + nnt: "Nanticoke", + nnu: "Dwang", + nnv: "Nugunu (Australia)", + nnw: "Southern Nuni", + nny: "Nyangga", + nnz: "Nda'nda'", + noa: "Woun Meu", + nob: "Norwegian Bokmål", + noc: "Nuk", + nod: "Northern Thai", + noe: "Nimadi", + nof: "Nomane", + nog: "Nogai", + noh: "Nomu", + noi: "Noiri", + noj: "Nonuya", + nok: "Nooksack", + nol: "Nomlaki", + nom: "Nocamán", + non: "Old Norse", + nop: "Numanggang", + noq: "Ngongo", + nor: "Norwegian", + nos: "Eastern Nisu", + not: "Nomatsiguenga", + nou: "Ewage-Notu", + nov: "Novial", + now: "Nyambo", + noy: "Noy", + noz: "Nayi", + npa: "Nar Phu", + npb: "Nupbikha", + npg: "Ponyo-Gongwang Naga", + nph: "Phom Naga", + npi: "Nepali (individual language)", + npl: "Southeastern Puebla Nahuatl", + npn: "Mondropolon", + npo: "Pochuri Naga", + nps: "Nipsan", + npu: "Puimei Naga", + npx: "Noipx", + npy: "Napu", + nqg: "Southern Nago", + nqk: "Kura Ede Nago", + nql: "Ngendelengo", + nqm: "Ndom", + nqn: "Nen", + nqo: "N'Ko", + nqq: "Kyan-Karyaw Naga", + nqy: "Akyaung Ari Naga", + nra: "Ngom", + nrb: "Nara", + nrc: "Noric", + nre: "Southern Rengma Naga", + nrf: "Jèrriais", + nrg: "Narango", + nri: "Chokri Naga", + nrk: "Ngarla", + nrl: "Ngarluma", + nrm: "Narom", + nrn: "Norn", + nrp: "North Picene", + nrr: "Norra", + nrt: "Northern Kalapuya", + nru: "Narua", + nrx: "Ngurmbur", + nrz: "Lala", + nsa: "Sangtam Naga", + nsc: "Nshi", + nsd: "Southern Nisu", + nse: "Nsenga", + nsf: "Northwestern Nisu", + nsg: "Ngasa", + nsh: "Ngoshie", + nsi: "Nigerian Sign Language", + nsk: "Naskapi", + nsl: "Norwegian Sign Language", + nsm: "Sumi Naga", + nsn: "Nehan", + nso: "Pedi", + nsp: "Nepalese Sign Language", + nsq: "Northern Sierra Miwok", + nsr: "Maritime Sign Language", + nss: "Nali", + nst: "Tase Naga", + nsu: "Sierra Negra Nahuatl", + nsv: "Southwestern Nisu", + nsw: "Navut", + nsx: "Nsongo", + nsy: "Nasal", + nsz: "Nisenan", + ntd: "Northern Tidung", + nte: "Nathembo", + ntg: "Ngantangarra", + nti: "Natioro", + ntj: "Ngaanyatjarra", + ntk: "Ikoma-Nata-Isenye", + ntm: "Nateni", + nto: "Ntomba", + ntp: "Northern Tepehuan", + ntr: "Delo", + ntu: "Natügu", + ntw: "Nottoway", + ntx: "Tangkhul Naga (Myanmar)", + nty: "Mantsi", + ntz: "Natanzi", + nua: "Yuanga", + nuc: "Nukuini", + nud: "Ngala", + nue: "Ngundu", + nuf: "Nusu", + nug: "Nungali", + nuh: "Ndunda", + nui: "Ngumbi", + nuj: "Nyole", + nuk: "Nuu-chah-nulth", + nul: "Nusa Laut", + num: "Niuafo'ou", + nun: "Anong", + nuo: "Nguôn", + nup: "Nupe-Nupe-Tako", + nuq: "Nukumanu", + nur: "Nukuria", + nus: "Nuer", + nut: "Nung (Viet Nam)", + nuu: "Ngbundu", + nuv: "Northern Nuni", + nuw: "Nguluwan", + nux: "Mehek", + nuy: "Nunggubuyu", + nuz: "Tlamacazapa Nahuatl", + nvh: "Nasarian", + nvm: "Namiae", + nvo: "Nyokon", + nwa: "Nawathinehena", + nwb: "Nyabwa", + nwc: "Classical Newari", + nwe: "Ngwe", + nwg: "Ngayawung", + nwi: "Southwest Tanna", + nwm: "Nyamusa-Molo", + nwo: "Nauo", + nwr: "Nawaru", + nwx: "Middle Newar", + nwy: "Nottoway-Meherrin", + nxa: "Nauete", + nxd: "Ngando (Democratic Republic of Congo)", + nxe: "Nage", + nxg: "Ngad'a", + nxi: "Nindi", + nxk: "Koki Naga", + nxl: "South Nuaulu", + nxm: "Numidian", + nxn: "Ngawun", + nxo: "Ndambomo", + nxq: "Naxi", + nxr: "Ninggerum", + nxu: "Narau", + nxx: "Nafri", + nya: "Nyanja", + nyb: "Nyangbo", + nyc: "Nyanga-li", + nyd: "Nyore", + nye: "Nyengo", + nyf: "Giryama", + nyg: "Nyindu", + nyh: "Nyigina", + nyi: "Ama (Sudan)", + nyj: "Nyanga", + nyk: "Nyaneka", + nyl: "Nyeu", + nym: "Nyamwezi", + nyn: "Nyankole", + nyo: "Nyoro", + nyp: "Nyang'i", + nyq: "Nayini", + nyr: "Nyiha (Malawi)", + nys: "Nyunga", + nyt: "Nyawaygi", + nyu: "Nyungwe", + nyv: "Nyulnyul", + nyw: "Nyaw", + nyx: "Nganyaywana", + nyy: "Nyakyusa-Ngonde", + nza: "Tigon Mbembe", + nzb: "Njebi", + nzi: "Nzima", + nzk: "Nzakara", + nzm: "Zeme Naga", + nzs: "New Zealand Sign Language", + nzu: "Teke-Nzikou", + nzy: "Nzakambay", + nzz: "Nanga Dama Dogon", + oaa: "Orok", + oac: "Oroch", + oar: "Old Aramaic (up to 700 BCE)", + oav: "Old Avar", + obi: "Obispeño", + obk: "Southern Bontok", + obl: "Oblo", + obm: "Moabite", + obo: "Obo Manobo", + obr: "Old Burmese", + obt: "Old Breton", + obu: "Obulom", + oca: "Ocaina", + och: "Old Chinese", + oci: "Occitan (post 1500)", + oco: "Old Cornish", + ocu: "Atzingo Matlatzinca", + oda: "Odut", + odk: "Od", + odt: "Old Dutch", + odu: "Odual", + ofo: "Ofo", + ofs: "Old Frisian", + ofu: "Efutop", + ogb: "Ogbia", + ogc: "Ogbah", + oge: "Old Georgian", + ogg: "Ogbogolo", + ogo: "Khana", + ogu: "Ogbronuagum", + oht: "Old Hittite", + ohu: "Old Hungarian", + oia: "Oirata", + oin: "Inebu One", + ojb: "Northwestern Ojibwa", + ojc: "Central Ojibwa", + ojg: "Eastern Ojibwa", + oji: "Ojibwa", + ojp: "Old Japanese", + ojs: "Severn Ojibwa", + ojv: "Ontong Java", + ojw: "Western Ojibwa", + oka: "Okanagan", + okb: "Okobo", + okd: "Okodia", + oke: "Okpe (Southwestern Edo)", + okg: "Koko Babangk", + okh: "Koresh-e Rostam", + oki: "Okiek", + okj: "Oko-Juwoi", + okk: "Kwamtim One", + okl: "Old Kentish Sign Language", + okm: "Middle Korean (10th-16th cent.)", + okn: "Oki-No-Erabu", + oko: "Old Korean (3rd-9th cent.)", + okr: "Kirike", + oks: "Oko-Eni-Osayen", + oku: "Oku", + okv: "Orokaiva", + okx: "Okpe (Northwestern Edo)", + ola: "Walungge", + old: "Mochi", + ole: "Olekha", + olk: "Olkol", + olm: "Oloma", + olo: "Livvi", + olr: "Olrat", + olt: "Old Lithuanian", + olu: "Kuvale", + oma: "Omaha-Ponca", + omb: "East Ambae", + omc: "Mochica", + omg: "Omagua", + omi: "Omi", + omk: "Omok", + oml: "Ombo", + omn: "Minoan", + omo: "Utarmbung", + omp: "Old Manipuri", + omr: "Old Marathi", + omt: "Omotik", + omu: "Omurano", + omw: "South Tairora", + omx: "Old Mon", + ona: "Ona", + onb: "Lingao", + one: "Oneida", + ong: "Olo", + oni: "Onin", + onj: "Onjob", + onk: "Kabore One", + onn: "Onobasulu", + ono: "Onondaga", + onp: "Sartang", + onr: "Northern One", + ons: "Ono", + ont: "Ontenu", + onu: "Unua", + onw: "Old Nubian", + onx: "Onin Based Pidgin", + ood: "Tohono O'odham", + oog: "Ong", + oon: "Önge", + oor: "Oorlams", + oos: "Old Ossetic", + opa: "Okpamheri", + opk: "Kopkaka", + opm: "Oksapmin", + opo: "Opao", + opt: "Opata", + opy: "Ofayé", + ora: "Oroha", + orc: "Orma", + ore: "Orejón", + org: "Oring", + orh: "Oroqen", + ori: "Oriya (macrolanguage)", + orm: "Oromo", + orn: "Orang Kanaq", + oro: "Orokolo", + orr: "Oruma", + ors: "Orang Seletar", + ort: "Adivasi Oriya", + oru: "Ormuri", + orv: "Old Russian", + orw: "Oro Win", + orx: "Oro", + ory: "Odia", + orz: "Ormu", + osa: "Osage", + osc: "Oscan", + osi: "Osing", + oso: "Ososo", + osp: "Old Spanish", + oss: "Ossetian", + ost: "Osatu", + osu: "Southern One", + osx: "Old Saxon", + ota: "Ottoman Turkish (1500-1928)", + otb: "Old Tibetan", + otd: "Ot Danum", + ote: "Mezquital Otomi", + oti: "Oti", + otk: "Old Turkish", + otl: "Tilapa Otomi", + otm: "Eastern Highland Otomi", + otn: "Tenango Otomi", + otq: "Querétaro Otomi", + otr: "Otoro", + ots: "Estado de México Otomi", + ott: "Temoaya Otomi", + otu: "Otuke", + otw: "Ottawa", + otx: "Texcatepec Otomi", + oty: "Old Tamil", + otz: "Ixtenco Otomi", + oua: "Tagargrent", + oub: "Glio-Oubi", + oue: "Oune", + oui: "Old Uighur", + oum: "Ouma", + ovd: "Elfdalian", + owi: "Owiniga", + owl: "Old Welsh", + oyb: "Oy", + oyd: "Oyda", + oym: "Wayampi", + oyy: "Oya'oya", + ozm: "Koonzime", + pab: "Parecís", + pac: "Pacoh", + pad: "Paumarí", + pae: "Pagibete", + paf: "Paranawát", + pag: "Pangasinan", + pah: "Tenharim", + pai: "Pe", + pak: "Parakanã", + pal: "Pahlavi", + pam: "Pampanga", + pan: "Panjabi", + pao: "Northern Paiute", + pap: "Papiamento", + paq: "Parya", + par: "Panamint", + pas: "Papasena", + pat: "Papitalai", + pau: "Palauan", + pav: "Pakaásnovos", + paw: "Pawnee", + pax: "Pankararé", + pay: "Pech", + paz: "Pankararú", + pbb: "Páez", + pbc: "Patamona", + pbe: "Mezontla Popoloca", + pbf: "Coyotepec Popoloca", + pbg: "Paraujano", + pbh: "E'ñapa Woromaipu", + pbi: "Parkwa", + pbl: "Mak (Nigeria)", + pbn: "Kpasam", + pbo: "Papel", + pbp: "Badyara", + pbr: "Pangwa", + pbs: "Central Pame", + pbt: "Southern Pashto", + pbu: "Northern Pashto", + pbv: "Pnar", + pby: "Pyu (Papua New Guinea)", + pca: "Santa Inés Ahuatempan Popoloca", + pcb: "Pear", + pcc: "Bouyei", + pcd: "Picard", + pce: "Ruching Palaung", + pcf: "Paliyan", + pcg: "Paniya", + pch: "Pardhan", + pci: "Duruwa", + pcj: "Parenga", + pck: "Paite Chin", + pcl: "Pardhi", + pcm: "Nigerian Pidgin", + pcn: "Piti", + pcp: "Pacahuara", + pcw: "Pyapun", + pda: "Anam", + pdc: "Pennsylvania German", + pdi: "Pa Di", + pdn: "Podena", + pdo: "Padoe", + pdt: "Plautdietsch", + pdu: "Kayan", + pea: "Peranakan Indonesian", + peb: "Eastern Pomo", + ped: "Mala (Papua New Guinea)", + pee: "Taje", + pef: "Northeastern Pomo", + peg: "Pengo", + peh: "Bonan", + pei: "Chichimeca-Jonaz", + pej: "Northern Pomo", + pek: "Penchal", + pel: "Pekal", + pem: "Phende", + peo: "Old Persian (ca. 600-400 B.C.)", + pep: "Kunja", + peq: "Southern Pomo", + pes: "Iranian Persian", + pev: "Pémono", + pex: "Petats", + pey: "Petjo", + pez: "Eastern Penan", + pfa: "Pááfang", + pfe: "Peere", + pfl: "Pfaelzisch", + pga: "Sudanese Creole Arabic", + pgd: "Gāndhārī", + pgg: "Pangwali", + pgi: "Pagi", + pgk: "Rerep", + pgl: "Primitive Irish", + pgn: "Paelignian", + pgs: "Pangseng", + pgu: "Pagu", + pgz: "Papua New Guinean Sign Language", + pha: "Pa-Hng", + phd: "Phudagi", + phg: "Phuong", + phh: "Phukha", + phk: "Phake", + phl: "Phalura", + phm: "Phimbi", + phn: "Phoenician", + pho: "Phunoi", + phq: "Phana'", + phr: "Pahari-Potwari", + pht: "Phu Thai", + phu: "Phuan", + phv: "Pahlavani", + phw: "Phangduwali", + pia: "Pima Bajo", + pib: "Yine", + pic: "Pinji", + pid: "Piaroa", + pie: "Piro", + pif: "Pingelapese", + pig: "Pisabo", + pih: "Pitcairn-Norfolk", + pii: "Pini", + pij: "Pijao", + pil: "Yom", + pim: "Powhatan", + pin: "Piame", + pio: "Piapoco", + pip: "Pero", + pir: "Piratapuyo", + pis: "Pijin", + pit: "Pitta Pitta", + piu: "Pintupi-Luritja", + piv: "Pileni", + piw: "Pimbwe", + pix: "Piu", + piy: "Piya-Kwonci", + piz: "Pije", + pjt: "Pitjantjatjara", + pka: "Ardhamāgadhī Prākrit", + pkb: "Pokomo", + pkc: "Paekche", + pkg: "Pak-Tong", + pkh: "Pankhu", + pkn: "Pakanha", + pko: "Pökoot", + pkp: "Pukapuka", + pkr: "Attapady Kurumba", + pks: "Pakistan Sign Language", + pkt: "Maleng", + pku: "Paku", + pla: "Miani", + plb: "Polonombauk", + plc: "Central Palawano", + pld: "Polari", + ple: "Palu'e", + plg: "Pilagá", + plh: "Paulohi", + pli: "Pali", + plj: "Polci", + plk: "Kohistani Shina", + pll: "Shwe Palaung", + pln: "Palenquero", + plo: "Oluta Popoluca", + plp: "Palpa", + plq: "Palaic", + plr: "Palaka Senoufo", + pls: "San Marcos Tlacoyalco Popoloca", + plt: "Plateau Malagasy", + plu: "Palikúr", + plv: "Southwest Palawano", + plw: "Brooke's Point Palawano", + ply: "Bolyu", + plz: "Paluan", + pma: "Paama", + pmb: "Pambia", + pmd: "Pallanganmiddang", + pme: "Pwaamei", + pmf: "Pamona", + pmh: "Māhārāṣṭri Prākrit", + pmi: "Northern Pumi", + pmj: "Southern Pumi", + pmk: "Pamlico", + pml: "Lingua Franca", + pmm: "Pomo", + pmn: "Pam", + pmo: "Pom", + pmq: "Northern Pame", + pmr: "Paynamar", + pms: "Piemontese", + pmt: "Tuamotuan", + pmw: "Plains Miwok", + pmx: "Poumei Naga", + pmy: "Papuan Malay", + pmz: "Southern Pame", + pna: "Punan Bah-Biau", + pnb: "Western Panjabi", + pnc: "Pannei", + pne: "Western Penan", + png: "Pongu", + pnh: "Penrhyn", + pni: "Aoheng", + pnj: "Pinjarup", + pnk: "Paunaka", + pnl: "Paleni", + pnm: "Punan Batu 1", + pnn: "Pinai-Hagahai", + pno: "Panobo", + pnp: "Pancana", + pnq: "Pana (Burkina Faso)", + pnr: "Panim", + pns: "Ponosakan", + pnt: "Pontic", + pnu: "Jiongnai Bunu", + pnv: "Pinigura", + pnw: "Panytyima", + pnx: "Phong-Kniang", + pny: "Pinyin", + pnz: "Pana (Central African Republic)", + poc: "Poqomam", + poe: "San Juan Atzingo Popoloca", + pof: "Poke", + pog: "Potiguára", + poh: "Poqomchi'", + poi: "Highland Popoluca", + pok: "Pokangá", + pol: "Polish", + pom: "Southeastern Pomo", + pon: "Pohnpeian", + poo: "Central Pomo", + pop: "Pwapwâ", + poq: "Texistepec Popoluca", + por: "Portuguese", + pos: "Sayula Popoluca", + pot: "Potawatomi", + pov: "Upper Guinea Crioulo", + pow: "San Felipe Otlaltepec Popoloca", + pox: "Polabian", + poy: "Pogolo", + ppe: "Papi", + ppi: "Paipai", + ppk: "Uma", + ppl: "Pipil", + ppm: "Papuma", + ppn: "Papapana", + ppo: "Folopa", + ppp: "Pelende", + ppq: "Pei", + pps: "San Luís Temalacayuca Popoloca", + ppt: "Pare", + ppu: "Papora", + pqa: "Pa'a", + pqm: "Malecite-Passamaquoddy", + prc: "Parachi", + prd: "Parsi-Dari", + pre: "Principense", + prf: "Paranan", + prg: "Prussian", + prh: "Porohanon", + pri: "Paicî", + prk: "Parauk", + prl: "Peruvian Sign Language", + prm: "Kibiri", + prn: "Prasuni", + pro: "Old Provençal (to 1500)", + prp: "Parsi", + prq: "Ashéninka Perené", + prr: "Puri", + prs: "Dari", + prt: "Phai", + pru: "Puragi", + prw: "Parawen", + prx: "Purik", + prz: "Providencia Sign Language", + psa: "Asue Awyu", + psc: "Persian Sign Language", + psd: "Plains Indian Sign Language", + pse: "Central Malay", + psg: "Penang Sign Language", + psh: "Southwest Pashai", + psi: "Southeast Pashai", + psl: "Puerto Rican Sign Language", + psm: "Pauserna", + psn: "Panasuan", + pso: "Polish Sign Language", + psp: "Philippine Sign Language", + psq: "Pasi", + psr: "Portuguese Sign Language", + pss: "Kaulong", + pst: "Central Pashto", + psu: "Sauraseni Prākrit", + psw: "Port Sandwich", + psy: "Piscataway", + pta: "Pai Tavytera", + pth: "Pataxó Hã-Ha-Hãe", + pti: "Pintiini", + ptn: "Patani", + pto: "Zo'é", + ptp: "Patep", + ptq: "Pattapu", + ptr: "Piamatsina", + ptt: "Enrekang", + ptu: "Bambam", + ptv: "Port Vato", + ptw: "Pentlatch", + pty: "Pathiya", + pua: "Western Highland Purepecha", + pub: "Purum", + puc: "Punan Merap", + pud: "Punan Aput", + pue: "Puelche", + puf: "Punan Merah", + pug: "Phuie", + pui: "Puinave", + puj: "Punan Tubu", + pum: "Puma", + puo: "Puoc", + pup: "Pulabu", + puq: "Puquina", + pur: "Puruborá", + pus: "Pushto", + put: "Putoh", + puu: "Punu", + puw: "Puluwatese", + pux: "Puare", + puy: "Purisimeño", + pwa: "Pawaia", + pwb: "Panawa", + pwg: "Gapapaiwa", + pwi: "Patwin", + pwm: "Molbog", + pwn: "Paiwan", + pwo: "Pwo Western Karen", + pwr: "Powari", + pww: "Pwo Northern Karen", + pxm: "Quetzaltepec Mixe", + pye: "Pye Krumen", + pym: "Fyam", + pyn: "Poyanáwa", + pys: "Paraguayan Sign Language", + pyu: "Puyuma", + pyx: "Pyu (Myanmar)", + pyy: "Pyen", + pzn: "Para Naga", + qaa: "Original audio", + qad: "Audio Description", + qua: "Quapaw", + qub: "Huallaga Huánuco Quechua", + quc: "K'iche'", + qud: "Calderón Highland Quichua", + que: "Quechua", + quf: "Lambayeque Quechua", + qug: "Chimborazo Highland Quichua", + quh: "South Bolivian Quechua", + qui: "Quileute", + quk: "Chachapoyas Quechua", + qul: "North Bolivian Quechua", + qum: "Sipacapense", + qun: "Quinault", + qup: "Southern Pastaza Quechua", + quq: "Quinqui", + qur: "Yanahuanca Pasco Quechua", + qus: "Santiago del Estero Quichua", + quv: "Sacapulteco", + quw: "Tena Lowland Quichua", + qux: "Yauyos Quechua", + quy: "Ayacucho Quechua", + quz: "Cusco Quechua", + qva: "Ambo-Pasco Quechua", + qvc: "Cajamarca Quechua", + qve: "Eastern Apurímac Quechua", + qvh: "Huamalíes-Dos de Mayo Huánuco Quechua", + qvi: "Imbabura Highland Quichua", + qvj: "Loja Highland Quichua", + qvl: "Cajatambo North Lima Quechua", + qvm: "Margos-Yarowilca-Lauricocha Quechua", + qvn: "North Junín Quechua", + qvo: "Napo Lowland Quechua", + qvp: "Pacaraos Quechua", + qvs: "San Martín Quechua", + qvw: "Huaylla Wanca Quechua", + qvy: "Queyu", + qvz: "Northern Pastaza Quichua", + qwa: "Corongo Ancash Quechua", + qwc: "Classical Quechua", + qwh: "Huaylas Ancash Quechua", + qwm: "Kuman (Russia)", + qws: "Sihuas Ancash Quechua", + qwt: "Kwalhioqua-Tlatskanai", + qxa: "Chiquián Ancash Quechua", + qxc: "Chincha Quechua", + qxh: "Panao Huánuco Quechua", + qxl: "Salasaca Highland Quichua", + qxn: "Northern Conchucos Ancash Quechua", + qxo: "Southern Conchucos Ancash Quechua", + qxp: "Puno Quechua", + qxq: "Qashqa'i", + qxr: "Cañar Highland Quichua", + qxs: "Southern Qiang", + qxt: "Santa Ana de Tusi Pasco Quechua", + qxu: "Arequipa-La Unión Quechua", + qxw: "Jauja Wanca Quechua", + qya: "Quenya", + qyp: "Quiripi", + raa: "Dungmali", + rab: "Camling", + rac: "Rasawa", + rad: "Rade", + raf: "Western Meohang", + rag: "Logooli", + rah: "Rabha", + rai: "Ramoaaina", + raj: "Rajasthani", + rak: "Tulu-Bohuai", + ral: "Ralte", + ram: "Canela", + ran: "Riantana", + rao: "Rao", + rap: "Rapanui", + raq: "Saam", + rar: "Rarotongan", + ras: "Tegali", + rat: "Razajerdi", + rau: "Raute", + rav: "Sampang", + raw: "Rawang", + rax: "Rang", + ray: "Rapa", + raz: "Rahambuu", + rbb: "Rumai Palaung", + rbk: "Northern Bontok", + rbl: "Miraya Bikol", + rbp: "Barababaraba", + rcf: "Réunion Creole French", + rdb: "Rudbari", + rea: "Rerau", + reb: "Rembong", + ree: "Rejang Kayan", + reg: "Kara (Tanzania)", + rei: "Reli", + rej: "Rejang", + rel: "Rendille", + rem: "Remo", + ren: "Rengao", + rer: "Rer Bare", + res: "Reshe", + ret: "Retta", + rey: "Reyesano", + rga: "Roria", + rge: "Romano-Greek", + rgk: "Rangkas", + rgn: "Romagnol", + rgr: "Resígaro", + rgs: "Southern Roglai", + rgu: "Ringgou", + rhg: "Rohingya", + rhp: "Yahang", + ria: "Riang (India)", + rif: "Tarifit", + ril: "Riang (Myanmar)", + rim: "Nyaturu", + rin: "Nungu", + rir: "Ribun", + rit: "Ritarungo", + riu: "Riung", + rjg: "Rajong", + rji: "Raji", + rjs: "Rajbanshi", + rka: "Kraol", + rkb: "Rikbaktsa", + rkh: "Rakahanga-Manihiki", + rki: "Rakhine", + rkm: "Marka", + rkt: "Rangpuri", + rkw: "Arakwal", + rma: "Rama", + rmb: "Rembarunga", + rmc: "Carpathian Romani", + rmd: "Traveller Danish", + rme: "Angloromani", + rmf: "Kalo Finnish Romani", + rmg: "Traveller Norwegian", + rmh: "Murkim", + rmi: "Lomavren", + rmk: "Romkun", + rml: "Baltic Romani", + rmm: "Roma", + rmn: "Balkan Romani", + rmo: "Sinte Romani", + rmp: "Rempi", + rmq: "Caló", + rms: "Romanian Sign Language", + rmt: "Domari", + rmu: "Tavringer Romani", + rmv: "Romanova", + rmw: "Welsh Romani", + rmx: "Romam", + rmy: "Vlax Romani", + rmz: "Marma", + rnd: "Ruund", + rng: "Ronga", + rnl: "Ranglong", + rnn: "Roon", + rnp: "Rongpo", + rnr: "Nari Nari", + rnw: "Rungwa", + rob: "Tae'", + roc: "Cacgia Roglai", + rod: "Rogo", + roe: "Ronji", + rof: "Rombo", + rog: "Northern Roglai", + roh: "Romansh", + rol: "Romblomanon", + rom: "Romany", + ron: "Romanian", + roo: "Rotokas", + rop: "Kriol", + ror: "Rongga", + rou: "Runga", + row: "Dela-Oenale", + rpn: "Repanbitip", + rpt: "Rapting", + rri: "Ririo", + rro: "Waima", + rrt: "Arritinngithigh", + rsb: "Romano-Serbian", + rsl: "Russian Sign Language", + rsm: "Miriwoong Sign Language", + rtc: "Rungtu Chin", + rth: "Ratahan", + rtm: "Rotuman", + rts: "Yurats", + rtw: "Rathawi", + rub: "Gungu", + ruc: "Ruuli", + rue: "Rusyn", + ruf: "Luguru", + rug: "Roviana", + ruh: "Ruga", + rui: "Rufiji", + ruk: "Che", + run: "Rundi", + ruo: "Istro Romanian", + rup: "Macedo-Romanian", + ruq: "Megleno Romanian", + rus: "Russian", + rut: "Rutul", + ruu: "Lanas Lobu", + ruy: "Mala (Nigeria)", + ruz: "Ruma", + rwa: "Rawo", + rwk: "Rwa", + rwm: "Amba (Uganda)", + rwo: "Rawa", + rwr: "Marwari (India)", + rxd: "Ngardi", + rxw: "Karuwali", + ryn: "Northern Amami-Oshima", + rys: "Yaeyama", + ryu: "Central Okinawan", + rzh: "Rāziḥī", + saa: "Saba", + sab: "Buglere", + sac: "Meskwaki", + sad: "Sandawe", + sae: "Sabanê", + saf: "Safaliba", + sag: "Sango", + sah: "Yakut", + saj: "Sahu", + sak: "Sake", + sam: "Samaritan Aramaic", + san: "Sanskrit", + sao: "Sause", + saq: "Samburu", + sar: "Saraveca", + sas: "Sasak", + sat: "Santali", + sau: "Saleman", + sav: "Saafi-Saafi", + saw: "Sawi", + sax: "Sa", + say: "Saya", + saz: "Saurashtra", + sba: "Ngambay", + sbb: "Simbo", + sbc: "Kele (Papua New Guinea)", + sbd: "Southern Samo", + sbe: "Saliba", + sbf: "Chabu", + sbg: "Seget", + sbh: "Sori-Harengan", + sbi: "Seti", + sbj: "Surbakhal", + sbk: "Safwa", + sbl: "Botolan Sambal", + sbm: "Sagala", + sbn: "Sindhi Bhil", + sbo: "Sabüm", + sbp: "Sangu (Tanzania)", + sbq: "Sileibi", + sbr: "Sembakung Murut", + sbs: "Subiya", + sbt: "Kimki", + sbu: "Stod Bhoti", + sbv: "Sabine", + sbw: "Simba", + sbx: "Seberuang", + sby: "Soli", + sbz: "Sara Kaba", + scb: "Chut", + sce: "Dongxiang", + scf: "San Miguel Creole French", + scg: "Sanggau", + sch: "Sakachep", + sci: "Sri Lankan Creole Malay", + sck: "Sadri", + scl: "Shina", + scn: "Sicilian", + sco: "Scots", + scp: "Helambu Sherpa", + scq: "Sa'och", + scs: "North Slavey", + sct: "Southern Katang", + scu: "Shumcho", + scv: "Sheni", + scw: "Sha", + scx: "Sicel", + sda: "Toraja-Sa'dan", + sdb: "Shabak", + sdc: "Sassarese Sardinian", + sde: "Surubu", + sdf: "Sarli", + sdg: "Savi", + sdh: "Southern Kurdish", + sdj: "Suundi", + sdk: "Sos Kundi", + sdl: "Saudi Arabian Sign Language", + sdm: "Semandang", + sdn: "Gallurese Sardinian", + sdo: "Bukar-Sadung Bidayuh", + sdp: "Sherdukpen", + sdr: "Oraon Sadri", + sds: "Sened", + sdt: "Shuadit", + sdu: "Sarudu", + sdx: "Sibu Melanau", + sdz: "Sallands", + sea: "Semai", + seb: "Shempire Senoufo", + sec: "Sechelt", + sed: "Sedang", + see: "Seneca", + sef: "Cebaara Senoufo", + seg: "Segeju", + seh: "Sena", + sei: "Seri", + sej: "Sene", + sek: "Sekani", + sel: "Selkup", + sen: "Nanerigé Sénoufo", + seo: "Suarmin", + sep: "Sìcìté Sénoufo", + seq: "Senara Sénoufo", + ser: "Serrano", + ses: "Koyraboro Senni Songhai", + set: "Sentani", + seu: "Serui-Laut", + sev: "Nyarafolo Senoufo", + sew: "Sewa Bay", + sey: "Secoya", + sez: "Senthang Chin", + sfb: "Langue des signes de Belgique Francophone", + sfe: "Eastern Subanen", + sfm: "Small Flowery Miao", + sfs: "South African Sign Language", + sfw: "Sehwi", + sga: "Old Irish (to 900)", + sgb: "Mag-antsi Ayta", + sgc: "Kipsigis", + sgd: "Surigaonon", + sge: "Segai", + sgg: "Swiss-German Sign Language", + sgh: "Shughni", + sgi: "Suga", + sgj: "Surgujia", + sgk: "Sangkong", + sgm: "Singa", + sgp: "Singpho", + sgr: "Sangisari", + sgs: "Samogitian", + sgt: "Brokpake", + sgu: "Salas", + sgw: "Sebat Bet Gurage", + sgx: "Sierra Leone Sign Language", + sgy: "Sanglechi", + sgz: "Sursurunga", + sha: "Shall-Zwall", + shb: "Ninam", + shc: "Sonde", + shd: "Kundal Shahi", + she: "Sheko", + shg: "Shua", + shh: "Shoshoni", + shi: "Tachelhit", + shj: "Shatt", + shk: "Shilluk", + shl: "Shendu", + shm: "Shahrudi", + shn: "Shan", + sho: "Shanga", + shp: "Shipibo-Conibo", + shq: "Sala", + shr: "Shi", + shs: "Shuswap", + sht: "Shasta", + shu: "Chadian Arabic", + shv: "Shehri", + shw: "Shwai", + shx: "She", + shy: "Tachawit", + shz: "Syenara Senoufo", + sia: "Akkala Sami", + sib: "Sebop", + sid: "Sidamo", + sie: "Simaa", + sif: "Siamou", + sig: "Paasaal", + sih: "Zire", + sii: "Shom Peng", + sij: "Numbami", + sik: "Sikiana", + sil: "Tumulung Sisaala", + sim: "Mende (Papua New Guinea)", + sin: "Sinhala", + sip: "Sikkimese", + siq: "Sonia", + sir: "Siri", + sis: "Siuslaw", + siu: "Sinagen", + siv: "Sumariup", + siw: "Siwai", + six: "Sumau", + siy: "Sivandi", + siz: "Siwi", + sja: "Epena", + sjb: "Sajau Basap", + sjd: "Kildin Sami", + sje: "Pite Sami", + sjg: "Assangori", + sjk: "Kemi Sami", + sjl: "Sajalong", + sjm: "Mapun", + sjn: "Sindarin", + sjo: "Xibe", + sjp: "Surjapuri", + sjr: "Siar-Lak", + sjs: "Senhaja De Srair", + sjt: "Ter Sami", + sju: "Ume Sami", + sjw: "Shawnee", + ska: "Skagit", + skb: "Saek", + skc: "Ma Manda", + skd: "Southern Sierra Miwok", + ske: "Seke (Vanuatu)", + skf: "Sakirabiá", + skg: "Sakalava Malagasy", + skh: "Sikule", + ski: "Sika", + skj: "Seke (Nepal)", + skm: "Kutong", + skn: "Kolibugan Subanon", + sko: "Seko Tengah", + skp: "Sekapan", + skq: "Sininkere", + skr: "Saraiki", + sks: "Maia", + skt: "Sakata", + sku: "Sakao", + skv: "Skou", + skw: "Skepi Creole Dutch", + skx: "Seko Padang", + sky: "Sikaiana", + skz: "Sekar", + slc: "Sáliba", + sld: "Sissala", + sle: "Sholaga", + slf: "Swiss-Italian Sign Language", + slg: "Selungai Murut", + slh: "Southern Puget Sound Salish", + sli: "Lower Silesian", + slj: "Salumá", + slk: "Slovak", + sll: "Salt-Yui", + slm: "Pangutaran Sama", + sln: "Salinan", + slp: "Lamaholot", + slq: "Salchuq", + slr: "Salar", + sls: "Singapore Sign Language", + slt: "Sila", + slu: "Selaru", + slv: "Slovenian", + slw: "Sialum", + slx: "Salampasu", + sly: "Selayar", + slz: "Ma'ya", + sma: "Southern Sami", + smb: "Simbari", + smc: "Som", + smd: "Sama", + sme: "Northern Sami", + smf: "Auwe", + smg: "Simbali", + smh: "Samei", + smj: "Lule Sami", + smk: "Bolinao", + sml: "Central Sama", + smm: "Musasa", + smn: "Inari Sami", + smo: "Samoan", + smp: "Samaritan", + smq: "Samo", + smr: "Simeulue", + sms: "Skolt Sami", + smt: "Simte", + smu: "Somray", + smv: "Samvedi", + smw: "Sumbawa", + smx: "Samba", + smy: "Semnani", + smz: "Simeku", + sna: "Shona", + snb: "Sebuyau", + snc: "Sinaugoro", + snd: "Sindhi", + sne: "Bau Bidayuh", + snf: "Noon", + sng: "Sanga (Democratic Republic of Congo)", + sni: "Sensi", + snj: "Riverain Sango", + snk: "Soninke", + snl: "Sangil", + snm: "Southern Ma'di", + snn: "Siona", + sno: "Snohomish", + snp: "Siane", + snq: "Sangu (Gabon)", + snr: "Sihan", + sns: "South West Bay", + snu: "Senggi", + snv: "Sa'ban", + snw: "Selee", + snx: "Sam", + sny: "Saniyo-Hiyewe", + snz: "Sinsauru", + soa: "Thai Song", + sob: "Sobei", + soc: "So (Democratic Republic of Congo)", + sod: "Songoora", + soe: "Songomeno", + sog: "Sogdian", + soh: "Aka", + soi: "Sonha", + soj: "Soi", + sok: "Sokoro", + sol: "Solos", + som: "Somali", + soo: "Songo", + sop: "Songe", + soq: "Kanasi", + sor: "Somrai", + sos: "Seeku", + sot: "Southern Sotho", + sou: "Southern Thai", + sov: "Sonsorol", + sow: "Sowanda", + sox: "Swo", + soy: "Miyobe", + soz: "Temi", + spa: "Spanish", + spb: "Sepa (Indonesia)", + spc: "Sapé", + spd: "Saep", + spe: "Sepa (Papua New Guinea)", + spg: "Sian", + spi: "Saponi", + spk: "Sengo", + spl: "Selepet", + spm: "Akukem", + spn: "Sanapaná", + spo: "Spokane", + spp: "Supyire Senoufo", + spq: "Loreto-Ucayali Spanish", + spr: "Saparua", + sps: "Saposa", + spt: "Spiti Bhoti", + spu: "Sapuan", + spv: "Sambalpuri", + spx: "South Picene", + spy: "Sabaot", + sqa: "Shama-Sambuga", + sqh: "Shau", + sqi: "Albanian", + sqk: "Albanian Sign Language", + sqm: "Suma", + sqn: "Susquehannock", + sqo: "Sorkhei", + sqq: "Sou", + sqr: "Siculo Arabic", + sqs: "Sri Lankan Sign Language", + sqt: "Soqotri", + squ: "Squamish", + sra: "Saruga", + srb: "Sora", + src: "Logudorese Sardinian", + srd: "Sardinian", + sre: "Sara", + srf: "Nafi", + srg: "Sulod", + srh: "Sarikoli", + sri: "Siriano", + srk: "Serudung Murut", + srl: "Isirawa", + srm: "Saramaccan", + srn: "Sranan Tongo", + sro: "Campidanese Sardinian", + srp: "Serbian", + srq: "Sirionó", + srr: "Serer", + srs: "Sarsi", + srt: "Sauri", + sru: "Suruí", + srv: "Southern Sorsoganon", + srw: "Serua", + srx: "Sirmauri", + sry: "Sera", + srz: "Shahmirzadi", + ssb: "Southern Sama", + ssc: "Suba-Simbiti", + ssd: "Siroi", + sse: "Balangingi", + ssf: "Thao", + ssg: "Seimat", + ssh: "Shihhi Arabic", + ssi: "Sansi", + ssj: "Sausi", + ssk: "Sunam", + ssl: "Western Sisaala", + ssm: "Semnam", + ssn: "Waata", + sso: "Sissano", + ssp: "Spanish Sign Language", + ssq: "So'a", + ssr: "Swiss-French Sign Language", + sss: "Sô", + sst: "Sinasina", + ssu: "Susuami", + ssv: "Shark Bay", + ssw: "Swati", + ssx: "Samberigi", + ssy: "Saho", + ssz: "Sengseng", + sta: "Settla", + stb: "Northern Subanen", + std: "Sentinel", + ste: "Liana-Seti", + stf: "Seta", + stg: "Trieng", + sth: "Shelta", + sti: "Bulo Stieng", + stj: "Matya Samo", + stk: "Arammba", + stl: "Stellingwerfs", + stm: "Setaman", + stn: "Owa", + sto: "Stoney", + stp: "Southeastern Tepehuan", + stq: "Saterfriesisch", + str: "Straits Salish", + sts: "Shumashti", + stt: "Budeh Stieng", + stu: "Samtao", + stv: "Silt'e", + stw: "Satawalese", + sty: "Siberian Tatar", + sua: "Sulka", + sub: "Suku", + suc: "Western Subanon", + sue: "Suena", + sug: "Suganga", + sui: "Suki", + suj: "Shubi", + suk: "Sukuma", + sun: "Sundanese", + suq: "Suri", + sur: "Mwaghavul", + sus: "Susu", + sut: "Subtiaba", + suv: "Puroik", + suw: "Sumbwa", + sux: "Sumerian", + suy: "Suyá", + suz: "Sunwar", + sva: "Svan", + svb: "Ulau-Suain", + svc: "Vincentian Creole English", + sve: "Serili", + svk: "Slovakian Sign Language", + svm: "Slavomolisano", + svs: "Savosavo", + svx: "Skalvian", + swa: "Swahili (macrolanguage)", + swb: "Maore Comorian", + swc: "Congo Swahili", + swe: "Swedish", + swf: "Sere", + swg: "Swabian", + swh: "Swahili (individual language)", + swi: "Sui", + swj: "Sira", + swk: "Malawi Sena", + swl: "Swedish Sign Language", + swm: "Samosa", + swn: "Sawknah", + swo: "Shanenawa", + swp: "Suau", + swq: "Sharwa", + swr: "Saweru", + sws: "Seluwasan", + swt: "Sawila", + swu: "Suwawa", + swv: "Shekhawati", + sww: "Sowa", + swx: "Suruahá", + swy: "Sarua", + sxb: "Suba", + sxc: "Sicanian", + sxe: "Sighu", + sxg: "Shixing", + sxk: "Southern Kalapuya", + sxl: "Selian", + sxm: "Samre", + sxn: "Sangir", + sxo: "Sorothaptic", + sxr: "Saaroa", + sxs: "Sasaru", + sxu: "Upper Saxon", + sxw: "Saxwe Gbe", + sya: "Siang", + syb: "Central Subanen", + syc: "Classical Syriac", + syi: "Seki", + syk: "Sukur", + syl: "Sylheti", + sym: "Maya Samo", + syn: "Senaya", + syo: "Suoy", + syr: "Syriac", + sys: "Sinyar", + syw: "Kagate", + syx: "Samay", + syy: "Al-Sayyid Bedouin Sign Language", + sza: "Semelai", + szb: "Ngalum", + szc: "Semaq Beri", + szd: "Seru", + sze: "Seze", + szg: "Sengele", + szl: "Silesian", + szn: "Sula", + szp: "Suabo", + szs: "Solomon Islands Sign Language", + szv: "Isu (Fako Division)", + szw: "Sawai", + taa: "Lower Tanana", + tab: "Tabassaran", + tac: "Lowland Tarahumara", + tad: "Tause", + tae: "Tariana", + taf: "Tapirapé", + tag: "Tagoi", + tah: "Tahitian", + taj: "Eastern Tamang", + tak: "Tala", + tal: "Tal", + tam: "Tamil", + tan: "Tangale", + tao: "Yami", + tap: "Taabwa", + taq: "Tamasheq", + tar: "Central Tarahumara", + tas: "Tay Boi", + tat: "Tatar", + tau: "Upper Tanana", + tav: "Tatuyo", + taw: "Tai", + tax: "Tamki", + tay: "Atayal", + taz: "Tocho", + tba: "Aikanã", + tbb: "Tapeba", + tbc: "Takia", + tbd: "Kaki Ae", + tbe: "Tanimbili", + tbf: "Mandara", + tbg: "North Tairora", + tbh: "Thurawal", + tbi: "Gaam", + tbj: "Tiang", + tbk: "Calamian Tagbanwa", + tbl: "Tboli", + tbm: "Tagbu", + tbn: "Barro Negro Tunebo", + tbo: "Tawala", + tbp: "Taworta", + tbr: "Tumtum", + tbs: "Tanguat", + tbt: "Tembo (Kitembo)", + tbu: "Tubar", + tbv: "Tobo", + tbw: "Tagbanwa", + tbx: "Kapin", + tby: "Tabaru", + tbz: "Ditammari", + tca: "Ticuna", + tcb: "Tanacross", + tcc: "Datooga", + tcd: "Tafi", + tce: "Southern Tutchone", + tcf: "Malinaltepec Me'phaa", + tcg: "Tamagario", + tch: "Turks And Caicos Creole English", + tci: "Wára", + tck: "Tchitchege", + tcl: "Taman (Myanmar)", + tcm: "Tanahmerah", + tcn: "Tichurong", + tco: "Taungyo", + tcp: "Tawr Chin", + tcq: "Kaiy", + tcs: "Torres Strait Creole", + tct: "T'en", + tcu: "Southeastern Tarahumara", + tcw: "Tecpatlán Totonac", + tcx: "Toda", + tcy: "Tulu", + tcz: "Thado Chin", + tda: "Tagdal", + tdb: "Panchpargania", + tdc: "Emberá-Tadó", + tdd: "Tai Nüa", + tde: "Tiranige Diga Dogon", + tdf: "Talieng", + tdg: "Western Tamang", + tdh: "Thulung", + tdi: "Tomadino", + tdj: "Tajio", + tdk: "Tambas", + tdl: "Sur", + tdm: "Taruma", + tdn: "Tondano", + tdo: "Teme", + tdq: "Tita", + tdr: "Todrah", + tds: "Doutai", + tdt: "Tetun Dili", + tdv: "Toro", + tdx: "Tandroy-Mahafaly Malagasy", + tdy: "Tadyawan", + tea: "Temiar", + teb: "Tetete", + tec: "Terik", + ted: "Tepo Krumen", + tee: "Huehuetla Tepehua", + tef: "Teressa", + teg: "Teke-Tege", + teh: "Tehuelche", + tei: "Torricelli", + tek: "Ibali Teke", + tel: "Telugu", + tem: "Timne", + ten: "Tama (Colombia)", + teo: "Teso", + tep: "Tepecano", + teq: "Temein", + ter: "Tereno", + tes: "Tengger", + tet: "Tetum", + teu: "Soo", + tev: "Teor", + tew: "Tewa (USA)", + tex: "Tennet", + tey: "Tulishi", + tfi: "Tofin Gbe", + tfn: "Tanaina", + tfo: "Tefaro", + tfr: "Teribe", + tft: "Ternate", + tga: "Sagalla", + tgb: "Tobilung", + tgc: "Tigak", + tgd: "Ciwogai", + tge: "Eastern Gorkha Tamang", + tgf: "Chalikha", + tgh: "Tobagonian Creole English", + tgi: "Lawunuia", + tgj: "Tagin", + tgk: "Tajik", + tgl: "Tagalog", + tgn: "Tandaganon", + tgo: "Sudest", + tgp: "Tangoa", + tgq: "Tring", + tgr: "Tareng", + tgs: "Nume", + tgt: "Central Tagbanwa", + tgu: "Tanggu", + tgv: "Tingui-Boto", + tgw: "Tagwana Senoufo", + tgx: "Tagish", + tgy: "Togoyo", + tgz: "Tagalaka", + tha: "Thai", + thd: "Thayore", + the: "Chitwania Tharu", + thf: "Thangmi", + thh: "Northern Tarahumara", + thi: "Tai Long", + thk: "Tharaka", + thl: "Dangaura Tharu", + thm: "Aheu", + thn: "Thachanadan", + thp: "Thompson", + thq: "Kochila Tharu", + thr: "Rana Tharu", + ths: "Thakali", + tht: "Tahltan", + thu: "Thuri", + thv: "Tahaggart Tamahaq", + thw: "Thudam", + thy: "Tha", + thz: "Tayart Tamajeq", + tia: "Tidikelt Tamazight", + tic: "Tira", + tif: "Tifal", + tig: "Tigre", + tih: "Timugon Murut", + tii: "Tiene", + tij: "Tilung", + tik: "Tikar", + til: "Tillamook", + tim: "Timbe", + tin: "Tindi", + tio: "Teop", + tip: "Trimuris", + tiq: "Tiéfo", + tir: "Tigrinya", + tis: "Masadiit Itneg", + tit: "Tinigua", + tiu: "Adasen", + tiv: "Tiv", + tiw: "Tiwi", + tix: "Southern Tiwa", + tiy: "Tiruray", + tiz: "Tai Hongjin", + tja: "Tajuasohn", + tjg: "Tunjung", + tji: "Northern Tujia", + tjl: "Tai Laing", + tjm: "Timucua", + tjn: "Tonjon", + tjo: "Temacine Tamazight", + tjs: "Southern Tujia", + tju: "Tjurruru", + tjw: "Djabwurrung", + tka: "Truká", + tkb: "Buksa", + tkd: "Tukudede", + tke: "Takwane", + tkf: "Tukumanféd", + tkg: "Tesaka Malagasy", + tkl: "Tokelau", + tkm: "Takelma", + tkn: "Toku-No-Shima", + tkp: "Tikopia", + tkq: "Tee", + tkr: "Tsakhur", + tks: "Takestani", + tkt: "Kathoriya Tharu", + tku: "Upper Necaxa Totonac", + tkv: "Mur Pano", + tkw: "Teanu", + tkx: "Tangko", + tkz: "Takua", + tla: "Southwestern Tepehuan", + tlb: "Tobelo", + tlc: "Yecuatla Totonac", + tld: "Talaud", + tlf: "Telefol", + tlg: "Tofanma", + tlh: "Klingon", + tli: "Tlingit", + tlj: "Talinga-Bwisi", + tlk: "Taloki", + tll: "Tetela", + tlm: "Tolomako", + tln: "Talondo'", + tlo: "Talodi", + tlp: "Filomena Mata-Coahuitlán Totonac", + tlq: "Tai Loi", + tlr: "Talise", + tls: "Tambotalo", + tlt: "Sou Nama", + tlu: "Tulehu", + tlv: "Taliabu", + tlx: "Khehek", + tly: "Talysh", + tma: "Tama (Chad)", + tmb: "Katbol", + tmc: "Tumak", + tmd: "Haruai", + tme: "Tremembé", + tmf: "Toba-Maskoy", + tmg: "Ternateño", + tmh: "Tamashek", + tmi: "Tutuba", + tmj: "Samarokena", + tmk: "Northwestern Tamang", + tml: "Tamnim Citak", + tmm: "Tai Thanh", + tmn: "Taman (Indonesia)", + tmo: "Temoq", + tmq: "Tumleo", + tmr: "Jewish Babylonian Aramaic (ca. 200-1200 CE)", + tms: "Tima", + tmt: "Tasmate", + tmu: "Iau", + tmv: "Tembo (Motembo)", + tmw: "Temuan", + tmy: "Tami", + tmz: "Tamanaku", + tna: "Tacana", + tnb: "Western Tunebo", + tnc: "Tanimuca-Retuarã", + tnd: "Angosturas Tunebo", + tng: "Tobanga", + tnh: "Maiani", + tni: "Tandia", + tnk: "Kwamera", + tnl: "Lenakel", + tnm: "Tabla", + tnn: "North Tanna", + tno: "Toromono", + tnp: "Whitesands", + tnq: "Taino", + tnr: "Ménik", + tns: "Tenis", + tnt: "Tontemboan", + tnu: "Tay Khang", + tnv: "Tangchangya", + tnw: "Tonsawang", + tnx: "Tanema", + tny: "Tongwe", + tnz: "Ten'edn", + tob: "Toba", + toc: "Coyutla Totonac", + tod: "Toma", + tof: "Gizrra", + tog: "Tonga (Nyasa)", + toh: "Gitonga", + toi: "Tonga (Zambia)", + toj: "Tojolabal", + tol: "Tolowa", + tom: "Tombulu", + ton: "Tonga (Tonga Islands)", + too: "Xicotepec De Juárez Totonac", + top: "Papantla Totonac", + toq: "Toposa", + tor: "Togbo-Vara Banda", + tos: "Highland Totonac", + tou: "Tho", + tov: "Upper Taromi", + tow: "Jemez", + tox: "Tobian", + toy: "Topoiyo", + toz: "To", + tpa: "Taupota", + tpc: "Azoyú Me'phaa", + tpe: "Tippera", + tpf: "Tarpia", + tpg: "Kula", + tpi: "Tok Pisin", + tpj: "Tapieté", + tpk: "Tupinikin", + tpl: "Tlacoapa Me'phaa", + tpm: "Tampulma", + tpn: "Tupinambá", + tpo: "Tai Pao", + tpp: "Pisaflores Tepehua", + tpq: "Tukpa", + tpr: "Tuparí", + tpt: "Tlachichilco Tepehua", + tpu: "Tampuan", + tpv: "Tanapag", + tpw: "Tupí", + tpx: "Acatepec Me'phaa", + tpy: "Trumai", + tpz: "Tinputz", + tqb: "Tembé", + tql: "Lehali", + tqm: "Turumsa", + tqn: "Tenino", + tqo: "Toaripi", + tqp: "Tomoip", + tqq: "Tunni", + tqr: "Torona", + tqt: "Western Totonac", + tqu: "Touo", + tqw: "Tonkawa", + tra: "Tirahi", + trb: "Terebu", + trc: "Copala Triqui", + trd: "Turi", + tre: "East Tarangan", + trf: "Trinidadian Creole English", + trg: "Lishán Didán", + trh: "Turaka", + tri: "Trió", + trj: "Toram", + trl: "Traveller Scottish", + trm: "Tregami", + trn: "Trinitario", + tro: "Tarao Naga", + trp: "Kok Borok", + trq: "San Martín Itunyoso Triqui", + trr: "Taushiro", + trs: "Chicahuaxtla Triqui", + trt: "Tunggare", + tru: "Turoyo", + trv: "Taroko", + trw: "Torwali", + trx: "Tringgus-Sembaan Bidayuh", + try: "Turung", + trz: "Torá", + tsa: "Tsaangi", + tsb: "Tsamai", + tsc: "Tswa", + tsd: "Tsakonian", + tse: "Tunisian Sign Language", + tsg: "Tausug", + tsh: "Tsuvan", + tsi: "Tsimshian", + tsj: "Tshangla", + tsk: "Tseku", + tsl: "Ts'ün-Lao", + tsm: "Turkish Sign Language", + tsn: "Tswana", + tso: "Tsonga", + tsp: "Northern Toussian", + tsq: "Thai Sign Language", + tsr: "Akei", + tss: "Taiwan Sign Language", + tst: "Tondi Songway Kiini", + tsu: "Tsou", + tsv: "Tsogo", + tsw: "Tsishingini", + tsx: "Mubami", + tsy: "Tebul Sign Language", + tsz: "Purepecha", + tta: "Tutelo", + ttb: "Gaa", + ttc: "Tektiteko", + ttd: "Tauade", + tte: "Bwanabwana", + ttf: "Tuotomb", + ttg: "Tutong", + tth: "Upper Ta'oih", + tti: "Tobati", + ttj: "Tooro", + ttk: "Totoro", + ttl: "Totela", + ttm: "Northern Tutchone", + ttn: "Towei", + tto: "Lower Ta'oih", + ttp: "Tombelala", + ttq: "Tawallammat Tamajaq", + ttr: "Tera", + tts: "Northeastern Thai", + ttt: "Muslim Tat", + ttu: "Torau", + ttv: "Titan", + ttw: "Long Wat", + tty: "Sikaritai", + ttz: "Tsum", + tua: "Wiarumus", + tub: "Tübatulabal", + tuc: "Mutu", + tud: "Tuxá", + tue: "Tuyuca", + tuf: "Central Tunebo", + tug: "Tunia", + tuh: "Taulil", + tui: "Tupuri", + tuj: "Tugutil", + tuk: "Turkmen", + tul: "Tula", + tum: "Tumbuka", + tun: "Tunica", + tuo: "Tucano", + tuq: "Tedaga", + tur: "Turkish", + tus: "Tuscarora", + tuu: "Tututni", + tuv: "Turkana", + tux: "Tuxináwa", + tuy: "Tugen", + tuz: "Turka", + tva: "Vaghua", + tvd: "Tsuvadi", + tve: "Te'un", + tvk: "Southeast Ambrym", + tvl: "Tuvalu", + tvm: "Tela-Masbuar", + tvn: "Tavoyan", + tvo: "Tidore", + tvs: "Taveta", + tvt: "Tutsa Naga", + tvu: "Tunen", + tvw: "Sedoa", + tvy: "Timor Pidgin", + twa: "Twana", + twb: "Western Tawbuid", + twc: "Teshenawa", + twd: "Twents", + twe: "Tewa (Indonesia)", + twf: "Northern Tiwa", + twg: "Tereweng", + twh: "Tai Dón", + twi: "Twi", + twl: "Tawara", + twm: "Tawang Monpa", + twn: "Twendi", + two: "Tswapong", + twp: "Ere", + twq: "Tasawaq", + twr: "Southwestern Tarahumara", + twt: "Turiwára", + twu: "Termanu", + tww: "Tuwari", + twx: "Tewe", + twy: "Tawoyan", + txa: "Tombonuo", + txb: "Tokharian B", + txc: "Tsetsaut", + txe: "Totoli", + txg: "Tangut", + txh: "Thracian", + txi: "Ikpeng", + txj: "Tarjumo", + txm: "Tomini", + txn: "West Tarangan", + txo: "Toto", + txq: "Tii", + txr: "Tartessian", + txs: "Tonsea", + txt: "Citak", + txu: "Kayapó", + txx: "Tatana", + txy: "Tanosy Malagasy", + tya: "Tauya", + tye: "Kyanga", + tyh: "O'du", + tyi: "Teke-Tsaayi", + tyj: "Tai Do", + tyl: "Thu Lao", + tyn: "Kombai", + typ: "Thaypan", + tyr: "Tai Daeng", + tys: "Tày Sa Pa", + tyt: "Tày Tac", + tyu: "Kua", + tyv: "Tuvinian", + tyx: "Teke-Tyee", + tyz: "Tày", + tza: "Tanzanian Sign Language", + tzh: "Tzeltal", + tzj: "Tz'utujil", + tzl: "Talossan", + tzm: "Central Atlas Tamazight", + tzn: "Tugun", + tzo: "Tzotzil", + tzx: "Tabriak", + uam: "Uamué", + uan: "Kuan", + uar: "Tairuma", + uba: "Ubang", + ubi: "Ubi", + ubl: "Buhi'non Bikol", + ubr: "Ubir", + ubu: "Umbu-Ungu", + uby: "Ubykh", + uda: "Uda", + ude: "Udihe", + udg: "Muduga", + udi: "Udi", + udj: "Ujir", + udl: "Wuzlam", + udm: "Udmurt", + udu: "Uduk", + ues: "Kioko", + ufi: "Ufim", + uga: "Ugaritic", + ugb: "Kuku-Ugbanh", + uge: "Ughele", + ugn: "Ugandan Sign Language", + ugo: "Ugong", + ugy: "Uruguayan Sign Language", + uha: "Uhami", + uhn: "Damal", + uig: "Uighur", + uis: "Uisai", + uiv: "Iyive", + uji: "Tanjijili", + uka: "Kaburi", + ukg: "Ukuriguma", + ukh: "Ukhwejo", + ukk: "Muak Sa-aak", + ukl: "Ukrainian Sign Language", + ukp: "Ukpe-Bayobiri", + ukq: "Ukwa", + ukr: "Ukrainian", + uks: "Urubú-Kaapor Sign Language", + uku: "Ukue", + ukw: "Ukwuani-Aboh-Ndoni", + uky: "Kuuk-Yak", + ula: "Fungwa", + ulb: "Ulukwumi", + ulc: "Ulch", + ule: "Lule", + ulf: "Usku", + uli: "Ulithian", + ulk: "Meriam", + ull: "Ullatan", + ulm: "Ulumanda'", + uln: "Unserdeutsch", + ulu: "Uma' Lung", + ulw: "Ulwa", + uma: "Umatilla", + umb: "Umbundu", + umc: "Marrucinian", + umd: "Umbindhamu", + umg: "Umbuygamu", + umi: "Ukit", + umm: "Umon", + umn: "Makyan Naga", + umo: "Umotína", + ump: "Umpila", + umr: "Umbugarla", + ums: "Pendau", + umu: "Munsee", + una: "North Watut", + und: "Undetermined", + une: "Uneme", + ung: "Ngarinyin", + unk: "Enawené-Nawé", + unm: "Unami", + unn: "Kurnai", + unr: "Mundari", + unu: "Unubahe", + unx: "Munda", + unz: "Unde Kaili", + upi: "Umeda", + upv: "Uripiv-Wala-Rano-Atchin", + ura: "Urarina", + urb: "Urubú-Kaapor", + urc: "Urningangg", + urd: "Urdu", + ure: "Uru", + urf: "Uradhi", + urg: "Urigina", + urh: "Urhobo", + uri: "Urim", + urk: "Urak Lawoi'", + url: "Urali", + urm: "Urapmin", + urn: "Uruangnirin", + uro: "Ura (Papua New Guinea)", + urp: "Uru-Pa-In", + urr: "Lehalurup", + urt: "Urat", + uru: "Urumi", + urv: "Uruava", + urw: "Sop", + urx: "Urimo", + ury: "Orya", + urz: "Uru-Eu-Wau-Wau", + usa: "Usarufa", + ush: "Ushojo", + usi: "Usui", + usk: "Usaghade", + usp: "Uspanteco", + usu: "Uya", + uta: "Otank", + ute: "Ute-Southern Paiute", + utp: "Amba (Solomon Islands)", + utr: "Etulo", + utu: "Utu", + uum: "Urum", + uun: "Kulon-Pazeh", + uur: "Ura (Vanuatu)", + uuu: "U", + uve: "West Uvean", + uvh: "Uri", + uvl: "Lote", + uwa: "Kuku-Uwanh", + uya: "Doko-Uyanga", + uzb: "Uzbek", + uzn: "Northern Uzbek", + uzs: "Southern Uzbek", + vaa: "Vaagri Booli", + vae: "Vale", + vaf: "Vafsi", + vag: "Vagla", + vah: "Varhadi-Nagpuri", + vai: "Vai", + vaj: "Sekele", + val: "Vehes", + vam: "Vanimo", + van: "Valman", + vao: "Vao", + vap: "Vaiphei", + var: "Huarijio", + vas: "Vasavi", + vau: "Vanuma", + vav: "Varli", + vay: "Wayu", + vbb: "Southeast Babar", + vbk: "Southwestern Bontok", + vec: "Venetian", + ved: "Veddah", + vel: "Veluws", + vem: "Vemgo-Mabas", + ven: "Venda", + veo: "Ventureño", + vep: "Veps", + ver: "Mom Jango", + vgr: "Vaghri", + vgt: "Vlaamse Gebarentaal", + vic: "Virgin Islands Creole English", + vid: "Vidunda", + vie: "Vietnamese", + vif: "Vili", + vig: "Viemo", + vil: "Vilela", + vin: "Vinza", + vis: "Vishavan", + vit: "Viti", + viv: "Iduna", + vka: "Kariyarra", + vki: "Ija-Zuba", + vkj: "Kujarge", + vkk: "Kaur", + vkl: "Kulisusu", + vkm: "Kamakan", + vko: "Kodeoha", + vkp: "Korlai Creole Portuguese", + vkt: "Tenggarong Kutai Malay", + vku: "Kurrama", + vlp: "Valpei", + vls: "Vlaams", + vma: "Martuyhunira", + vmb: "Barbaram", + vmc: "Juxtlahuaca Mixtec", + vmd: "Mudu Koraga", + vme: "East Masela", + vmf: "Mainfränkisch", + vmg: "Lungalunga", + vmh: "Maraghei", + vmi: "Miwa", + vmj: "Ixtayutla Mixtec", + vmk: "Makhuwa-Shirima", + vml: "Malgana", + vmm: "Mitlatongo Mixtec", + vmp: "Soyaltepec Mazatec", + vmq: "Soyaltepec Mixtec", + vmr: "Marenje", + vms: "Moksela", + vmu: "Muluridyi", + vmv: "Valley Maidu", + vmw: "Makhuwa", + vmx: "Tamazola Mixtec", + vmy: "Ayautla Mazatec", + vmz: "Mazatlán Mazatec", + vnk: "Vano", + vnm: "Vinmavis", + vnp: "Vunapu", + vol: "Volapük", + vor: "Voro", + vot: "Votic", + vra: "Vera'a", + vro: "Võro", + vrs: "Varisi", + vrt: "Burmbar", + vsi: "Moldova Sign Language", + vsl: "Venezuelan Sign Language", + vsv: "Valencian Sign Language", + vto: "Vitou", + vum: "Vumbu", + vun: "Vunjo", + vut: "Vute", + vwa: "Awa (China)", + waa: "Walla Walla", + wab: "Wab", + wac: "Wasco-Wishram", + wad: "Wandamen", + wae: "Walser", + waf: "Wakoná", + wag: "Wa'ema", + wah: "Watubela", + wai: "Wares", + waj: "Waffa", + wal: "Wolaytta", + wam: "Wampanoag", + wan: "Wan", + wao: "Wappo", + wap: "Wapishana", + waq: "Wageman", + war: "Waray (Philippines)", + was: "Washo", + wat: "Kaninuwa", + wau: "Waurá", + wav: "Waka", + waw: "Waiwai", + wax: "Watam", + way: "Wayana", + waz: "Wampur", + wba: "Warao", + wbb: "Wabo", + wbe: "Waritai", + wbf: "Wara", + wbh: "Wanda", + wbi: "Vwanji", + wbj: "Alagwa", + wbk: "Waigali", + wbl: "Wakhi", + wbm: "Wa", + wbp: "Warlpiri", + wbq: "Waddar", + wbr: "Wagdi", + wbs: "West Bengal Sign Language", + wbt: "Wanman", + wbv: "Wajarri", + wbw: "Woi", + wca: "Yanomámi", + wci: "Waci Gbe", + wdd: "Wandji", + wdg: "Wadaginam", + wdj: "Wadjiginy", + wdk: "Wadikali", + wdu: "Wadjigu", + wdy: "Wadjabangayi", + wea: "Wewaw", + wec: "Wè Western", + wed: "Wedau", + weg: "Wergaia", + weh: "Weh", + wei: "Kiunum", + wem: "Weme Gbe", + weo: "Wemale", + wep: "Westphalien", + wer: "Weri", + wes: "Cameroon Pidgin", + wet: "Perai", + weu: "Rawngtu Chin", + wew: "Wejewa", + wfg: "Yafi", + wga: "Wagaya", + wgb: "Wagawaga", + wgg: "Wangganguru", + wgi: "Wahgi", + wgo: "Waigeo", + wgu: "Wirangu", + wgy: "Warrgamay", + wha: "Sou Upaa", + whg: "North Wahgi", + whk: "Wahau Kenyah", + whu: "Wahau Kayan", + wib: "Southern Toussian", + wic: "Wichita", + wie: "Wik-Epa", + wif: "Wik-Keyangan", + wig: "Wik-Ngathana", + wih: "Wik-Me'anha", + wii: "Minidien", + wij: "Wik-Iiyanh", + wik: "Wikalkan", + wil: "Wilawila", + wim: "Wik-Mungkan", + win: "Ho-Chunk", + wir: "Wiraféd", + wiu: "Wiru", + wiv: "Vitu", + wiy: "Wiyot", + wja: "Waja", + wji: "Warji", + wka: "Kw'adza", + wkb: "Kumbaran", + wkd: "Wakde", + wkl: "Kalanadi", + wku: "Kunduvadi", + wkw: "Wakawaka", + wky: "Wangkayutyuru", + wla: "Walio", + wlc: "Mwali Comorian", + wle: "Wolane", + wlg: "Kunbarlang", + wli: "Waioli", + wlk: "Wailaki", + wll: "Wali (Sudan)", + wlm: "Middle Welsh", + wln: "Walloon", + wlo: "Wolio", + wlr: "Wailapa", + wls: "Wallisian", + wlu: "Wuliwuli", + wlv: "Wichí Lhamtés Vejoz", + wlw: "Walak", + wlx: "Wali (Ghana)", + wly: "Waling", + wma: "Mawa (Nigeria)", + wmb: "Wambaya", + wmc: "Wamas", + wmd: "Mamaindé", + wme: "Wambule", + wmh: "Waima'a", + wmi: "Wamin", + wmm: "Maiwa (Indonesia)", + wmn: "Waamwang", + wmo: "Wom (Papua New Guinea)", + wms: "Wambon", + wmt: "Walmajarri", + wmw: "Mwani", + wmx: "Womo", + wnb: "Wanambre", + wnc: "Wantoat", + wnd: "Wandarang", + wne: "Waneci", + wng: "Wanggom", + wni: "Ndzwani Comorian", + wnk: "Wanukaka", + wnm: "Wanggamala", + wnn: "Wunumara", + wno: "Wano", + wnp: "Wanap", + wnu: "Usan", + wnw: "Wintu", + wny: "Wanyi", + woa: "Tyaraity", + wob: "Wè Northern", + woc: "Wogeo", + wod: "Wolani", + woe: "Woleaian", + wof: "Gambian Wolof", + wog: "Wogamusin", + woi: "Kamang", + wok: "Longto", + wol: "Wolof", + wom: "Wom (Nigeria)", + won: "Wongo", + woo: "Manombai", + wor: "Woria", + wos: "Hanga Hundi", + wow: "Wawonii", + woy: "Weyto", + wpc: "Maco", + wra: "Warapu", + wrb: "Warluwara", + wrd: "Warduji", + wrg: "Warungu", + wrh: "Wiradhuri", + wri: "Wariyangga", + wrk: "Garrwa", + wrl: "Warlmanpa", + wrm: "Warumungu", + wrn: "Warnang", + wro: "Worrorra", + wrp: "Waropen", + wrr: "Wardaman", + wrs: "Waris", + wru: "Waru", + wrv: "Waruna", + wrw: "Gugu Warra", + wrx: "Wae Rana", + wry: "Merwari", + wrz: "Waray (Australia)", + wsa: "Warembori", + wsg: "Adilabad Gondi", + wsi: "Wusi", + wsk: "Waskia", + wsr: "Owenia", + wss: "Wasa", + wsu: "Wasu", + wsv: "Wotapuri-Katarqalai", + wtf: "Watiwa", + wth: "Wathawurrung", + wti: "Berta", + wtk: "Watakataui", + wtm: "Mewati", + wtw: "Wotu", + wua: "Wikngenchera", + wub: "Wunambal", + wud: "Wudu", + wuh: "Wutunhua", + wul: "Silimo", + wum: "Wumbvu", + wun: "Bungu", + wur: "Wurrugu", + wut: "Wutung", + wuu: "Wu Chinese", + wuv: "Wuvulu-Aua", + wux: "Wulna", + wuy: "Wauyai", + wwa: "Waama", + wwb: "Wakabunga", + wwo: "Wetamut", + wwr: "Warrwa", + www: "Wawa", + wxa: "Waxianghua", + wxw: "Wardandi", + wya: "Wyandot", + wyb: "Wangaaybuwan-Ngiyambaa", + wyi: "Woiwurrung", + wym: "Wymysorys", + wyr: "Wayoró", + wyy: "Western Fijian", + xaa: "Andalusian Arabic", + xab: "Sambe", + xac: "Kachari", + xad: "Adai", + xae: "Aequian", + xag: "Aghwan", + xai: "Kaimbé", + xaj: "Ararandewára", + xak: "Máku", + xal: "Kalmyk", + xam: "/Xam", + xan: "Xamtanga", + xao: "Khao", + xap: "Apalachee", + xaq: "Aquitanian", + xar: "Karami", + xas: "Kamas", + xat: "Katawixi", + xau: "Kauwera", + xav: "Xavánte", + xaw: "Kawaiisu", + xay: "Kayan Mahakam", + xbb: "Lower Burdekin", + xbc: "Bactrian", + xbd: "Bindal", + xbe: "Bigambal", + xbg: "Bunganditj", + xbi: "Kombio", + xbj: "Birrpayi", + xbm: "Middle Breton", + xbn: "Kenaboi", + xbo: "Bolgarian", + xbp: "Bibbulman", + xbr: "Kambera", + xbw: "Kambiwá", + xby: "Batyala", + xcb: "Cumbric", + xcc: "Camunic", + xce: "Celtiberian", + xcg: "Cisalpine Gaulish", + xch: "Chemakum", + xcl: "Classical Armenian", + xcm: "Comecrudo", + xcn: "Cotoname", + xco: "Chorasmian", + xcr: "Carian", + xct: "Classical Tibetan", + xcu: "Curonian", + xcv: "Chuvantsy", + xcw: "Coahuilteco", + xcy: "Cayuse", + xda: "Darkinyung", + xdc: "Dacian", + xdk: "Dharuk", + xdm: "Edomite", + xdo: "Kwandu", + xdy: "Malayic Dayak", + xeb: "Eblan", + xed: "Hdi", + xeg: "//Xegwi", + xel: "Kelo", + xem: "Kembayan", + xep: "Epi-Olmec", + xer: "Xerénte", + xes: "Kesawai", + xet: "Xetá", + xeu: "Keoru-Ahia", + xfa: "Faliscan", + xga: "Galatian", + xgb: "Gbin", + xgd: "Gudang", + xgf: "Gabrielino-Fernandeño", + xgg: "Goreng", + xgi: "Garingbal", + xgl: "Galindan", + xgm: "Dharumbal", + xgr: "Garza", + xgu: "Unggumi", + xgw: "Guwa", + xha: "Harami", + xhc: "Hunnic", + xhd: "Hadrami", + xhe: "Khetrani", + xho: "Xhosa", + xhr: "Hernican", + xht: "Hattic", + xhu: "Hurrian", + xhv: "Khua", + xib: "Iberian", + xii: "Xiri", + xil: "Illyrian", + xin: "Xinca", + xir: "Xiriâna", + xis: "Kisan", + xiv: "Indus Valley Language", + xiy: "Xipaya", + xjb: "Minjungbal", + xjt: "Jaitmatang", + xka: "Kalkoti", + xkb: "Northern Nago", + xkc: "Kho'ini", + xkd: "Mendalam Kayan", + xke: "Kereho", + xkf: "Khengkha", + xkg: "Kagoro", + xki: "Kenyan Sign Language", + xkj: "Kajali", + xkk: "Kaco'", + xkl: "Mainstream Kenyah", + xkn: "Kayan River Kayan", + xko: "Kiorr", + xkp: "Kabatei", + xkq: "Koroni", + xkr: "Xakriabá", + xks: "Kumbewaha", + xkt: "Kantosi", + xku: "Kaamba", + xkv: "Kgalagadi", + xkw: "Kembra", + xkx: "Karore", + xky: "Uma' Lasan", + xkz: "Kurtokha", + xla: "Kamula", + xlb: "Loup B", + xlc: "Lycian", + xld: "Lydian", + xle: "Lemnian", + xlg: "Ligurian (Ancient)", + xli: "Liburnian", + xln: "Alanic", + xlo: "Loup A", + xlp: "Lepontic", + xls: "Lusitanian", + xlu: "Cuneiform Luwian", + xly: "Elymian", + xma: "Mushungulu", + xmb: "Mbonga", + xmc: "Makhuwa-Marrevone", + xmd: "Mbudum", + xme: "Median", + xmf: "Mingrelian", + xmg: "Mengaka", + xmh: "Kuku-Muminh", + xmj: "Majera", + xmk: "Ancient Macedonian", + xml: "Malaysian Sign Language", + xmm: "Manado Malay", + xmn: "Manichaean Middle Persian", + xmo: "Morerebi", + xmp: "Kuku-Mu'inh", + xmq: "Kuku-Mangk", + xmr: "Meroitic", + xms: "Moroccan Sign Language", + xmt: "Matbat", + xmu: "Kamu", + xmv: "Antankarana Malagasy", + xmw: "Tsimihety Malagasy", + xmx: "Maden", + xmy: "Mayaguduna", + xmz: "Mori Bawah", + xna: "Ancient North Arabian", + xnb: "Kanakanabu", + xng: "Middle Mongolian", + xnh: "Kuanhua", + xni: "Ngarigu", + xnk: "Nganakarti", + xnn: "Northern Kankanay", + xno: "Anglo-Norman", + xnr: "Kangri", + xns: "Kanashi", + xnt: "Narragansett", + xnu: "Nukunul", + xny: "Nyiyaparli", + xnz: "Kenzi", + xoc: "O'chi'chi'", + xod: "Kokoda", + xog: "Soga", + xoi: "Kominimung", + xok: "Xokleng", + xom: "Komo (Sudan)", + xon: "Konkomba", + xoo: "Xukurú", + xop: "Kopar", + xor: "Korubo", + xow: "Kowaki", + xpa: "Pirriya", + xpc: "Pecheneg", + xpe: "Liberia Kpelle", + xpg: "Phrygian", + xpi: "Pictish", + xpj: "Mpalitjanh", + xpk: "Kulina Pano", + xpm: "Pumpokol", + xpn: "Kapinawá", + xpo: "Pochutec", + xpp: "Puyo-Paekche", + xpq: "Mohegan-Pequot", + xpr: "Parthian", + xps: "Pisidian", + xpt: "Punthamara", + xpu: "Punic", + xpy: "Puyo", + xqa: "Karakhanid", + xqt: "Qatabanian", + xra: "Krahô", + xrb: "Eastern Karaboro", + xrd: "Gundungurra", + xre: "Kreye", + xrg: "Minang", + xri: "Krikati-Timbira", + xrm: "Armazic", + xrn: "Arin", + xrq: "Karranga", + xrr: "Raetic", + xrt: "Aranama-Tamique", + xru: "Marriammu", + xrw: "Karawa", + xsa: "Sabaean", + xsb: "Sambal", + xsc: "Scythian", + xsd: "Sidetic", + xse: "Sempan", + xsh: "Shamang", + xsi: "Sio", + xsl: "South Slavey", + xsm: "Kasem", + xsn: "Sanga (Nigeria)", + xso: "Solano", + xsp: "Silopi", + xsq: "Makhuwa-Saka", + xsr: "Sherpa", + xss: "Assan", + xsu: "Sanumá", + xsv: "Sudovian", + xsy: "Saisiyat", + xta: "Alcozauca Mixtec", + xtb: "Chazumba Mixtec", + xtc: "Katcha-Kadugli-Miri", + xtd: "Diuxi-Tilantongo Mixtec", + xte: "Ketengban", + xtg: "Transalpine Gaulish", + xth: "Yitha Yitha", + xti: "Sinicahua Mixtec", + xtj: "San Juan Teita Mixtec", + xtl: "Tijaltepec Mixtec", + xtm: "Magdalena Peñasco Mixtec", + xtn: "Northern Tlaxiaco Mixtec", + xto: "Tokharian A", + xtp: "San Miguel Piedras Mixtec", + xtq: "Tumshuqese", + xtr: "Early Tripuri", + xts: "Sindihui Mixtec", + xtt: "Tacahua Mixtec", + xtu: "Cuyamecalco Mixtec", + xtv: "Thawa", + xtw: "Tawandê", + xty: "Yoloxochitl Mixtec", + xtz: "Tasmanian", + xua: "Alu Kurumba", + xub: "Betta Kurumba", + xud: "Umiida", + xug: "Kunigami", + xuj: "Jennu Kurumba", + xul: "Ngunawal", + xum: "Umbrian", + xun: "Unggaranggu", + xuo: "Kuo", + xup: "Upper Umpqua", + xur: "Urartian", + xut: "Kuthant", + xuu: "Kxoe", + xve: "Venetic", + xvi: "Kamviri", + xvn: "Vandalic", + xvo: "Volscian", + xvs: "Vestinian", + xwa: "Kwaza", + xwc: "Woccon", + xwd: "Wadi Wadi", + xwe: "Xwela Gbe", + xwg: "Kwegu", + xwj: "Wajuk", + xwk: "Wangkumara", + xwl: "Western Xwla Gbe", + xwo: "Written Oirat", + xwr: "Kwerba Mamberamo", + xwt: "Wotjobaluk", + xww: "Wemba Wemba", + xxb: "Boro (Ghana)", + xxk: "Ke'o", + xxm: "Minkin", + xxr: "Koropó", + xxt: "Tambora", + xya: "Yaygir", + xyb: "Yandjibara", + xyj: "Mayi-Yapi", + xyk: "Mayi-Kulan", + xyl: "Yalakalore", + xyt: "Mayi-Thakurti", + xyy: "Yorta Yorta", + xzh: "Zhang-Zhung", + xzm: "Zemgalian", + xzp: "Ancient Zapotec", + yaa: "Yaminahua", + yab: "Yuhup", + yac: "Pass Valley Yali", + yad: "Yagua", + yae: "Pumé", + yaf: "Yaka (Democratic Republic of Congo)", + yag: "Yámana", + yah: "Yazgulyam", + yai: "Yagnobi", + yaj: "Banda-Yangere", + yak: "Yakama", + yal: "Yalunka", + yam: "Yamba", + yan: "Mayangna", + yao: "Yao", + yap: "Yapese", + yaq: "Yaqui", + yar: "Yabarana", + yas: "Nugunu (Cameroon)", + yat: "Yambeta", + yau: "Yuwana", + yav: "Yangben", + yaw: "Yawalapití", + yax: "Yauma", + yay: "Agwagwune", + yaz: "Lokaa", + yba: "Yala", + ybb: "Yemba", + ybe: "West Yugur", + ybh: "Yakha", + ybi: "Yamphu", + ybj: "Hasha", + ybk: "Bokha", + ybl: "Yukuben", + ybm: "Yaben", + ybn: "Yabaâna", + ybo: "Yabong", + ybx: "Yawiyo", + yby: "Yaweyuha", + ych: "Chesu", + ycl: "Lolopo", + ycn: "Yucuna", + ycp: "Chepya", + yda: "Yanda", + ydd: "Eastern Yiddish", + yde: "Yangum Dey", + ydg: "Yidgha", + ydk: "Yoidik", + yea: "Ravula", + yec: "Yeniche", + yee: "Yimas", + yei: "Yeni", + yej: "Yevanic", + yel: "Yela", + yer: "Tarok", + yes: "Nyankpa", + yet: "Yetfa", + yeu: "Yerukula", + yev: "Yapunda", + yey: "Yeyi", + yga: "Malyangapa", + ygi: "Yiningayi", + ygl: "Yangum Gel", + ygm: "Yagomi", + ygp: "Gepo", + ygr: "Yagaria", + ygs: "Yolŋu Sign Language", + ygu: "Yugul", + ygw: "Yagwoia", + yha: "Baha Buyang", + yhd: "Judeo-Iraqi Arabic", + yhl: "Hlepho Phowa", + yhs: "Yan-nhaŋu Sign Language", + yia: "Yinggarda", + yid: "Yiddish", + yif: "Ache", + yig: "Wusa Nasu", + yih: "Western Yiddish", + yii: "Yidiny", + yij: "Yindjibarndi", + yik: "Dongshanba Lalo", + yil: "Yindjilandji", + yim: "Yimchungru Naga", + yin: "Yinchia", + yip: "Pholo", + yiq: "Miqie", + yir: "North Awyu", + yis: "Yis", + yit: "Eastern Lalu", + yiu: "Awu", + yiv: "Northern Nisu", + yix: "Axi Yi", + yiz: "Azhe", + yka: "Yakan", + ykg: "Northern Yukaghir", + yki: "Yoke", + ykk: "Yakaikeke", + ykl: "Khlula", + ykm: "Kap", + ykn: "Kua-nsi", + yko: "Yasa", + ykr: "Yekora", + ykt: "Kathu", + yku: "Kuamasi", + yky: "Yakoma", + yla: "Yaul", + ylb: "Yaleba", + yle: "Yele", + ylg: "Yelogu", + yli: "Angguruk Yali", + yll: "Yil", + ylm: "Limi", + yln: "Langnian Buyang", + ylo: "Naluo Yi", + ylr: "Yalarnnga", + ylu: "Aribwaung", + yly: "Nyâlayu", + ymb: "Yambes", + ymc: "Southern Muji", + ymd: "Muda", + yme: "Yameo", + ymg: "Yamongeri", + ymh: "Mili", + ymi: "Moji", + ymk: "Makwe", + yml: "Iamalele", + ymm: "Maay", + ymn: "Yamna", + ymo: "Yangum Mon", + ymp: "Yamap", + ymq: "Qila Muji", + ymr: "Malasar", + yms: "Mysian", + ymx: "Northern Muji", + ymz: "Muzi", + yna: "Aluo", + ynd: "Yandruwandha", + yne: "Lang'e", + yng: "Yango", + ynk: "Naukan Yupik", + ynl: "Yangulam", + ynn: "Yana", + yno: "Yong", + ynq: "Yendang", + yns: "Yansi", + ynu: "Yahuna", + yob: "Yoba", + yog: "Yogad", + yoi: "Yonaguni", + yok: "Yokuts", + yol: "Yola", + yom: "Yombe", + yon: "Yongkom", + yor: "Yoruba", + yot: "Yotti", + yox: "Yoron", + yoy: "Yoy", + ypa: "Phala", + ypb: "Labo Phowa", + ypg: "Phola", + yph: "Phupha", + ypm: "Phuma", + ypn: "Ani Phowa", + ypo: "Alo Phola", + ypp: "Phupa", + ypz: "Phuza", + yra: "Yerakai", + yrb: "Yareba", + yre: "Yaouré", + yrk: "Nenets", + yrl: "Nhengatu", + yrm: "Yirrk-Mel", + yrn: "Yerong", + yro: "Yaroamë", + yrs: "Yarsun", + yrw: "Yarawata", + yry: "Yarluyandi", + ysc: "Yassic", + ysd: "Samatao", + ysg: "Sonaga", + ysl: "Yugoslavian Sign Language", + ysn: "Sani", + yso: "Nisi (China)", + ysp: "Southern Lolopo", + ysr: "Sirenik Yupik", + yss: "Yessan-Mayo", + ysy: "Sanie", + yta: "Talu", + ytl: "Tanglang", + ytp: "Thopho", + ytw: "Yout Wam", + yty: "Yatay", + yua: "Yucateco", + yub: "Yugambal", + yuc: "Yuchi", + yud: "Judeo-Tripolitanian Arabic", + yue: "Yue Chinese", + yuf: "Havasupai-Walapai-Yavapai", + yug: "Yug", + yui: "Yurutí", + yuj: "Karkar-Yuri", + yuk: "Yuki", + yul: "Yulu", + yum: "Quechan", + yun: "Bena (Nigeria)", + yup: "Yukpa", + yuq: "Yuqui", + yur: "Yurok", + yut: "Yopno", + yuw: "Yau (Morobe Province)", + yux: "Southern Yukaghir", + yuy: "East Yugur", + yuz: "Yuracare", + yva: "Yawa", + yvt: "Yavitero", + ywa: "Kalou", + ywg: "Yinhawangka", + ywl: "Western Lalu", + ywn: "Yawanawa", + ywq: "Wuding-Luquan Yi", + ywr: "Yawuru", + ywt: "Xishanba Lalo", + ywu: "Wumeng Nasu", + yww: "Yawarawarga", + yxa: "Mayawali", + yxg: "Yagara", + yxl: "Yardliyawarra", + yxm: "Yinwum", + yxu: "Yuyu", + yxy: "Yabula Yabula", + yyr: "Yir Yoront", + yyu: "Yau (Sandaun Province)", + yyz: "Ayizi", + yzg: "E'ma Buyang", + yzk: "Zokhuo", + zaa: "Sierra de Juárez Zapotec", + zab: "Western Tlacolula Valley Zapotec", + zac: "Ocotlán Zapotec", + zad: "Cajonos Zapotec", + zae: "Yareni Zapotec", + zaf: "Ayoquesco Zapotec", + zag: "Zaghawa", + zah: "Zangwal", + zai: "Isthmus Zapotec", + zaj: "Zaramo", + zak: "Zanaki", + zal: "Zauzou", + zam: "Miahuatlán Zapotec", + zao: "Ozolotepec Zapotec", + zap: "Zapotec", + zaq: "Aloápam Zapotec", + zar: "Rincón Zapotec", + zas: "Santo Domingo Albarradas Zapotec", + zat: "Tabaa Zapotec", + zau: "Zangskari", + zav: "Yatzachi Zapotec", + zaw: "Mitla Zapotec", + zax: "Xadani Zapotec", + zay: "Zayse-Zergulla", + zaz: "Zari", + zbc: "Central Berawan", + zbe: "East Berawan", + zbl: "Blissymbols", + zbt: "Batui", + zbw: "West Berawan", + zca: "Coatecas Altas Zapotec", + zch: "Central Hongshuihe Zhuang", + zdj: "Ngazidja Comorian", + zea: "Zeeuws", + zeg: "Zenag", + zeh: "Eastern Hongshuihe Zhuang", + zen: "Zenaga", + zga: "Kinga", + zgb: "Guibei Zhuang", + zgh: "Standard Moroccan Tamazight", + zgm: "Minz Zhuang", + zgn: "Guibian Zhuang", + zgr: "Magori", + zha: "Zhuang", + zhb: "Zhaba", + zhd: "Dai Zhuang", + zhi: "Zhire", + zhn: "Nong Zhuang", + zho: "Chinese", + zhw: "Zhoa", + zia: "Zia", + zib: "Zimbabwe Sign Language", + zik: "Zimakani", + zil: "Zialo", + zim: "Mesme", + zin: "Zinza", + zir: "Ziriya", + ziw: "Zigula", + ziz: "Zizilivakan", + zka: "Kaimbulawa", + zkb: "Koibal", + zkd: "Kadu", + zkg: "Koguryo", + zkh: "Khorezmian", + zkk: "Karankawa", + zkn: "Kanan", + zko: "Kott", + zkp: "São Paulo Kaingáng", + zkr: "Zakhring", + zkt: "Kitan", + zku: "Kaurna", + zkv: "Krevinian", + zkz: "Khazar", + zlj: "Liujiang Zhuang", + zlm: "Malay (individual language)", + zln: "Lianshan Zhuang", + zlq: "Liuqian Zhuang", + zma: "Manda (Australia)", + zmb: "Zimba", + zmc: "Margany", + zmd: "Maridan", + zme: "Mangerr", + zmf: "Mfinu", + zmg: "Marti Ke", + zmh: "Makolkol", + zmi: "Negeri Sembilan Malay", + zmj: "Maridjabin", + zmk: "Mandandanyi", + zml: "Madngele", + zmm: "Marimanindji", + zmn: "Mbangwe", + zmo: "Molo", + zmp: "Mpuono", + zmq: "Mituku", + zmr: "Maranunggu", + zms: "Mbesa", + zmt: "Maringarr", + zmu: "Muruwari", + zmv: "Mbariman-Gudhinma", + zmw: "Mbo (Democratic Republic of Congo)", + zmx: "Bomitaba", + zmy: "Mariyedi", + zmz: "Mbandja", + zna: "Zan Gula", + zne: "Zande (individual language)", + zng: "Mang", + znk: "Manangkari", + zns: "Mangas", + zoc: "Copainalá Zoque", + zoh: "Chimalapa Zoque", + zom: "Zou", + zoo: "Asunción Mixtepec Zapotec", + zoq: "Tabasco Zoque", + zor: "Rayón Zoque", + zos: "Francisco León Zoque", + zpa: "Lachiguiri Zapotec", + zpb: "Yautepec Zapotec", + zpc: "Choapan Zapotec", + zpd: "Southeastern Ixtlán Zapotec", + zpe: "Petapa Zapotec", + zpf: "San Pedro Quiatoni Zapotec", + zpg: "Guevea De Humboldt Zapotec", + zph: "Totomachapan Zapotec", + zpi: "Santa María Quiegolani Zapotec", + zpj: "Quiavicuzas Zapotec", + zpk: "Tlacolulita Zapotec", + zpl: "Lachixío Zapotec", + zpm: "Mixtepec Zapotec", + zpn: "Santa Inés Yatzechi Zapotec", + zpo: "Amatlán Zapotec", + zpp: "El Alto Zapotec", + zpq: "Zoogocho Zapotec", + zpr: "Santiago Xanica Zapotec", + zps: "Coatlán Zapotec", + zpt: "San Vicente Coatlán Zapotec", + zpu: "Yalálag Zapotec", + zpv: "Chichicapan Zapotec", + zpw: "Zaniza Zapotec", + zpx: "San Baltazar Loxicha Zapotec", + zpy: "Mazaltepec Zapotec", + zpz: "Texmelucan Zapotec", + zqe: "Qiubei Zhuang", + zra: "Kara (Korea)", + zrg: "Mirgan", + zrn: "Zerenkel", + zro: "Záparo", + zrp: "Zarphatic", + zrs: "Mairasi", + zsa: "Sarasira", + zsk: "Kaskean", + zsl: "Zambian Sign Language", + zsm: "Standard Malay", + zsr: "Southern Rincon Zapotec", + zsu: "Sukurum", + zte: "Elotepec Zapotec", + ztg: "Xanaguía Zapotec", + ztl: "Lapaguía-Guivini Zapotec", + ztm: "San Agustín Mixtepec Zapotec", + ztn: "Santa Catarina Albarradas Zapotec", + ztp: "Loxicha Zapotec", + ztq: "Quioquitani-Quierí Zapotec", + zts: "Tilquiapan Zapotec", + ztt: "Tejalapan Zapotec", + ztu: "Güilá Zapotec", + ztx: "Zaachila Zapotec", + zty: "Yatee Zapotec", + zua: "Zeem", + zuh: "Tokano", + zul: "Zulu", + zum: "Kumzari", + zun: "Zuni", + zuy: "Zumaya", + zwa: "Zay", + zxx: "No linguistic content", + zyb: "Yongbei Zhuang", + zyg: "Yang Zhuang", + zyj: "Youjiang Zhuang", + zyn: "Yongnan Zhuang", + zyp: "Zyphe Chin", + zza: "Zaza", + zzj: "Zuojiang Zhuang", +} as Partial>; diff --git a/versions/4.1.0/demo/assets/logo_white.png b/versions/4.1.0/demo/assets/logo_white.png new file mode 100644 index 0000000000..c971fff7c1 Binary files /dev/null and b/versions/4.1.0/demo/assets/logo_white.png differ diff --git a/versions/4.1.0/demo/assets/play.svg b/versions/4.1.0/demo/assets/play.svg new file mode 100644 index 0000000000..8b90856ef6 --- /dev/null +++ b/versions/4.1.0/demo/assets/play.svg @@ -0,0 +1 @@ + diff --git a/versions/4.1.0/demo/assets/select_arrow_black.svg b/versions/4.1.0/demo/assets/select_arrow_black.svg new file mode 100644 index 0000000000..d70741c1ba --- /dev/null +++ b/versions/4.1.0/demo/assets/select_arrow_black.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/versions/4.1.0/demo/assets/select_arrow_white.svg b/versions/4.1.0/demo/assets/select_arrow_white.svg new file mode 100644 index 0000000000..fabb9e5db1 --- /dev/null +++ b/versions/4.1.0/demo/assets/select_arrow_white.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/versions/4.1.0/demo/assets/spinner.gif b/versions/4.1.0/demo/assets/spinner.gif new file mode 100644 index 0000000000..0cac9fd4ac Binary files /dev/null and b/versions/4.1.0/demo/assets/spinner.gif differ diff --git a/versions/4.1.0/demo/bundle.js b/versions/4.1.0/demo/bundle.js new file mode 100644 index 0000000000..e6ccd7aabc --- /dev/null +++ b/versions/4.1.0/demo/bundle.js @@ -0,0 +1,75 @@ +"use strict";(()=>{var Ire=Object.create;var cT=Object.defineProperty,Tre=Object.defineProperties,kre=Object.getOwnPropertyDescriptor,Ere=Object.getOwnPropertyDescriptors,_re=Object.getOwnPropertyNames,bh=Object.getOwnPropertySymbols,Rre=Object.getPrototypeOf,fT=Object.prototype.hasOwnProperty,xL=Object.prototype.propertyIsEnumerable;var wL=(t,e,r)=>e in t?cT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))fT.call(e,r)&&wL(t,r,e[r]);if(bh)for(var r of bh(e))xL.call(e,r)&&wL(t,r,e[r]);return t},nt=(t,e)=>Tre(t,Ere(e));var AL=(t,e)=>{var r={};for(var n in t)fT.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&bh)for(var n of bh(t))e.indexOf(n)<0&&xL.call(t,n)&&(r[n]=t[n]);return r};var PL=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Mre=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _re(e))!fT.call(t,i)&&i!==r&&cT(t,i,{get:()=>e[i],enumerable:!(n=kre(e,i))||n.enumerable});return t};var Se=(t,e,r)=>(r=t!=null?Ire(Rre(t)):{},Mre(e||!t||!t.__esModule?cT(r,"default",{value:t,enumerable:!0}):r,t));var g,u=PL(()=>{g={PRODUCTION:0,DEV:1,CURRENT_ENV:0}});var h,l=PL(()=>{h={CURRENT_LEVEL:"INFO"}});var pe=_((mT,OL)=>{"use strict";u();l();var gc=function(t){return t&&t.Math===Math&&t};OL.exports=gc(typeof globalThis=="object"&&globalThis)||gc(typeof window=="object"&&window)||gc(typeof self=="object"&&self)||gc(typeof global=="object"&&global)||gc(typeof mT=="object"&&mT)||function(){return this}()||Function("return this")()});var te=_((MGe,LL)=>{"use strict";u();l();LL.exports=function(t){try{return!!t()}catch(e){return!0}}});var ke=_((xGe,NL)=>{"use strict";u();l();var xre=te();NL.exports=!xre(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var ju=_((OGe,DL)=>{"use strict";u();l();var Are=te();DL.exports=!Are(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")})});var we=_((DGe,qL)=>{"use strict";u();l();var Pre=ju(),Sh=Function.prototype.call;qL.exports=Pre?Sh.bind(Sh):function(){return Sh.apply(Sh,arguments)}});var hc=_(FL=>{"use strict";u();l();var BL={}.propertyIsEnumerable,UL=Object.getOwnPropertyDescriptor,Ore=UL&&!BL.call({1:2},1);FL.f=Ore?function(e){var r=UL(this,e);return!!r&&r.enumerable}:BL});var cn=_((zGe,KL)=>{"use strict";u();l();KL.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var ie=_((HGe,VL)=>{"use strict";u();l();var zL=ju(),jL=Function.prototype,pT=jL.call,Lre=zL&&jL.bind.bind(pT,pT);VL.exports=zL?Lre:function(t){return function(){return pT.apply(t,arguments)}}});var mr=_(($Ge,GL)=>{"use strict";u();l();var HL=ie(),Nre=HL({}.toString),Dre=HL("".slice);GL.exports=function(t){return Dre(Nre(t),8,-1)}});var ps=_((XGe,WL)=>{"use strict";u();l();var qre=ie(),Bre=te(),Ure=mr(),gT=Object,Fre=qre("".split);WL.exports=Bre(function(){return!gT("z").propertyIsEnumerable(0)})?function(t){return Ure(t)==="String"?Fre(t,""):gT(t)}:gT});var Cr=_((eWe,$L)=>{"use strict";u();l();$L.exports=function(t){return t==null}});var ct=_((nWe,YL)=>{"use strict";u();l();var Kre=Cr(),zre=TypeError;YL.exports=function(t){if(Kre(t))throw new zre("Can't call method on "+t);return t}});var Bt=_((oWe,QL)=>{"use strict";u();l();var jre=ps(),Vre=ct();QL.exports=function(t){return jre(Vre(t))}});var yT=_((lWe,XL)=>{"use strict";u();l();var hT=typeof document=="object"&&document.all,Hre=typeof hT=="undefined"&&hT!==void 0;XL.exports={all:hT,IS_HTMLDDA:Hre}});var Ne=_((fWe,JL)=>{"use strict";u();l();var ZL=yT(),Gre=ZL.all;JL.exports=ZL.IS_HTMLDDA?function(t){return typeof t=="function"||t===Gre}:function(t){return typeof t=="function"}});var De=_((gWe,rN)=>{"use strict";u();l();var eN=Ne(),tN=yT(),Wre=tN.all;rN.exports=tN.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:eN(t)||t===Wre}:function(t){return typeof t=="object"?t!==null:eN(t)}});var Xe=_((vWe,nN)=>{"use strict";u();l();var vT=pe(),$re=Ne(),Yre=function(t){return $re(t)?t:void 0};nN.exports=function(t,e){return arguments.length<2?Yre(vT[t]):vT[t]&&vT[t][e]}});var fn=_((IWe,iN)=>{"use strict";u();l();var Qre=ie();iN.exports=Qre({}.isPrototypeOf)});var wi=_((EWe,aN)=>{"use strict";u();l();aN.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var xi=_((MWe,cN)=>{"use strict";u();l();var dN=pe(),bT=wi(),oN=dN.process,sN=dN.Deno,uN=oN&&oN.versions||sN&&sN.version,lN=uN&&uN.v8,ni,Ih;lN&&(ni=lN.split("."),Ih=ni[0]>0&&ni[0]<4?1:+(ni[0]+ni[1]));!Ih&&bT&&(ni=bT.match(/Edge\/(\d+)/),(!ni||ni[1]>=74)&&(ni=bT.match(/Chrome\/(\d+)/),ni&&(Ih=+ni[1])));cN.exports=Ih});var gs=_((xWe,mN)=>{"use strict";u();l();var fN=xi(),Xre=te(),Zre=pe(),Jre=Zre.String;mN.exports=!!Object.getOwnPropertySymbols&&!Xre(function(){var t=Symbol("symbol detection");return!Jre(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&fN&&fN<41})});var ST=_((OWe,pN)=>{"use strict";u();l();var ene=gs();pN.exports=ene&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var eo=_((DWe,gN)=>{"use strict";u();l();var tne=Xe(),rne=Ne(),nne=fn(),ine=ST(),ane=Object;gN.exports=ine?function(t){return typeof t=="symbol"}:function(t){var e=tne("Symbol");return rne(e)&&nne(e.prototype,ane(t))}});var to=_((UWe,hN)=>{"use strict";u();l();var one=String;hN.exports=function(t){try{return one(t)}catch(e){return"Object"}}});var ft=_((zWe,yN)=>{"use strict";u();l();var sne=Ne(),une=to(),lne=TypeError;yN.exports=function(t){if(sne(t))return t;throw new lne(une(t)+" is not a function")}});var Ai=_((HWe,vN)=>{"use strict";u();l();var dne=ft(),cne=Cr();vN.exports=function(t,e){var r=t[e];return cne(r)?void 0:dne(r)}});var ET=_(($We,bN)=>{"use strict";u();l();var IT=we(),TT=Ne(),kT=De(),fne=TypeError;bN.exports=function(t,e){var r,n;if(e==="string"&&TT(r=t.toString)&&!kT(n=IT(r,t))||TT(r=t.valueOf)&&!kT(n=IT(r,t))||e!=="string"&&TT(r=t.toString)&&!kT(n=IT(r,t)))return n;throw new fne("Can't convert object to primitive value")}});var bt=_((XWe,SN)=>{"use strict";u();l();SN.exports=!1});var Th=_((e4e,TN)=>{"use strict";u();l();var IN=pe(),mne=Object.defineProperty;TN.exports=function(t,e){try{mne(IN,t,{value:e,configurable:!0,writable:!0})}catch(r){IN[t]=e}return e}});var kh=_((n4e,EN)=>{"use strict";u();l();var pne=pe(),gne=Th(),kN="__core-js_shared__",hne=pne[kN]||gne(kN,{});EN.exports=hne});var hs=_((o4e,RN)=>{"use strict";u();l();var yne=bt(),_N=kh();(RN.exports=function(t,e){return _N[t]||(_N[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.34.0",mode:yne?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Ve=_((l4e,MN)=>{"use strict";u();l();var vne=ct(),bne=Object;MN.exports=function(t){return bne(vne(t))}});var Fe=_((f4e,CN)=>{"use strict";u();l();var Sne=ie(),Ine=Ve(),Tne=Sne({}.hasOwnProperty);CN.exports=Object.hasOwn||function(e,r){return Tne(Ine(e),r)}});var ys=_((g4e,wN)=>{"use strict";u();l();var kne=ie(),Ene=0,_ne=Math.random(),Rne=kne(1 .toString);wN.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+Rne(++Ene+_ne,36)}});var qe=_((v4e,AN)=>{"use strict";u();l();var Mne=pe(),Cne=hs(),xN=Fe(),wne=ys(),xne=gs(),Ane=ST(),Vu=Mne.Symbol,_T=Cne("wks"),Pne=Ane?Vu.for||Vu:Vu&&Vu.withoutSetter||wne;AN.exports=function(t){return xN(_T,t)||(_T[t]=xne&&xN(Vu,t)?Vu[t]:Pne("Symbol."+t)),_T[t]}});var yc=_((I4e,LN)=>{"use strict";u();l();var One=we(),PN=De(),ON=eo(),Lne=Ai(),Nne=ET(),Dne=qe(),qne=TypeError,Bne=Dne("toPrimitive");LN.exports=function(t,e){if(!PN(t)||ON(t))return t;var r=Lne(t,Bne),n;if(r){if(e===void 0&&(e="default"),n=One(r,t,e),!PN(n)||ON(n))return n;throw new qne("Can't convert object to primitive value")}return e===void 0&&(e="number"),Nne(t,e)}});var Pi=_((E4e,NN)=>{"use strict";u();l();var Une=yc(),Fne=eo();NN.exports=function(t){var e=Une(t,"string");return Fne(e)?e:e+""}});var vc=_((M4e,qN)=>{"use strict";u();l();var Kne=pe(),DN=De(),RT=Kne.document,zne=DN(RT)&&DN(RT.createElement);qN.exports=function(t){return zne?RT.createElement(t):{}}});var MT=_((x4e,BN)=>{"use strict";u();l();var jne=ke(),Vne=te(),Hne=vc();BN.exports=!jne&&!Vne(function(){return Object.defineProperty(Hne("div"),"a",{get:function(){return 7}}).a!==7})});var rr=_(FN=>{"use strict";u();l();var Gne=ke(),Wne=we(),$ne=hc(),Yne=cn(),Qne=Bt(),Xne=Pi(),Zne=Fe(),Jne=MT(),UN=Object.getOwnPropertyDescriptor;FN.f=Gne?UN:function(e,r){if(e=Qne(e),r=Xne(r),Jne)try{return UN(e,r)}catch(n){}if(Zne(e,r))return Yne(!Wne($ne.f,e,r),e[r])}});var CT=_((D4e,KN)=>{"use strict";u();l();var eie=ke(),tie=te();KN.exports=eie&&tie(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var xe=_((U4e,zN)=>{"use strict";u();l();var rie=De(),nie=String,iie=TypeError;zN.exports=function(t){if(rie(t))return t;throw new iie(nie(t)+" is not an object")}});var mt=_(VN=>{"use strict";u();l();var aie=ke(),oie=MT(),sie=CT(),Eh=xe(),jN=Pi(),uie=TypeError,wT=Object.defineProperty,lie=Object.getOwnPropertyDescriptor,xT="enumerable",AT="configurable",PT="writable";VN.f=aie?sie?function(e,r,n){if(Eh(e),r=jN(r),Eh(n),typeof e=="function"&&r==="prototype"&&"value"in n&&PT in n&&!n[PT]){var i=lie(e,r);i&&i[PT]&&(e[r]=n.value,n={configurable:AT in n?n[AT]:i[AT],enumerable:xT in n?n[xT]:i[xT],writable:!1})}return wT(e,r,n)}:wT:function(e,r,n){if(Eh(e),r=jN(r),Eh(n),oie)try{return wT(e,r,n)}catch(i){}if("get"in n||"set"in n)throw new uie("Accessors not supported");return"value"in n&&(e[r]=n.value),e}});var pr=_((H4e,HN)=>{"use strict";u();l();var die=ke(),cie=mt(),fie=cn();HN.exports=die?function(t,e,r){return cie.f(t,e,fie(1,r))}:function(t,e,r){return t[e]=r,t}});var vs=_(($4e,WN)=>{"use strict";u();l();var OT=ke(),mie=Fe(),GN=Function.prototype,pie=OT&&Object.getOwnPropertyDescriptor,LT=mie(GN,"name"),gie=LT&&function(){}.name==="something",hie=LT&&(!OT||OT&&pie(GN,"name").configurable);WN.exports={EXISTS:LT,PROPER:gie,CONFIGURABLE:hie}});var _h=_((X4e,$N)=>{"use strict";u();l();var yie=ie(),vie=Ne(),NT=kh(),bie=yie(Function.toString);vie(NT.inspectSource)||(NT.inspectSource=function(t){return bie(t)});$N.exports=NT.inspectSource});var DT=_((e3e,QN)=>{"use strict";u();l();var Sie=pe(),Iie=Ne(),YN=Sie.WeakMap;QN.exports=Iie(YN)&&/native code/.test(String(YN))});var bc=_((n3e,ZN)=>{"use strict";u();l();var Tie=hs(),kie=ys(),XN=Tie("keys");ZN.exports=function(t){return XN[t]||(XN[t]=kie(t))}});var Hu=_((o3e,JN)=>{"use strict";u();l();JN.exports={}});var Lt=_((l3e,r1)=>{"use strict";u();l();var Eie=DT(),t1=pe(),_ie=De(),Rie=pr(),qT=Fe(),BT=kh(),Mie=bc(),Cie=Hu(),e1="Object already initialized",UT=t1.TypeError,wie=t1.WeakMap,Rh,Sc,Mh,xie=function(t){return Mh(t)?Sc(t):Rh(t,{})},Aie=function(t){return function(e){var r;if(!_ie(e)||(r=Sc(e)).type!==t)throw new UT("Incompatible receiver, "+t+" required");return r}};Eie||BT.state?(ii=BT.state||(BT.state=new wie),ii.get=ii.get,ii.has=ii.has,ii.set=ii.set,Rh=function(t,e){if(ii.has(t))throw new UT(e1);return e.facade=t,ii.set(t,e),e},Sc=function(t){return ii.get(t)||{}},Mh=function(t){return ii.has(t)}):(bs=Mie("state"),Cie[bs]=!0,Rh=function(t,e){if(qT(t,bs))throw new UT(e1);return e.facade=t,Rie(t,bs,e),e},Sc=function(t){return qT(t,bs)?t[bs]:{}},Mh=function(t){return qT(t,bs)});var ii,bs;r1.exports={set:Rh,get:Sc,has:Mh,enforce:xie,getterFor:Aie}});var xh=_((f3e,a1)=>{"use strict";u();l();var KT=ie(),Pie=te(),Oie=Ne(),Ch=Fe(),FT=ke(),Lie=vs().CONFIGURABLE,Nie=_h(),i1=Lt(),Die=i1.enforce,qie=i1.get,n1=String,wh=Object.defineProperty,Bie=KT("".slice),Uie=KT("".replace),Fie=KT([].join),Kie=FT&&!Pie(function(){return wh(function(){},"length",{value:8}).length!==8}),zie=String(String).split("String"),jie=a1.exports=function(t,e,r){Bie(n1(e),0,7)==="Symbol("&&(e="["+Uie(n1(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Ch(t,"name")||Lie&&t.name!==e)&&(FT?wh(t,"name",{value:e,configurable:!0}):t.name=e),Kie&&r&&Ch(r,"arity")&&t.length!==r.arity&&wh(t,"length",{value:r.arity});try{r&&Ch(r,"constructor")&&r.constructor?FT&&wh(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=Die(t);return Ch(n,"source")||(n.source=Fie(zie,typeof e=="string"?e:"")),t};Function.prototype.toString=jie(function(){return Oie(this)&&qie(this).source||Nie(this)},"toString")});var it=_((g3e,o1)=>{"use strict";u();l();var Vie=Ne(),Hie=mt(),Gie=xh(),Wie=Th();o1.exports=function(t,e,r,n){n||(n={});var i=n.enumerable,a=n.name!==void 0?n.name:e;if(Vie(r)&&Gie(r,a,n),n.global)i?t[e]=r:Wie(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch(o){}i?t[e]=r:Hie.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t}});var zT=_((v3e,s1)=>{"use strict";u();l();var $ie=Math.ceil,Yie=Math.floor;s1.exports=Math.trunc||function(e){var r=+e;return(r>0?Yie:$ie)(r)}});var Et=_((I3e,u1)=>{"use strict";u();l();var Qie=zT();u1.exports=function(t){var e=+t;return e!==e||e===0?0:Qie(e)}});var ai=_((E3e,l1)=>{"use strict";u();l();var Xie=Et(),Zie=Math.max,Jie=Math.min;l1.exports=function(t,e){var r=Xie(t);return r<0?Zie(r+e,0):Jie(r,e)}});var jr=_((M3e,d1)=>{"use strict";u();l();var eae=Et(),tae=Math.min;d1.exports=function(t){return t>0?tae(eae(t),9007199254740991):0}});var Ge=_((x3e,c1)=>{"use strict";u();l();var rae=jr();c1.exports=function(t){return rae(t.length)}});var Gu=_((O3e,m1)=>{"use strict";u();l();var nae=Bt(),iae=ai(),aae=Ge(),f1=function(t){return function(e,r,n){var i=nae(e),a=aae(i),o=iae(n,a),s;if(t&&r!==r){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===r)return t||o||0;return!t&&-1}};m1.exports={includes:f1(!0),indexOf:f1(!1)}});var VT=_((D3e,g1)=>{"use strict";u();l();var oae=ie(),jT=Fe(),sae=Bt(),uae=Gu().indexOf,lae=Hu(),p1=oae([].push);g1.exports=function(t,e){var r=sae(t),n=0,i=[],a;for(a in r)!jT(lae,a)&&jT(r,a)&&p1(i,a);for(;e.length>n;)jT(r,a=e[n++])&&(~uae(i,a)||p1(i,a));return i}});var Ah=_((U3e,h1)=>{"use strict";u();l();h1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var sa=_(y1=>{"use strict";u();l();var dae=VT(),cae=Ah(),fae=cae.concat("length","prototype");y1.f=Object.getOwnPropertyNames||function(e){return dae(e,fae)}});var Ic=_(v1=>{"use strict";u();l();v1.f=Object.getOwnPropertySymbols});var Ph=_(($3e,b1)=>{"use strict";u();l();var mae=Xe(),pae=ie(),gae=sa(),hae=Ic(),yae=xe(),vae=pae([].concat);b1.exports=mae("Reflect","ownKeys")||function(e){var r=gae.f(yae(e)),n=hae.f;return n?vae(r,n(e)):r}});var Tc=_((X3e,I1)=>{"use strict";u();l();var S1=Fe(),bae=Ph(),Sae=rr(),Iae=mt();I1.exports=function(t,e,r){for(var n=bae(e),i=Iae.f,a=Sae.f,o=0;o{"use strict";u();l();var Tae=te(),kae=Ne(),Eae=/#|\.prototype\./,kc=function(t,e){var r=Rae[_ae(t)];return r===Cae?!0:r===Mae?!1:kae(e)?Tae(e):!!e},_ae=kc.normalize=function(t){return String(t).replace(Eae,".").toLowerCase()},Rae=kc.data={},Mae=kc.NATIVE="N",Cae=kc.POLYFILL="P";T1.exports=kc});var q=_((n6e,k1)=>{"use strict";u();l();var HT=pe(),wae=rr().f,xae=pr(),Aae=it(),Pae=Th(),Oae=Tc(),Lae=Wu();k1.exports=function(t,e){var r=t.target,n=t.global,i=t.stat,a,o,s,d,c,m;if(n?o=HT:i?o=HT[r]||Pae(r,{}):o=(HT[r]||{}).prototype,o)for(s in e){if(c=e[s],t.dontCallGetSet?(m=wae(o,s),d=m&&m.value):d=o[s],a=Lae(n?s:r+(i?".":"#")+s,t.forced),!a&&d!==void 0){if(typeof c==typeof d)continue;Oae(c,d)}(t.sham||d&&d.sham)&&xae(c,"sham",!0),Aae(o,s,c,t)}}});var Oh=_((o6e,_1)=>{"use strict";u();l();var Nae=qe(),Dae=Nae("toStringTag"),E1={};E1[Dae]="z";_1.exports=String(E1)==="[object z]"});var oi=_((l6e,R1)=>{"use strict";u();l();var qae=Oh(),Bae=Ne(),Lh=mr(),Uae=qe(),Fae=Uae("toStringTag"),Kae=Object,zae=Lh(function(){return arguments}())==="Arguments",jae=function(t,e){try{return t[e]}catch(r){}};R1.exports=qae?Lh:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=jae(e=Kae(t),Fae))=="string"?r:zae?Lh(e):(n=Lh(e))==="Object"&&Bae(e.callee)?"Arguments":n}});var Ce=_((f6e,M1)=>{"use strict";u();l();var Vae=oi(),Hae=String;M1.exports=function(t){if(Vae(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Hae(t)}});var $u=_((g6e,C1)=>{"use strict";u();l();var Gae=VT(),Wae=Ah();C1.exports=Object.keys||function(e){return Gae(e,Wae)}});var Nh=_(w1=>{"use strict";u();l();var $ae=ke(),Yae=CT(),Qae=mt(),Xae=xe(),Zae=Bt(),Jae=$u();w1.f=$ae&&!Yae?Object.defineProperties:function(e,r){Xae(e);for(var n=Zae(r),i=Jae(r),a=i.length,o=0,s;a>o;)Qae.f(e,s=i[o++],n[s]);return e}});var GT=_((I6e,x1)=>{"use strict";u();l();var eoe=Xe();x1.exports=eoe("document","documentElement")});var Vr=_((E6e,q1)=>{"use strict";u();l();var toe=xe(),roe=Nh(),A1=Ah(),noe=Hu(),ioe=GT(),aoe=vc(),ooe=bc(),P1=">",O1="<",$T="prototype",YT="script",N1=ooe("IE_PROTO"),WT=function(){},D1=function(t){return O1+YT+P1+t+O1+"/"+YT+P1},L1=function(t){t.write(D1("")),t.close();var e=t.parentWindow.Object;return t=null,e},soe=function(){var t=aoe("iframe"),e="java"+YT+":",r;return t.style.display="none",ioe.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(D1("document.F=Object")),r.close(),r.F},Dh,qh=function(){try{Dh=new ActiveXObject("htmlfile")}catch(e){}qh=typeof document!="undefined"?document.domain&&Dh?L1(Dh):soe():L1(Dh);for(var t=A1.length;t--;)delete qh[$T][A1[t]];return qh()};noe[N1]=!0;q1.exports=Object.create||function(e,r){var n;return e!==null?(WT[$T]=toe(e),n=new WT,WT[$T]=null,n[N1]=e):n=qh(),r===void 0?n:roe.f(n,r)}});var Oi=_((M6e,B1)=>{"use strict";u();l();var uoe=Pi(),loe=mt(),doe=cn();B1.exports=function(t,e,r){var n=uoe(e);n in t?loe.f(t,n,doe(0,r)):t[n]=r}});var Yu=_((x6e,F1)=>{"use strict";u();l();var U1=ai(),coe=Ge(),foe=Oi(),moe=Array,poe=Math.max;F1.exports=function(t,e,r){for(var n=coe(t),i=U1(e,n),a=U1(r===void 0?n:r,n),o=moe(poe(a-i,0)),s=0;i{"use strict";u();l();var goe=mr(),hoe=Bt(),K1=sa().f,yoe=Yu(),z1=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],voe=function(t){try{return K1(t)}catch(e){return yoe(z1)}};j1.exports.f=function(e){return z1&&goe(e)==="Window"?voe(e):K1(hoe(e))}});var $t=_((D6e,H1)=>{"use strict";u();l();var V1=xh(),boe=mt();H1.exports=function(t,e,r){return r.get&&V1(r.get,e,{getter:!0}),r.set&&V1(r.set,e,{setter:!0}),boe.f(t,e,r)}});var QT=_(G1=>{"use strict";u();l();var Soe=qe();G1.f=Soe});var Uh=_((z6e,W1)=>{"use strict";u();l();var Ioe=pe();W1.exports=Ioe});var wr=_((H6e,Y1)=>{"use strict";u();l();var $1=Uh(),Toe=Fe(),koe=QT(),Eoe=mt().f;Y1.exports=function(t){var e=$1.Symbol||($1.Symbol={});Toe(e,t)||Eoe(e,t,{value:koe.f(t)})}});var XT=_(($6e,Q1)=>{"use strict";u();l();var _oe=we(),Roe=Xe(),Moe=qe(),Coe=it();Q1.exports=function(){var t=Roe("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=Moe("toPrimitive");e&&!e[n]&&Coe(e,n,function(i){return _oe(r,this)},{arity:1})}});var xr=_((X6e,Z1)=>{"use strict";u();l();var woe=mt().f,xoe=Fe(),Aoe=qe(),X1=Aoe("toStringTag");Z1.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!xoe(t,X1)&&woe(t,X1,{configurable:!0,value:e})}});var ua=_((e7e,J1)=>{"use strict";u();l();var Poe=mr(),Ooe=ie();J1.exports=function(t){if(Poe(t)==="Function")return Ooe(t)}});var xn=_((n7e,tD)=>{"use strict";u();l();var eD=ua(),Loe=ft(),Noe=ju(),Doe=eD(eD.bind);tD.exports=function(t,e){return Loe(t),e===void 0?t:Noe?Doe(t,e):function(){return t.apply(e,arguments)}}});var la=_((o7e,rD)=>{"use strict";u();l();var qoe=mr();rD.exports=Array.isArray||function(e){return qoe(e)==="Array"}});var Ss=_((l7e,sD)=>{"use strict";u();l();var Boe=ie(),Uoe=te(),nD=Ne(),Foe=oi(),Koe=Xe(),zoe=_h(),iD=function(){},joe=[],aD=Koe("Reflect","construct"),ZT=/^\s*(?:class|function)\b/,Voe=Boe(ZT.exec),Hoe=!ZT.test(iD),Ec=function(e){if(!nD(e))return!1;try{return aD(iD,joe,e),!0}catch(r){return!1}},oD=function(e){if(!nD(e))return!1;switch(Foe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Hoe||!!Voe(ZT,zoe(e))}catch(r){return!0}};oD.sham=!0;sD.exports=!aD||Uoe(function(){var t;return Ec(Ec.call)||!Ec(Object)||!Ec(function(){t=!0})||t})?oD:Ec});var cD=_((f7e,dD)=>{"use strict";u();l();var uD=la(),Goe=Ss(),Woe=De(),$oe=qe(),Yoe=$oe("species"),lD=Array;dD.exports=function(t){var e;return uD(t)&&(e=t.constructor,Goe(e)&&(e===lD||uD(e.prototype))?e=void 0:Woe(e)&&(e=e[Yoe],e===null&&(e=void 0))),e===void 0?lD:e}});var Qu=_((g7e,fD)=>{"use strict";u();l();var Qoe=cD();fD.exports=function(t,e){return new(Qoe(t))(e===0?0:e)}});var Yt=_((v7e,pD)=>{"use strict";u();l();var Xoe=xn(),Zoe=ie(),Joe=ps(),ese=Ve(),tse=Ge(),rse=Qu(),mD=Zoe([].push),ro=function(t){var e=t===1,r=t===2,n=t===3,i=t===4,a=t===6,o=t===7,s=t===5||a;return function(d,c,m,f){for(var p=ese(d),y=Joe(p),v=tse(y),b=Xoe(c,m),T=0,S=f||rse,I=e?S(d,v):r||o?S(d,0):void 0,E,R;v>T;T++)if((s||T in y)&&(E=y[T],R=b(E,T,p),t))if(e)I[T]=R;else if(R)switch(t){case 3:return!0;case 5:return E;case 6:return T;case 2:mD(I,E)}else switch(t){case 4:return!1;case 7:mD(I,E)}return a?-1:n||i?i:I}};pD.exports={forEach:ro(0),map:ro(1),filter:ro(2),some:ro(3),every:ro(4),find:ro(5),findIndex:ro(6),filterReject:ro(7)}});var AD=_(()=>{"use strict";u();l();var Fh=q(),Cc=pe(),sk=we(),nse=ie(),ise=bt(),Xu=ke(),Zu=gs(),ase=te(),Qt=Fe(),ose=fn(),rk=xe(),Kh=Bt(),uk=Pi(),sse=Ce(),nk=cn(),Rc=Vr(),yD=$u(),use=sa(),vD=Bh(),lse=Ic(),bD=rr(),SD=mt(),dse=Nh(),ID=hc(),JT=it(),cse=$t(),lk=hs(),fse=bc(),TD=Hu(),gD=ys(),mse=qe(),pse=QT(),gse=wr(),hse=XT(),yse=xr(),kD=Lt(),zh=Yt().forEach,Hr=fse("hidden"),jh="Symbol",Mc="prototype",vse=kD.set,hD=kD.getterFor(jh),An=Object[Mc],Is=Cc.Symbol,_c=Is&&Is[Mc],bse=Cc.RangeError,Sse=Cc.TypeError,ek=Cc.QObject,ED=bD.f,Ts=SD.f,_D=vD.f,Ise=ID.f,RD=nse([].push),da=lk("symbols"),wc=lk("op-symbols"),Tse=lk("wks"),ik=!ek||!ek[Mc]||!ek[Mc].findChild,MD=function(t,e,r){var n=ED(An,e);n&&delete An[e],Ts(t,e,r),n&&t!==An&&Ts(An,e,n)},ak=Xu&&ase(function(){return Rc(Ts({},"a",{get:function(){return Ts(this,"a",{value:7}).a}})).a!==7})?MD:Ts,tk=function(t,e){var r=da[t]=Rc(_c);return vse(r,{type:jh,tag:t,description:e}),Xu||(r.description=e),r},Vh=function(e,r,n){e===An&&Vh(wc,r,n),rk(e);var i=uk(r);return rk(n),Qt(da,i)?(n.enumerable?(Qt(e,Hr)&&e[Hr][i]&&(e[Hr][i]=!1),n=Rc(n,{enumerable:nk(0,!1)})):(Qt(e,Hr)||Ts(e,Hr,nk(1,{})),e[Hr][i]=!0),ak(e,i,n)):Ts(e,i,n)},dk=function(e,r){rk(e);var n=Kh(r),i=yD(n).concat(xD(n));return zh(i,function(a){(!Xu||sk(ok,n,a))&&Vh(e,a,n[a])}),e},kse=function(e,r){return r===void 0?Rc(e):dk(Rc(e),r)},ok=function(e){var r=uk(e),n=sk(Ise,this,r);return this===An&&Qt(da,r)&&!Qt(wc,r)?!1:n||!Qt(this,r)||!Qt(da,r)||Qt(this,Hr)&&this[Hr][r]?n:!0},CD=function(e,r){var n=Kh(e),i=uk(r);if(!(n===An&&Qt(da,i)&&!Qt(wc,i))){var a=ED(n,i);return a&&Qt(da,i)&&!(Qt(n,Hr)&&n[Hr][i])&&(a.enumerable=!0),a}},wD=function(e){var r=_D(Kh(e)),n=[];return zh(r,function(i){!Qt(da,i)&&!Qt(TD,i)&&RD(n,i)}),n},xD=function(t){var e=t===An,r=_D(e?wc:Kh(t)),n=[];return zh(r,function(i){Qt(da,i)&&(!e||Qt(An,i))&&RD(n,da[i])}),n};Zu||(Is=function(){if(ose(_c,this))throw new Sse("Symbol is not a constructor");var e=!arguments.length||arguments[0]===void 0?void 0:sse(arguments[0]),r=gD(e),n=function(i){var a=this===void 0?Cc:this;a===An&&sk(n,wc,i),Qt(a,Hr)&&Qt(a[Hr],r)&&(a[Hr][r]=!1);var o=nk(1,i);try{ak(a,r,o)}catch(s){if(!(s instanceof bse))throw s;MD(a,r,o)}};return Xu&&ik&&ak(An,r,{configurable:!0,set:n}),tk(r,e)},_c=Is[Mc],JT(_c,"toString",function(){return hD(this).tag}),JT(Is,"withoutSetter",function(t){return tk(gD(t),t)}),ID.f=ok,SD.f=Vh,dse.f=dk,bD.f=CD,use.f=vD.f=wD,lse.f=xD,pse.f=function(t){return tk(mse(t),t)},Xu&&(cse(_c,"description",{configurable:!0,get:function(){return hD(this).description}}),ise||JT(An,"propertyIsEnumerable",ok,{unsafe:!0})));Fh({global:!0,constructor:!0,wrap:!0,forced:!Zu,sham:!Zu},{Symbol:Is});zh(yD(Tse),function(t){gse(t)});Fh({target:jh,stat:!0,forced:!Zu},{useSetter:function(){ik=!0},useSimple:function(){ik=!1}});Fh({target:"Object",stat:!0,forced:!Zu,sham:!Xu},{create:kse,defineProperty:Vh,defineProperties:dk,getOwnPropertyDescriptor:CD});Fh({target:"Object",stat:!0,forced:!Zu},{getOwnPropertyNames:wD});hse();yse(Is,jh);TD[Hr]=!0});var ck=_((_7e,PD)=>{"use strict";u();l();var Ese=gs();PD.exports=Ese&&!!Symbol.for&&!!Symbol.keyFor});var LD=_(()=>{"use strict";u();l();var _se=q(),Rse=Xe(),Mse=Fe(),Cse=Ce(),OD=hs(),wse=ck(),fk=OD("string-to-symbol-registry"),xse=OD("symbol-to-string-registry");_se({target:"Symbol",stat:!0,forced:!wse},{for:function(t){var e=Cse(t);if(Mse(fk,e))return fk[e];var r=Rse("Symbol")(e);return fk[e]=r,xse[r]=e,r}})});var DD=_(()=>{"use strict";u();l();var Ase=q(),Pse=Fe(),Ose=eo(),Lse=to(),Nse=hs(),Dse=ck(),ND=Nse("symbol-to-string-registry");Ase({target:"Symbol",stat:!0,forced:!Dse},{keyFor:function(e){if(!Ose(e))throw new TypeError(Lse(e)+" is not a symbol");if(Pse(ND,e))return ND[e]}})});var mn=_((D7e,FD)=>{"use strict";u();l();var qse=ju(),UD=Function.prototype,qD=UD.apply,BD=UD.call;FD.exports=typeof Reflect=="object"&&Reflect.apply||(qse?BD.bind(qD):function(){return BD.apply(qD,arguments)})});var no=_((U7e,KD)=>{"use strict";u();l();var Bse=ie();KD.exports=Bse([].slice)});var GD=_((z7e,HD)=>{"use strict";u();l();var Use=ie(),zD=la(),Fse=Ne(),jD=mr(),Kse=Ce(),VD=Use([].push);HD.exports=function(t){if(Fse(t))return t;if(zD(t)){for(var e=t.length,r=[],n=0;n{"use strict";u();l();var zse=q(),eq=Xe(),tq=mn(),jse=we(),xc=ie(),rq=te(),WD=Ne(),$D=eo(),nq=no(),Vse=GD(),Hse=gs(),Gse=String,io=eq("JSON","stringify"),Hh=xc(/./.exec),YD=xc("".charAt),Wse=xc("".charCodeAt),$se=xc("".replace),Yse=xc(1 .toString),Qse=/[\uD800-\uDFFF]/g,QD=/^[\uD800-\uDBFF]$/,XD=/^[\uDC00-\uDFFF]$/,ZD=!Hse||rq(function(){var t=eq("Symbol")("stringify detection");return io([t])!=="[null]"||io({a:t})!=="{}"||io(Object(t))!=="{}"}),JD=rq(function(){return io("\uDF06\uD834")!=='"\\udf06\\ud834"'||io("\uDEAD")!=='"\\udead"'}),Xse=function(t,e){var r=nq(arguments),n=Vse(e);if(!(!WD(n)&&(t===void 0||$D(t))))return r[1]=function(i,a){if(WD(n)&&(a=jse(n,this,Gse(i),a)),!$D(a))return a},tq(io,null,r)},Zse=function(t,e,r){var n=YD(r,e-1),i=YD(r,e+1);return Hh(QD,t)&&!Hh(XD,i)||Hh(XD,t)&&!Hh(QD,n)?"\\u"+Yse(Wse(t,0),16):t};io&&zse({target:"JSON",stat:!0,arity:3,forced:ZD||JD},{stringify:function(e,r,n){var i=nq(arguments),a=tq(ZD?Xse:io,null,i);return JD&&typeof a=="string"?$se(a,Qse,Zse):a}})});var aq=_(()=>{"use strict";u();l();var Jse=q(),eue=gs(),tue=te(),iq=Ic(),rue=Ve(),nue=!eue||tue(function(){iq.f(1)});Jse({target:"Object",stat:!0,forced:nue},{getOwnPropertySymbols:function(e){var r=iq.f;return r?r(rue(e)):[]}})});var oq=_(()=>{"use strict";u();l();AD();LD();DD();mk();aq()});var mq=_(()=>{"use strict";u();l();var iue=q(),aue=ke(),oue=pe(),Gh=ie(),sue=Fe(),uue=Ne(),lue=fn(),due=Ce(),cue=$t(),fue=Tc(),ca=oue.Symbol,ks=ca&&ca.prototype;aue&&uue(ca)&&(!("description"in ks)||ca().description!==void 0)&&(pk={},Ac=function(){var e=arguments.length<1||arguments[0]===void 0?void 0:due(arguments[0]),r=lue(ks,this)?new ca(e):e===void 0?ca():ca(e);return e===""&&(pk[r]=!0),r},fue(Ac,ca),Ac.prototype=ks,ks.constructor=Ac,sq=String(ca("description detection"))==="Symbol(description detection)",uq=Gh(ks.valueOf),lq=Gh(ks.toString),dq=/^Symbol\((.*)\)[^)]+$/,cq=Gh("".replace),fq=Gh("".slice),cue(ks,"description",{configurable:!0,get:function(){var e=uq(this);if(sue(pk,e))return"";var r=lq(e),n=sq?fq(r,7,-1):cq(r,dq,"$1");return n===""?void 0:n}}),iue({global:!0,constructor:!0,forced:!0},{Symbol:Ac}));var pk,Ac,sq,uq,lq,dq,cq,fq});var pq=_(()=>{"use strict";u();l();var mue=wr();mue("asyncIterator")});var gq=_(()=>{"use strict";u();l();var pue=wr();pue("hasInstance")});var hq=_(()=>{"use strict";u();l();var gue=wr();gue("isConcatSpreadable")});var yq=_(()=>{"use strict";u();l();var hue=wr();hue("iterator")});var vq=_(()=>{"use strict";u();l();var yue=wr();yue("match")});var bq=_(()=>{"use strict";u();l();var vue=wr();vue("matchAll")});var Sq=_(()=>{"use strict";u();l();var bue=wr();bue("replace")});var Iq=_(()=>{"use strict";u();l();var Sue=wr();Sue("search")});var Tq=_(()=>{"use strict";u();l();var Iue=wr();Iue("species")});var kq=_(()=>{"use strict";u();l();var Tue=wr();Tue("split")});var Eq=_(()=>{"use strict";u();l();var kue=wr(),Eue=XT();kue("toPrimitive");Eue()});var _q=_(()=>{"use strict";u();l();var _ue=Xe(),Rue=wr(),Mue=xr();Rue("toStringTag");Mue(_ue("Symbol"),"Symbol")});var Rq=_(()=>{"use strict";u();l();var Cue=wr();Cue("unscopables")});var Cq=_((aYe,Mq)=>{"use strict";u();l();var wue=ie(),xue=ft();Mq.exports=function(t,e,r){try{return wue(xue(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(n){}}});var gk=_((uYe,wq)=>{"use strict";u();l();var Aue=Ne(),Pue=String,Oue=TypeError;wq.exports=function(t){if(typeof t=="object"||Aue(t))return t;throw new Oue("Can't set "+Pue(t)+" as a prototype")}});var si=_((cYe,xq)=>{"use strict";u();l();var Lue=Cq(),Nue=xe(),Due=gk();xq.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=Lue(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch(n){}return function(i,a){return Nue(i),Due(a),t?r(i,a):i.__proto__=a,i}}():void 0)});var hk=_((pYe,Aq)=>{"use strict";u();l();var que=mt().f;Aq.exports=function(t,e,r){r in t||que(t,r,{configurable:!0,get:function(){return e[r]},set:function(n){e[r]=n}})}});var Es=_((yYe,Oq)=>{"use strict";u();l();var Bue=Ne(),Uue=De(),Pq=si();Oq.exports=function(t,e,r){var n,i;return Pq&&Bue(n=e.constructor)&&n!==r&&Uue(i=n.prototype)&&i!==r.prototype&&Pq(t,i),t}});var Ju=_((SYe,Lq)=>{"use strict";u();l();var Fue=Ce();Lq.exports=function(t,e){return t===void 0?arguments.length<2?"":e:Fue(t)}});var yk=_((kYe,Nq)=>{"use strict";u();l();var Kue=De(),zue=pr();Nq.exports=function(t,e){Kue(e)&&"cause"in e&&zue(t,"cause",e.cause)}});var Wh=_((RYe,Bq)=>{"use strict";u();l();var jue=ie(),Dq=Error,Vue=jue("".replace),Hue=function(t){return String(new Dq(t).stack)}("zxcasd"),qq=/\n\s*at [^:]*:[^\n]*/,Gue=qq.test(Hue);Bq.exports=function(t,e){if(Gue&&typeof t=="string"&&!Dq.prepareStackTrace)for(;e--;)t=Vue(t,qq,"");return t}});var vk=_((wYe,Uq)=>{"use strict";u();l();var Wue=te(),$ue=cn();Uq.exports=!Wue(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",$ue(1,7)),t.stack!==7):!0})});var bk=_((PYe,Kq)=>{"use strict";u();l();var Yue=pr(),Que=Wh(),Xue=vk(),Fq=Error.captureStackTrace;Kq.exports=function(t,e,r,n){Xue&&(Fq?Fq(t,e):Yue(t,"stack",Que(r,n)))}});var Sk=_((NYe,$q)=>{"use strict";u();l();var zq=Xe(),Zue=Fe(),jq=pr(),Jue=fn(),Vq=si(),Hq=Tc(),Gq=hk(),ele=Es(),tle=Ju(),rle=yk(),nle=bk(),ile=ke(),Wq=bt();$q.exports=function(t,e,r,n){var i="stackTraceLimit",a=n?2:1,o=t.split("."),s=o[o.length-1],d=zq.apply(null,o);if(d){var c=d.prototype;if(!Wq&&Zue(c,"cause")&&delete c.cause,!r)return d;var m=zq("Error"),f=e(function(p,y){var v=tle(n?y:p,void 0),b=n?new d(p):new d;return v!==void 0&&jq(b,"message",v),nle(b,f,b.stack,2),this&&Jue(c,this)&&ele(b,this,f),arguments.length>a&&rle(b,arguments[a]),b});if(f.prototype=c,s!=="Error"?Vq?Vq(f,m):Hq(f,m,{name:!0}):ile&&i in d&&(Gq(f,d,i),Gq(f,d,"prepareStackTrace")),Hq(f,d),!Wq)try{c.name!==s&&jq(c,"name",s),c.constructor=f}catch(p){}return f}}});var Zq=_(()=>{"use strict";u();l();var Qq=q(),ale=pe(),Li=mn(),Xq=Sk(),Ik="WebAssembly",Yq=ale[Ik],$h=new Error("e",{cause:7}).cause!==7,_s=function(t,e){var r={};r[t]=Xq(t,e,$h),Qq({global:!0,constructor:!0,arity:1,forced:$h},r)},Tk=function(t,e){if(Yq&&Yq[t]){var r={};r[t]=Xq(Ik+"."+t,e,$h),Qq({target:Ik,stat:!0,constructor:!0,arity:1,forced:$h},r)}};_s("Error",function(t){return function(r){return Li(t,this,arguments)}});_s("EvalError",function(t){return function(r){return Li(t,this,arguments)}});_s("RangeError",function(t){return function(r){return Li(t,this,arguments)}});_s("ReferenceError",function(t){return function(r){return Li(t,this,arguments)}});_s("SyntaxError",function(t){return function(r){return Li(t,this,arguments)}});_s("TypeError",function(t){return function(r){return Li(t,this,arguments)}});_s("URIError",function(t){return function(r){return Li(t,this,arguments)}});Tk("CompileError",function(t){return function(r){return Li(t,this,arguments)}});Tk("LinkError",function(t){return function(r){return Li(t,this,arguments)}});Tk("RuntimeError",function(t){return function(r){return Li(t,this,arguments)}})});var kk=_((zYe,eB)=>{"use strict";u();l();var ole=ke(),sle=te(),ule=xe(),Jq=Ju(),Yh=Error.prototype.toString,lle=sle(function(){if(ole){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if(Yh.call(t)!=="true")return!0}return Yh.call({message:1,name:2})!=="2: 1"||Yh.call({})!=="Error"});eB.exports=lle?function(){var e=ule(this),r=Jq(e.name,"Error"),n=Jq(e.message);return r?n?r+": "+n:r:n}:Yh});var nB=_(()=>{"use strict";u();l();var dle=it(),tB=kk(),rB=Error.prototype;rB.toString!==tB&&dle(rB,"toString",tB)});var Qh=_((YYe,iB)=>{"use strict";u();l();var cle=te();iB.exports=!cle(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})});var Gr=_((ZYe,oB)=>{"use strict";u();l();var fle=Fe(),mle=Ne(),ple=Ve(),gle=bc(),hle=Qh(),aB=gle("IE_PROTO"),Ek=Object,yle=Ek.prototype;oB.exports=hle?Ek.getPrototypeOf:function(t){var e=ple(t);if(fle(e,aB))return e[aB];var r=e.constructor;return mle(r)&&e instanceof r?r.prototype:e instanceof Ek?yle:null}});var el=_((t9e,sB)=>{"use strict";u();l();sB.exports={}});var Xh=_((i9e,uB)=>{"use strict";u();l();var vle=qe(),ble=el(),Sle=vle("iterator"),Ile=Array.prototype;uB.exports=function(t){return t!==void 0&&(ble.Array===t||Ile[Sle]===t)}});var tl=_((s9e,dB)=>{"use strict";u();l();var Tle=oi(),lB=Ai(),kle=Cr(),Ele=el(),_le=qe(),Rle=_le("iterator");dB.exports=function(t){if(!kle(t))return lB(t,Rle)||lB(t,"@@iterator")||Ele[Tle(t)]}});var Pc=_((d9e,cB)=>{"use strict";u();l();var Mle=we(),Cle=ft(),wle=xe(),xle=to(),Ale=tl(),Ple=TypeError;cB.exports=function(t,e){var r=arguments.length<2?Ale(t):e;if(Cle(r))return wle(Mle(r,t));throw new Ple(xle(t)+" is not iterable")}});var _k=_((m9e,mB)=>{"use strict";u();l();var Ole=we(),fB=xe(),Lle=Ai();mB.exports=function(t,e,r){var n,i;fB(t);try{if(n=Lle(t,"return"),!n){if(e==="throw")throw r;return r}n=Ole(n,t)}catch(a){i=!0,n=a}if(e==="throw")throw r;if(i)throw n;return fB(n),r}});var pn=_((h9e,yB)=>{"use strict";u();l();var Nle=xn(),Dle=we(),qle=xe(),Ble=to(),Ule=Xh(),Fle=Ge(),pB=fn(),Kle=Pc(),zle=tl(),gB=_k(),jle=TypeError,Zh=function(t,e){this.stopped=t,this.result=e},hB=Zh.prototype;yB.exports=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),a=!!(r&&r.IS_RECORD),o=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),d=Nle(e,n),c,m,f,p,y,v,b,T=function(I){return c&&gB(c,"normal",I),new Zh(!0,I)},S=function(I){return i?(qle(I),s?d(I[0],I[1],T):d(I[0],I[1])):s?d(I,T):d(I)};if(a)c=t.iterator;else if(o)c=t;else{if(m=zle(t),!m)throw new jle(Ble(t)+" is not iterable");if(Ule(m)){for(f=0,p=Fle(t);p>f;f++)if(y=S(t[f]),y&&pB(hB,y))return y;return new Zh(!1)}c=Kle(t,m)}for(v=a?t.next:c.next;!(b=Dle(v,c)).done;){try{y=S(b.value)}catch(I){gB(c,"throw",I)}if(typeof y=="object"&&y&&pB(hB,y))return y}return new Zh(!1)}});var bB=_(()=>{"use strict";u();l();var Vle=q(),Hle=fn(),Gle=Gr(),Jh=si(),Wle=Tc(),vB=Vr(),Rk=pr(),Mk=cn(),$le=yk(),Yle=bk(),Qle=pn(),Xle=Ju(),Zle=qe(),Jle=Zle("toStringTag"),ey=Error,ede=[].push,rl=function(e,r){var n=Hle(Ck,this),i;Jh?i=Jh(new ey,n?Gle(this):Ck):(i=n?this:vB(Ck),Rk(i,Jle,"Error")),r!==void 0&&Rk(i,"message",Xle(r)),Yle(i,rl,i.stack,1),arguments.length>2&&$le(i,arguments[2]);var a=[];return Qle(e,ede,{that:a}),Rk(i,"errors",a),i};Jh?Jh(rl,ey):Wle(rl,ey,{name:!0});var Ck=rl.prototype=vB(ey.prototype,{constructor:Mk(1,rl),message:Mk(1,""),name:Mk(1,"AggregateError")});Vle({global:!0,constructor:!0,arity:2},{AggregateError:rl})});var SB=_(()=>{"use strict";u();l();bB()});var EB=_(()=>{"use strict";u();l();var tde=q(),rde=Xe(),nde=mn(),IB=te(),ide=Sk(),wk="AggregateError",TB=rde(wk),kB=!IB(function(){return TB([1]).errors[0]!==1})&&IB(function(){return TB([1],wk,{cause:7}).cause!==7});tde({global:!0,constructor:!0,arity:2,forced:kB},{AggregateError:ide(wk,function(t){return function(r,n){return nde(t,this,arguments)}},kB,!0)})});var Ar=_((A9e,_B)=>{"use strict";u();l();var ade=qe(),ode=Vr(),sde=mt().f,xk=ade("unscopables"),Ak=Array.prototype;Ak[xk]===void 0&&sde(Ak,xk,{configurable:!0,value:ode(null)});_B.exports=function(t){Ak[xk][t]=!0}});var RB=_(()=>{"use strict";u();l();var ude=q(),lde=Ve(),dde=Ge(),cde=Et(),fde=Ar();ude({target:"Array",proto:!0},{at:function(e){var r=lde(this),n=dde(r),i=cde(e),a=i>=0?i:n+i;return a<0||a>=n?void 0:r[a]}});fde("at")});var Rs=_((B9e,MB)=>{"use strict";u();l();var mde=TypeError,pde=9007199254740991;MB.exports=function(t){if(t>pde)throw mde("Maximum allowed index exceeded");return t}});var nl=_((K9e,CB)=>{"use strict";u();l();var gde=te(),hde=qe(),yde=xi(),vde=hde("species");CB.exports=function(t){return yde>=51||!gde(function(){var e=[],r=e.constructor={};return r[vde]=function(){return{foo:1}},e[t](Boolean).foo!==1})}});var PB=_(()=>{"use strict";u();l();var bde=q(),Sde=te(),Ide=la(),Tde=De(),kde=Ve(),Ede=Ge(),wB=Rs(),xB=Oi(),_de=Qu(),Rde=nl(),Mde=qe(),Cde=xi(),AB=Mde("isConcatSpreadable"),wde=Cde>=51||!Sde(function(){var t=[];return t[AB]=!1,t.concat()[0]!==t}),xde=function(t){if(!Tde(t))return!1;var e=t[AB];return e!==void 0?!!e:Ide(t)},Ade=!wde||!Rde("concat");bde({target:"Array",proto:!0,arity:1,forced:Ade},{concat:function(e){var r=kde(this),n=_de(r,0),i=0,a,o,s,d,c;for(a=-1,s=arguments.length;a{"use strict";u();l();var OB=to(),Pde=TypeError;LB.exports=function(t,e){if(!delete t[e])throw new Pde("Cannot delete property "+OB(e)+" of "+OB(t))}});var Ok=_((X9e,NB)=>{"use strict";u();l();var Ode=Ve(),Pk=ai(),Lde=Ge(),Nde=Oc(),Dde=Math.min;NB.exports=[].copyWithin||function(e,r){var n=Ode(this),i=Lde(n),a=Pk(e,i),o=Pk(r,i),s=arguments.length>2?arguments[2]:void 0,d=Dde((s===void 0?i:Pk(s,i))-o,i-a),c=1;for(o0;)o in n?n[a]=n[o]:Nde(n,a),a+=c,o+=c;return n}});var DB=_(()=>{"use strict";u();l();var qde=q(),Bde=Ok(),Ude=Ar();qde({target:"Array",proto:!0},{copyWithin:Bde});Ude("copyWithin")});var Ni=_((iQe,qB)=>{"use strict";u();l();var Fde=te();qB.exports=function(t,e){var r=[][t];return!!r&&Fde(function(){r.call(null,e||function(){return 1},1)})}});var BB=_(()=>{"use strict";u();l();var Kde=q(),zde=Yt().every,jde=Ni(),Vde=jde("every");Kde({target:"Array",proto:!0,forced:!Vde},{every:function(e){return zde(this,e,arguments.length>1?arguments[1]:void 0)}})});var ty=_((cQe,FB)=>{"use strict";u();l();var Hde=Ve(),UB=ai(),Gde=Ge();FB.exports=function(e){for(var r=Hde(this),n=Gde(r),i=arguments.length,a=UB(i>1?arguments[1]:void 0,n),o=i>2?arguments[2]:void 0,s=o===void 0?n:UB(o,n);s>a;)r[a++]=e;return r}});var KB=_(()=>{"use strict";u();l();var Wde=q(),$de=ty(),Yde=Ar();Wde({target:"Array",proto:!0},{fill:$de});Yde("fill")});var zB=_(()=>{"use strict";u();l();var Qde=q(),Xde=Yt().filter,Zde=nl(),Jde=Zde("filter");Qde({target:"Array",proto:!0,forced:!Jde},{filter:function(e){return Xde(this,e,arguments.length>1?arguments[1]:void 0)}})});var VB=_(()=>{"use strict";u();l();var ece=q(),tce=Yt().find,rce=Ar(),Lk="find",jB=!0;Lk in[]&&Array(1)[Lk](function(){jB=!1});ece({target:"Array",proto:!0,forced:jB},{find:function(e){return tce(this,e,arguments.length>1?arguments[1]:void 0)}});rce(Lk)});var GB=_(()=>{"use strict";u();l();var nce=q(),ice=Yt().findIndex,ace=Ar(),Nk="findIndex",HB=!0;Nk in[]&&Array(1)[Nk](function(){HB=!1});nce({target:"Array",proto:!0,forced:HB},{findIndex:function(e){return ice(this,e,arguments.length>1?arguments[1]:void 0)}});ace(Nk)});var Lc=_((xQe,$B)=>{"use strict";u();l();var oce=xn(),sce=ps(),uce=Ve(),lce=Ge(),WB=function(t){var e=t===1;return function(r,n,i){for(var a=uce(r),o=sce(a),s=lce(o),d=oce(n,i),c,m;s-- >0;)if(c=o[s],m=d(c,s,a),m)switch(t){case 0:return c;case 1:return s}return e?-1:void 0}};$B.exports={findLast:WB(0),findLastIndex:WB(1)}});var YB=_(()=>{"use strict";u();l();var dce=q(),cce=Lc().findLast,fce=Ar();dce({target:"Array",proto:!0},{findLast:function(e){return cce(this,e,arguments.length>1?arguments[1]:void 0)}});fce("findLast")});var QB=_(()=>{"use strict";u();l();var mce=q(),pce=Lc().findLastIndex,gce=Ar();mce({target:"Array",proto:!0},{findLastIndex:function(e){return pce(this,e,arguments.length>1?arguments[1]:void 0)}});gce("findLastIndex")});var Dk=_((KQe,ZB)=>{"use strict";u();l();var hce=la(),yce=Ge(),vce=Rs(),bce=xn(),XB=function(t,e,r,n,i,a,o,s){for(var d=i,c=0,m=o?bce(o,s):!1,f,p;c0&&hce(f)?(p=yce(f),d=XB(t,e,f,p,d,a-1)-1):(vce(d+1),t[d]=f),d++),c++;return d};ZB.exports=XB});var JB=_(()=>{"use strict";u();l();var Sce=q(),Ice=Dk(),Tce=Ve(),kce=Ge(),Ece=Et(),_ce=Qu();Sce({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,r=Tce(this),n=kce(r),i=_ce(r,0);return i.length=Ice(i,r,r,n,0,e===void 0?1:Ece(e)),i}})});var eU=_(()=>{"use strict";u();l();var Rce=q(),Mce=Dk(),Cce=ft(),wce=Ve(),xce=Ge(),Ace=Qu();Rce({target:"Array",proto:!0},{flatMap:function(e){var r=wce(this),n=xce(r),i;return Cce(e),i=Ace(r,0),i.length=Mce(i,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),i}})});var qk=_((ZQe,tU)=>{"use strict";u();l();var Pce=Yt().forEach,Oce=Ni(),Lce=Oce("forEach");tU.exports=Lce?[].forEach:function(e){return Pce(this,e,arguments.length>1?arguments[1]:void 0)}});var nU=_(()=>{"use strict";u();l();var Nce=q(),rU=qk();Nce({target:"Array",proto:!0,forced:[].forEach!==rU},{forEach:rU})});var aU=_((aXe,iU)=>{"use strict";u();l();var Dce=xe(),qce=_k();iU.exports=function(t,e,r,n){try{return n?e(Dce(r)[0],r[1]):e(r)}catch(i){qce(t,"throw",i)}}});var Bk=_((uXe,uU)=>{"use strict";u();l();var Bce=xn(),Uce=we(),Fce=Ve(),Kce=aU(),zce=Xh(),jce=Ss(),Vce=Ge(),oU=Oi(),Hce=Pc(),Gce=tl(),sU=Array;uU.exports=function(e){var r=Fce(e),n=jce(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=Bce(a,i>2?arguments[2]:void 0));var s=Gce(r),d=0,c,m,f,p,y,v;if(s&&!(this===sU&&zce(s)))for(p=Hce(r,s),y=p.next,m=n?new this:[];!(f=Uce(y,p)).done;d++)v=o?Kce(p,a,[f.value,d],!0):f.value,oU(m,d,v);else for(c=Vce(r),m=n?new this(c):sU(c);c>d;d++)v=o?a(r[d],d):r[d],oU(m,d,v);return m.length=d,m}});var Nc=_((cXe,fU)=>{"use strict";u();l();var Wce=qe(),dU=Wce("iterator"),cU=!1;try{lU=0,Uk={next:function(){return{done:!!lU++}},return:function(){cU=!0}},Uk[dU]=function(){return this},Array.from(Uk,function(){throw 2})}catch(t){}var lU,Uk;fU.exports=function(t,e){try{if(!e&&!cU)return!1}catch(i){return!1}var r=!1;try{var n={};n[dU]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(i){}return r}});var mU=_(()=>{"use strict";u();l();var $ce=q(),Yce=Bk(),Qce=Nc(),Xce=!Qce(function(t){Array.from(t)});$ce({target:"Array",stat:!0,forced:Xce},{from:Yce})});var pU=_(()=>{"use strict";u();l();var Zce=q(),Jce=Gu().includes,efe=te(),tfe=Ar(),rfe=efe(function(){return!Array(1).includes()});Zce({target:"Array",proto:!0,forced:rfe},{includes:function(e){return Jce(this,e,arguments.length>1?arguments[1]:void 0)}});tfe("includes")});var hU=_(()=>{"use strict";u();l();var nfe=q(),ife=ua(),afe=Gu().indexOf,ofe=Ni(),Fk=ife([].indexOf),gU=!!Fk&&1/Fk([1],1,-0)<0,sfe=gU||!ofe("indexOf");nfe({target:"Array",proto:!0,forced:sfe},{indexOf:function(e){var r=arguments.length>1?arguments[1]:void 0;return gU?Fk(this,e,r)||0:afe(this,e,r)}})});var yU=_(()=>{"use strict";u();l();var ufe=q(),lfe=la();ufe({target:"Array",stat:!0},{isArray:lfe})});var Vk=_((xXe,SU)=>{"use strict";u();l();var dfe=te(),cfe=Ne(),ffe=De(),mfe=Vr(),vU=Gr(),pfe=it(),gfe=qe(),hfe=bt(),jk=gfe("iterator"),bU=!1,fa,Kk,zk;[].keys&&(zk=[].keys(),"next"in zk?(Kk=vU(vU(zk)),Kk!==Object.prototype&&(fa=Kk)):bU=!0);var yfe=!ffe(fa)||dfe(function(){var t={};return fa[jk].call(t)!==t});yfe?fa={}:hfe&&(fa=mfe(fa));cfe(fa[jk])||pfe(fa,jk,function(){return this});SU.exports={IteratorPrototype:fa,BUGGY_SAFARI_ITERATORS:bU}});var ry=_((OXe,IU)=>{"use strict";u();l();var vfe=Vk().IteratorPrototype,bfe=Vr(),Sfe=cn(),Ife=xr(),Tfe=el(),kfe=function(){return this};IU.exports=function(t,e,r,n){var i=e+" Iterator";return t.prototype=bfe(vfe,{next:Sfe(+!n,r)}),Ife(t,i,!1,!0),Tfe[i]=kfe,t}});var ay=_((DXe,AU)=>{"use strict";u();l();var Efe=q(),_fe=we(),ny=bt(),wU=vs(),Rfe=Ne(),Mfe=ry(),TU=Gr(),kU=si(),Cfe=xr(),wfe=pr(),Hk=it(),xfe=qe(),EU=el(),xU=Vk(),Afe=wU.PROPER,Pfe=wU.CONFIGURABLE,_U=xU.IteratorPrototype,iy=xU.BUGGY_SAFARI_ITERATORS,Dc=xfe("iterator"),RU="keys",qc="values",MU="entries",CU=function(){return this};AU.exports=function(t,e,r,n,i,a,o){Mfe(r,e,n);var s=function(S){if(S===i&&p)return p;if(!iy&&S&&S in m)return m[S];switch(S){case RU:return function(){return new r(this,S)};case qc:return function(){return new r(this,S)};case MU:return function(){return new r(this,S)}}return function(){return new r(this)}},d=e+" Iterator",c=!1,m=t.prototype,f=m[Dc]||m["@@iterator"]||i&&m[i],p=!iy&&f||s(i),y=e==="Array"&&m.entries||f,v,b,T;if(y&&(v=TU(y.call(new t)),v!==Object.prototype&&v.next&&(!ny&&TU(v)!==_U&&(kU?kU(v,_U):Rfe(v[Dc])||Hk(v,Dc,CU)),Cfe(v,d,!0,!0),ny&&(EU[d]=CU))),Afe&&i===qc&&f&&f.name!==qc&&(!ny&&Pfe?wfe(m,"name",qc):(c=!0,p=function(){return _fe(f,this)})),i)if(b={values:s(qc),keys:a?p:s(RU),entries:s(MU)},o)for(T in b)(iy||c||!(T in m))&&Hk(m,T,b[T]);else Efe({target:e,proto:!0,forced:iy||c},b);return(!ny||o)&&m[Dc]!==p&&Hk(m,Dc,p,{name:i}),EU[e]=p,b}});var il=_((UXe,PU)=>{"use strict";u();l();PU.exports=function(t,e){return{value:t,done:e}}});var Bc=_((zXe,qU)=>{"use strict";u();l();var Ofe=Bt(),Gk=Ar(),OU=el(),NU=Lt(),Lfe=mt().f,Nfe=ay(),oy=il(),Dfe=bt(),qfe=ke(),DU="Array Iterator",Bfe=NU.set,Ufe=NU.getterFor(DU);qU.exports=Nfe(Array,"Array",function(t,e){Bfe(this,{type:DU,target:Ofe(t),index:0,kind:e})},function(){var t=Ufe(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,oy(void 0,!0);switch(t.kind){case"keys":return oy(r,!1);case"values":return oy(e[r],!1)}return oy([r,e[r]],!1)},"values");var LU=OU.Arguments=OU.Array;Gk("keys");Gk("values");Gk("entries");if(!Dfe&&qfe&&LU.name!=="values")try{Lfe(LU,"name",{value:"values"})}catch(t){}});var BU=_(()=>{"use strict";u();l();var Ffe=q(),Kfe=ie(),zfe=ps(),jfe=Bt(),Vfe=Ni(),Hfe=Kfe([].join),Gfe=zfe!==Object,Wfe=Gfe||!Vfe("join",",");Ffe({target:"Array",proto:!0,forced:Wfe},{join:function(e){return Hfe(jfe(this),e===void 0?",":e)}})});var $k=_((YXe,FU)=>{"use strict";u();l();var $fe=mn(),Yfe=Bt(),Qfe=Et(),Xfe=Ge(),Zfe=Ni(),Jfe=Math.min,Wk=[].lastIndexOf,UU=!!Wk&&1/[1].lastIndexOf(1,-0)<0,eme=Zfe("lastIndexOf"),tme=UU||!eme;FU.exports=tme?function(e){if(UU)return $fe(Wk,this,arguments)||0;var r=Yfe(this),n=Xfe(r),i=n-1;for(arguments.length>1&&(i=Jfe(i,Qfe(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in r&&r[i]===e)return i||0;return-1}:Wk});var zU=_(()=>{"use strict";u();l();var rme=q(),KU=$k();rme({target:"Array",proto:!0,forced:KU!==[].lastIndexOf},{lastIndexOf:KU})});var jU=_(()=>{"use strict";u();l();var nme=q(),ime=Yt().map,ame=nl(),ome=ame("map");nme({target:"Array",proto:!0,forced:!ome},{map:function(e){return ime(this,e,arguments.length>1?arguments[1]:void 0)}})});var HU=_(()=>{"use strict";u();l();var sme=q(),ume=te(),lme=Ss(),dme=Oi(),VU=Array,cme=ume(function(){function t(){}return!(VU.of.call(t)instanceof t)});sme({target:"Array",stat:!0,forced:cme},{of:function(){for(var e=0,r=arguments.length,n=new(lme(this)?this:VU)(r);r>e;)dme(n,e,arguments[e++]);return n.length=r,n}})});var sy=_((dZe,GU)=>{"use strict";u();l();var fme=ke(),mme=la(),pme=TypeError,gme=Object.getOwnPropertyDescriptor,hme=fme&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();GU.exports=hme?function(t,e){if(mme(t)&&!gme(t,"length").writable)throw new pme("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}});var WU=_(()=>{"use strict";u();l();var yme=q(),vme=Ve(),bme=Ge(),Sme=sy(),Ime=Rs(),Tme=te(),kme=Tme(function(){return[].push.call({length:4294967296},1)!==4294967297}),Eme=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},_me=kme||!Eme();yme({target:"Array",proto:!0,arity:1,forced:_me},{push:function(e){var r=vme(this),n=bme(r),i=arguments.length;Ime(n+i);for(var a=0;a{"use strict";u();l();var Rme=ft(),Mme=Ve(),Cme=ps(),wme=Ge(),xme=TypeError,$U=function(t){return function(e,r,n,i){var a=Mme(e),o=Cme(a),s=wme(a);Rme(r);var d=t?s-1:0,c=t?-1:1;if(n<2)for(;;){if(d in o){i=o[d],d+=c;break}if(d+=c,t?d<0:s<=d)throw new xme("Reduce of empty array with no initial value")}for(;t?d>=0:s>d;d+=c)d in o&&(i=r(i,o[d],d,a));return i}};YU.exports={left:$U(!1),right:$U(!0)}});var Di=_((SZe,QU)=>{"use strict";u();l();var Ame=pe(),Pme=mr();QU.exports=Pme(Ame.process)==="process"});var ZU=_(()=>{"use strict";u();l();var Ome=q(),Lme=Uc().left,Nme=Ni(),XU=xi(),Dme=Di(),qme=!Dme&&XU>79&&XU<83,Bme=qme||!Nme("reduce");Ome({target:"Array",proto:!0,forced:Bme},{reduce:function(e){var r=arguments.length;return Lme(this,e,r,r>1?arguments[1]:void 0)}})});var eF=_(()=>{"use strict";u();l();var Ume=q(),Fme=Uc().right,Kme=Ni(),JU=xi(),zme=Di(),jme=!zme&&JU>79&&JU<83,Vme=jme||!Kme("reduceRight");Ume({target:"Array",proto:!0,forced:Vme},{reduceRight:function(e){return Fme(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})});var rF=_(()=>{"use strict";u();l();var Hme=q(),Gme=ie(),Wme=la(),$me=Gme([].reverse),tF=[1,2];Hme({target:"Array",proto:!0,forced:String(tF)===String(tF.reverse())},{reverse:function(){return Wme(this)&&(this.length=this.length),$me(this)}})});var aF=_(()=>{"use strict";u();l();var Yme=q(),nF=la(),Qme=Ss(),Xme=De(),iF=ai(),Zme=Ge(),Jme=Bt(),epe=Oi(),tpe=qe(),rpe=nl(),npe=no(),ipe=rpe("slice"),ape=tpe("species"),Yk=Array,ope=Math.max;Yme({target:"Array",proto:!0,forced:!ipe},{slice:function(e,r){var n=Jme(this),i=Zme(n),a=iF(e,i),o=iF(r===void 0?i:r,i),s,d,c;if(nF(n)&&(s=n.constructor,Qme(s)&&(s===Yk||nF(s.prototype))?s=void 0:Xme(s)&&(s=s[ape],s===null&&(s=void 0)),s===Yk||s===void 0))return npe(n,a,o);for(d=new(s===void 0?Yk:s)(ope(o-a,0)),c=0;a{"use strict";u();l();var spe=q(),upe=Yt().some,lpe=Ni(),dpe=lpe("some");spe({target:"Array",proto:!0,forced:!dpe},{some:function(e){return upe(this,e,arguments.length>1?arguments[1]:void 0)}})});var uy=_((jZe,uF)=>{"use strict";u();l();var sF=Yu(),cpe=Math.floor,Qk=function(t,e){var r=t.length,n=cpe(r/2);return r<8?fpe(t,e):mpe(t,Qk(sF(t,0,n),e),Qk(sF(t,n),e),e)},fpe=function(t,e){for(var r=t.length,n=1,i,a;n0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},mpe=function(t,e,r,n){for(var i=e.length,a=r.length,o=0,s=0;o{"use strict";u();l();var ppe=wi(),lF=ppe.match(/firefox\/(\d+)/i);dF.exports=!!lF&&+lF[1]});var Zk=_((YZe,cF)=>{"use strict";u();l();var gpe=wi();cF.exports=/MSIE|Trident/.test(gpe)});var ly=_((ZZe,mF)=>{"use strict";u();l();var hpe=wi(),fF=hpe.match(/AppleWebKit\/(\d+)\./);mF.exports=!!fF&&+fF[1]});var TF=_(()=>{"use strict";u();l();var ype=q(),SF=ie(),vpe=ft(),bpe=Ve(),pF=Ge(),Spe=Oc(),gF=Ce(),Jk=te(),Ipe=uy(),Tpe=Ni(),hF=Xk(),kpe=Zk(),yF=xi(),vF=ly(),ao=[],bF=SF(ao.sort),Epe=SF(ao.push),_pe=Jk(function(){ao.sort(void 0)}),Rpe=Jk(function(){ao.sort(null)}),Mpe=Tpe("sort"),IF=!Jk(function(){if(yF)return yF<70;if(!(hF&&hF>3)){if(kpe)return!0;if(vF)return vF<603;var t="",e,r,n,i;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)ao.push({k:r+i,v:n})}for(ao.sort(function(a,o){return o.v-a.v}),i=0;igF(r)?1:-1}};ype({target:"Array",proto:!0,forced:Cpe},{sort:function(e){e!==void 0&&vpe(e);var r=bpe(this);if(IF)return e===void 0?bF(r):bF(r,e);var n=[],i=pF(r),a,o;for(o=0;o{"use strict";u();l();var xpe=Xe(),Ape=$t(),Ppe=qe(),Ope=ke(),kF=Ppe("species");EF.exports=function(t){var e=xpe(t);Ope&&e&&!e[kF]&&Ape(e,kF,{configurable:!0,get:function(){return this}})}});var _F=_(()=>{"use strict";u();l();var Lpe=Ms();Lpe("Array")});var RF=_(()=>{"use strict";u();l();var Npe=q(),Dpe=Ve(),qpe=ai(),Bpe=Et(),Upe=Ge(),Fpe=sy(),Kpe=Rs(),zpe=Qu(),jpe=Oi(),eE=Oc(),Vpe=nl(),Hpe=Vpe("splice"),Gpe=Math.max,Wpe=Math.min;Npe({target:"Array",proto:!0,forced:!Hpe},{splice:function(e,r){var n=Dpe(this),i=Upe(n),a=qpe(e,i),o=arguments.length,s,d,c,m,f,p;for(o===0?s=d=0:o===1?(s=0,d=i-a):(s=o-2,d=Wpe(Gpe(Bpe(r),0),i-a)),Kpe(i+s-d),c=zpe(n,d),m=0;mi-d+s;m--)eE(n,m-1)}else if(s>d)for(m=i-d;m>a;m--)f=m+d-1,p=m+s-1,f in n?n[p]=n[f]:eE(n,p);for(m=0;m{"use strict";u();l();var $pe=Ge();MF.exports=function(t,e){for(var r=$pe(t),n=new e(r),i=0;i{"use strict";u();l();var Ype=q(),Qpe=tE(),Xpe=Bt(),Zpe=Ar(),Jpe=Array;Ype({target:"Array",proto:!0},{toReversed:function(){return Qpe(Xpe(this),Jpe)}});Zpe("toReversed")});var dy=_((kJe,wF)=>{"use strict";u();l();var ege=Ge();wF.exports=function(t,e,r){for(var n=0,i=arguments.length>2?r:ege(e),a=new t(i);i>n;)a[n]=e[n++];return a}});var AF=_((RJe,xF)=>{"use strict";u();l();var tge=pe();xF.exports=function(t,e){var r=tge[t],n=r&&r.prototype;return n&&n[e]}});var PF=_(()=>{"use strict";u();l();var rge=q(),nge=ie(),ige=ft(),age=Bt(),oge=dy(),sge=AF(),uge=Ar(),lge=Array,dge=nge(sge("Array","sort"));rge({target:"Array",proto:!0},{toSorted:function(e){e!==void 0&&ige(e);var r=age(this),n=oge(lge,r);return dge(n,e)}});uge("toSorted")});var OF=_(()=>{"use strict";u();l();var cge=q(),fge=Ar(),mge=Rs(),pge=Ge(),gge=ai(),hge=Bt(),yge=Et(),vge=Array,bge=Math.max,Sge=Math.min;cge({target:"Array",proto:!0},{toSpliced:function(e,r){var n=hge(this),i=pge(n),a=gge(e,i),o=arguments.length,s=0,d,c,m,f;for(o===0?d=c=0:o===1?(d=0,c=i-a):(d=o-2,c=Sge(bge(yge(r),0),i-a)),m=mge(i+d-c),f=vge(m);s{"use strict";u();l();var Ige=Ar();Ige("flat")});var NF=_(()=>{"use strict";u();l();var Tge=Ar();Tge("flatMap")});var DF=_(()=>{"use strict";u();l();var kge=q(),Ege=Ve(),_ge=Ge(),Rge=sy(),Mge=Oc(),Cge=Rs(),wge=[].unshift(0)!==1,xge=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}},Age=wge||!xge();kge({target:"Array",proto:!0,arity:1,forced:Age},{unshift:function(e){var r=Ege(this),n=_ge(r),i=arguments.length;if(i){Cge(n+i);for(var a=n;a--;){var o=a+i;a in r?r[o]=r[a]:Mge(r,o)}for(var s=0;s{"use strict";u();l();var Pge=Ge(),Oge=Et(),Lge=RangeError;qF.exports=function(t,e,r,n){var i=Pge(t),a=Oge(r),o=a<0?i+a:a;if(o>=i||o<0)throw new Lge("Incorrect index");for(var s=new e(i),d=0;d{"use strict";u();l();var Nge=q(),Dge=rE(),qge=Bt(),Bge=Array;Nge({target:"Array",proto:!0},{with:function(t,e){return Dge(qge(this),Bge,t,e)}})});var cy=_((ret,UF)=>{"use strict";u();l();UF.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"});var al=_((aet,FF)=>{"use strict";u();l();var Uge=it();FF.exports=function(t,e,r){for(var n in e)Uge(t,n,e[n],r);return t}});var ui=_((uet,KF)=>{"use strict";u();l();var Fge=fn(),Kge=TypeError;KF.exports=function(t,e){if(Fge(e,t))return t;throw new Kge("Incorrect invocation")}});var nE=_((fet,zF)=>{"use strict";u();l();var zge=Et(),jge=jr(),Vge=RangeError;zF.exports=function(t){if(t===void 0)return 0;var e=zge(t),r=jge(e);if(e!==r)throw new Vge("Wrong length or index");return r}});var fy=_((get,jF)=>{"use strict";u();l();jF.exports=Math.sign||function(e){var r=+e;return r===0||r!==r?r:r<0?-1:1}});var WF=_((vet,GF)=>{"use strict";u();l();var Hge=fy(),Gge=Math.abs,HF=2220446049250313e-31,VF=1/HF,Wge=function(t){return t+VF-VF};GF.exports=function(t,e,r,n){var i=+t,a=Gge(i),o=Hge(i);if(ar||d!==d?o*(1/0):o*d}});var iE=_((Tet,$F)=>{"use strict";u();l();var $ge=WF(),Yge=11920928955078125e-23,Qge=34028234663852886e22,Xge=11754943508222875e-54;$F.exports=Math.fround||function(e){return $ge(e,Yge,Qge,Xge)}});var QF=_((_et,YF)=>{"use strict";u();l();var Zge=Array,Jge=Math.abs,ma=Math.pow,ehe=Math.floor,the=Math.log,rhe=Math.LN2,nhe=function(t,e,r){var n=Zge(r),i=r*8-e-1,a=(1<>1,s=e===23?ma(2,-24)-ma(2,-77):0,d=t<0||t===0&&1/t<0?1:0,c=0,m,f,p;for(t=Jge(t),t!==t||t===1/0?(f=t!==t?1:0,m=a):(m=ehe(the(t)/rhe),p=ma(2,-m),t*p<1&&(m--,p*=2),m+o>=1?t+=s/p:t+=s*ma(2,1-o),t*p>=2&&(m++,p/=2),m+o>=a?(f=0,m=a):m+o>=1?(f=(t*p-1)*ma(2,e),m+=o):(f=t*ma(2,o-1)*ma(2,e),m=0));e>=8;)n[c++]=f&255,f/=256,e-=8;for(m=m<0;)n[c++]=m&255,m/=256,i-=8;return n[--c]|=d*128,n},ihe=function(t,e){var r=t.length,n=r*8-e-1,i=(1<>1,o=n-7,s=r-1,d=t[s--],c=d&127,m;for(d>>=7;o>0;)c=c*256+t[s--],o-=8;for(m=c&(1<<-o)-1,c>>=-o,o+=e;o>0;)m=m*256+t[s--],o-=8;if(c===0)c=1-a;else{if(c===i)return m?NaN:d?-1/0:1/0;m+=ma(2,e),c-=a}return(d?-1:1)*m*ma(2,c-e)};YF.exports={pack:nhe,unpack:ihe}});var zc=_((Cet,pK)=>{"use strict";u();l();var vy=pe(),cE=ie(),aE=ke(),ahe=cy(),lK=vs(),XF=pr(),ohe=$t(),ZF=al(),oE=te(),my=ui(),she=Et(),uhe=jr(),hy=nE(),lhe=iE(),dK=QF(),dhe=Gr(),JF=si(),che=sa().f,fhe=ty(),mhe=Yu(),cK=xr(),fE=Lt(),phe=lK.PROPER,eK=lK.CONFIGURABLE,sl="ArrayBuffer",by="DataView",ul="prototype",ghe="Wrong length",fK="Wrong index",tK=fE.getterFor(sl),Kc=fE.getterFor(by),rK=fE.set,Pn=vy[sl],gn=Pn,ol=gn&&gn[ul],qi=vy[by],Cs=qi&&qi[ul],nK=Object.prototype,hhe=vy.Array,yy=vy.RangeError,yhe=cE(fhe),vhe=cE([].reverse),mK=dK.pack,iK=dK.unpack,aK=function(t){return[t&255]},oK=function(t){return[t&255,t>>8&255]},sK=function(t){return[t&255,t>>8&255,t>>16&255,t>>24&255]},uK=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},bhe=function(t){return mK(lhe(t),23,4)},She=function(t){return mK(t,52,8)},py=function(t,e,r){ohe(t[ul],e,{configurable:!0,get:function(){return r(this)[e]}})},oo=function(t,e,r,n){var i=Kc(t),a=hy(r),o=!!n;if(a+e>i.byteLength)throw new yy(fK);var s=i.bytes,d=a+i.byteOffset,c=mhe(s,d,d+e);return o?c:vhe(c)},so=function(t,e,r,n,i,a){var o=Kc(t),s=hy(r),d=n(+i),c=!!a;if(s+e>o.byteLength)throw new yy(fK);for(var m=o.bytes,f=s+o.byteOffset,p=0;pa)throw new yy("Wrong offset");if(n=n===void 0?a-o:uhe(n),o+n>a)throw new yy(ghe);rK(this,{type:by,buffer:e,byteLength:n,byteOffset:o,bytes:i.bytes}),aE||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},Cs=qi[ul],aE&&(py(gn,"byteLength",tK),py(qi,"buffer",Kc),py(qi,"byteLength",Kc),py(qi,"byteOffset",Kc)),ZF(Cs,{getInt8:function(e){return oo(this,1,e)[0]<<24>>24},getUint8:function(e){return oo(this,1,e)[0]},getInt16:function(e){var r=oo(this,2,e,arguments.length>1?arguments[1]:!1);return(r[1]<<8|r[0])<<16>>16},getUint16:function(e){var r=oo(this,2,e,arguments.length>1?arguments[1]:!1);return r[1]<<8|r[0]},getInt32:function(e){return uK(oo(this,4,e,arguments.length>1?arguments[1]:!1))},getUint32:function(e){return uK(oo(this,4,e,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(e){return iK(oo(this,4,e,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(e){return iK(oo(this,8,e,arguments.length>1?arguments[1]:!1),52)},setInt8:function(e,r){so(this,1,e,aK,r)},setUint8:function(e,r){so(this,1,e,aK,r)},setInt16:function(e,r){so(this,2,e,oK,r,arguments.length>2?arguments[2]:!1)},setUint16:function(e,r){so(this,2,e,oK,r,arguments.length>2?arguments[2]:!1)},setInt32:function(e,r){so(this,4,e,sK,r,arguments.length>2?arguments[2]:!1)},setUint32:function(e,r){so(this,4,e,sK,r,arguments.length>2?arguments[2]:!1)},setFloat32:function(e,r){so(this,4,e,bhe,r,arguments.length>2?arguments[2]:!1)},setFloat64:function(e,r){so(this,8,e,She,r,arguments.length>2?arguments[2]:!1)}});else{if(sE=phe&&Pn.name!==sl,!oE(function(){Pn(1)})||!oE(function(){new Pn(-1)})||oE(function(){return new Pn,new Pn(1.5),new Pn(NaN),Pn.length!==1||sE&&!eK})){for(gn=function(e){return my(this,ol),new Pn(hy(e))},gn[ul]=ol,uE=che(Pn),lE=0;uE.length>lE;)(gy=uE[lE++])in gn||XF(gn,gy,Pn[gy]);ol.constructor=gn}else sE&&eK&&XF(Pn,"name",sl);JF&&dhe(Cs)!==nK&&JF(Cs,nK),Fc=new qi(new gn(2)),dE=cE(Cs.setInt8),Fc.setInt8(0,2147483648),Fc.setInt8(1,2147483649),(Fc.getInt8(0)||!Fc.getInt8(1))&&ZF(Cs,{setInt8:function(e,r){dE(this,e,r<<24>>24)},setUint8:function(e,r){dE(this,e,r<<24>>24)}},{unsafe:!0})}var sE,uE,lE,gy,Fc,dE;cK(gn,sl);cK(qi,by);pK.exports={ArrayBuffer:gn,DataView:qi}});var hK=_(()=>{"use strict";u();l();var Ihe=q(),The=pe(),khe=zc(),Ehe=Ms(),mE="ArrayBuffer",gK=khe[mE],_he=The[mE];Ihe({global:!0,constructor:!0,forced:_he!==gK},{ArrayBuffer:gK});Ehe(mE)});var Pe=_((Net,RK)=>{"use strict";u();l();var Rhe=cy(),yE=ke(),Pr=pe(),SK=Ne(),Ty=De(),lo=Fe(),vE=oi(),Mhe=to(),Che=pr(),pE=it(),whe=$t(),xhe=fn(),ky=Gr(),dl=si(),Ahe=qe(),Phe=ys(),IK=Lt(),TK=IK.enforce,Ohe=IK.get,Sy=Pr.Int8Array,gE=Sy&&Sy.prototype,yK=Pr.Uint8ClampedArray,vK=yK&&yK.prototype,Bi=Sy&&ky(Sy),li=gE&&ky(gE),Lhe=Object.prototype,bE=Pr.TypeError,bK=Ahe("toStringTag"),hE=Phe("TYPED_ARRAY_TAG"),Iy="TypedArrayConstructor",pa=Rhe&&!!dl&&vE(Pr.opera)!=="Opera",kK=!1,Wr,uo,ll,ga={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},SE={BigInt64Array:8,BigUint64Array:8},Nhe=function(e){if(!Ty(e))return!1;var r=vE(e);return r==="DataView"||lo(ga,r)||lo(SE,r)},EK=function(t){var e=ky(t);if(Ty(e)){var r=Ohe(e);return r&&lo(r,Iy)?r[Iy]:EK(e)}},_K=function(t){if(!Ty(t))return!1;var e=vE(t);return lo(ga,e)||lo(SE,e)},Dhe=function(t){if(_K(t))return t;throw new bE("Target is not a typed array")},qhe=function(t){if(SK(t)&&(!dl||xhe(Bi,t)))return t;throw new bE(Mhe(t)+" is not a typed array constructor")},Bhe=function(t,e,r,n){if(yE){if(r)for(var i in ga){var a=Pr[i];if(a&&lo(a.prototype,t))try{delete a.prototype[t]}catch(o){try{a.prototype[t]=e}catch(s){}}}(!li[t]||r)&&pE(li,t,r?e:pa&&gE[t]||e,n)}},Uhe=function(t,e,r){var n,i;if(yE){if(dl){if(r){for(n in ga)if(i=Pr[n],i&&lo(i,t))try{delete i[t]}catch(a){}}if(!Bi[t]||r)try{return pE(Bi,t,r?e:pa&&Bi[t]||e)}catch(a){}else return}for(n in ga)i=Pr[n],i&&(!i[t]||r)&&pE(i,t,e)}};for(Wr in ga)uo=Pr[Wr],ll=uo&&uo.prototype,ll?TK(ll)[Iy]=uo:pa=!1;for(Wr in SE)uo=Pr[Wr],ll=uo&&uo.prototype,ll&&(TK(ll)[Iy]=uo);if((!pa||!SK(Bi)||Bi===Function.prototype)&&(Bi=function(){throw new bE("Incorrect invocation")},pa))for(Wr in ga)Pr[Wr]&&dl(Pr[Wr],Bi);if((!pa||!li||li===Lhe)&&(li=Bi.prototype,pa))for(Wr in ga)Pr[Wr]&&dl(Pr[Wr].prototype,li);pa&&ky(vK)!==li&&dl(vK,li);if(yE&&!lo(li,bK)){kK=!0,whe(li,bK,{configurable:!0,get:function(){return Ty(this)?this[hE]:void 0}});for(Wr in ga)Pr[Wr]&&Che(Pr[Wr],hE,Wr)}RK.exports={NATIVE_ARRAY_BUFFER_VIEWS:pa,TYPED_ARRAY_TAG:kK&&hE,aTypedArray:Dhe,aTypedArrayConstructor:qhe,exportTypedArrayMethod:Bhe,exportTypedArrayStaticMethod:Uhe,getTypedArrayConstructor:EK,isView:Nhe,isTypedArray:_K,TypedArray:Bi,TypedArrayPrototype:li}});var CK=_(()=>{"use strict";u();l();var Fhe=q(),MK=Pe(),Khe=MK.NATIVE_ARRAY_BUFFER_VIEWS;Fhe({target:"ArrayBuffer",stat:!0,forced:!Khe},{isView:MK.isView})});var Ey=_((zet,wK)=>{"use strict";u();l();var zhe=Ss(),jhe=to(),Vhe=TypeError;wK.exports=function(t){if(zhe(t))return t;throw new Vhe(jhe(t)+" is not a constructor")}});var ws=_((Het,AK)=>{"use strict";u();l();var xK=xe(),Hhe=Ey(),Ghe=Cr(),Whe=qe(),$he=Whe("species");AK.exports=function(t,e){var r=xK(t).constructor,n;return r===void 0||Ghe(n=xK(r)[$he])?e:Hhe(n)}});var qK=_(()=>{"use strict";u();l();var Yhe=q(),TE=ua(),Qhe=te(),NK=zc(),PK=xe(),OK=ai(),Xhe=jr(),Zhe=ws(),kE=NK.ArrayBuffer,IE=NK.DataView,DK=IE.prototype,LK=TE(kE.prototype.slice),Jhe=TE(DK.getUint8),eye=TE(DK.setUint8),tye=Qhe(function(){return!new kE(2).slice(1,void 0).byteLength});Yhe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:tye},{slice:function(e,r){if(LK&&r===void 0)return LK(PK(this),e);for(var n=PK(this).byteLength,i=OK(e,n),a=OK(r===void 0?n:r,n),o=new(Zhe(this,kE))(Xhe(a-i)),s=new IE(this),d=new IE(o),c=0;i{"use strict";u();l();var rye=q(),nye=zc(),iye=cy();rye({global:!0,constructor:!0,forced:!iye},{DataView:nye.DataView})});var UK=_(()=>{"use strict";u();l();BK()});var FK=_(()=>{"use strict";u();l();var aye=q(),oye=ie(),sye=te(),uye=sye(function(){return new Date(16e11).getYear()!==120}),lye=oye(Date.prototype.getFullYear);aye({target:"Date",proto:!0,forced:uye},{getYear:function(){return lye(this)-1900}})});var zK=_(()=>{"use strict";u();l();var dye=q(),cye=ie(),KK=Date,fye=cye(KK.prototype.getTime);dye({target:"Date",stat:!0},{now:function(){return fye(new KK)}})});var HK=_(()=>{"use strict";u();l();var mye=q(),jK=ie(),pye=Et(),VK=Date.prototype,gye=jK(VK.getTime),hye=jK(VK.setFullYear);mye({target:"Date",proto:!0},{setYear:function(e){gye(this);var r=pye(e),n=r>=0&&r<=99?r+1900:r;return hye(this,n)}})});var GK=_(()=>{"use strict";u();l();var yye=q();yye({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})});var jc=_((Ttt,WK)=>{"use strict";u();l();var vye=Et(),bye=Ce(),Sye=ct(),Iye=RangeError;WK.exports=function(e){var r=bye(Sye(this)),n="",i=vye(e);if(i<0||i===1/0)throw new Iye("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(r+=r))i&1&&(n+=r);return n}});var _y=_((_tt,XK)=>{"use strict";u();l();var QK=ie(),Tye=jr(),$K=Ce(),kye=jc(),Eye=ct(),_ye=QK(kye),Rye=QK("".slice),Mye=Math.ceil,YK=function(t){return function(e,r,n){var i=$K(Eye(e)),a=Tye(r),o=i.length,s=n===void 0?" ":$K(n),d,c;return a<=o||s===""?i:(d=a-o,c=_ye(s,Mye(d/s.length)),c.length>d&&(c=Rye(c,0,d)),t?i+c:c+i)}};XK.exports={start:YK(!1),end:YK(!0)}});var e2=_((Ctt,JK)=>{"use strict";u();l();var co=ie(),ZK=te(),xs=_y().start,Cye=RangeError,wye=isFinite,xye=Math.abs,ha=Date.prototype,EE=ha.toISOString,Aye=co(ha.getTime),Pye=co(ha.getUTCDate),Oye=co(ha.getUTCFullYear),Lye=co(ha.getUTCHours),Nye=co(ha.getUTCMilliseconds),Dye=co(ha.getUTCMinutes),qye=co(ha.getUTCMonth),Bye=co(ha.getUTCSeconds);JK.exports=ZK(function(){return EE.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!ZK(function(){EE.call(new Date(NaN))})?function(){if(!wye(Aye(this)))throw new Cye("Invalid time value");var e=this,r=Oye(e),n=Nye(e),i=r<0?"-":r>9999?"+":"";return i+xs(xye(r),i?6:4,0)+"-"+xs(qye(e)+1,2,0)+"-"+xs(Pye(e),2,0)+"T"+xs(Lye(e),2,0)+":"+xs(Dye(e),2,0)+":"+xs(Bye(e),2,0)+"."+xs(n,3,0)+"Z"}:EE});var r2=_(()=>{"use strict";u();l();var Uye=q(),t2=e2();Uye({target:"Date",proto:!0,forced:Date.prototype.toISOString!==t2},{toISOString:t2})});var n2=_(()=>{"use strict";u();l();var Fye=q(),Kye=te(),zye=Ve(),jye=yc(),Vye=Kye(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});Fye({target:"Date",proto:!0,arity:1,forced:Vye},{toJSON:function(e){var r=zye(this),n=jye(r,"number");return typeof n=="number"&&!isFinite(n)?null:r.toISOString()}})});var a2=_((Utt,i2)=>{"use strict";u();l();var Hye=xe(),Gye=ET(),Wye=TypeError;i2.exports=function(t){if(Hye(this),t==="string"||t==="default")t="string";else if(t!=="number")throw new Wye("Incorrect hint");return Gye(this,t)}});var u2=_(()=>{"use strict";u();l();var $ye=Fe(),Yye=it(),Qye=a2(),Xye=qe(),o2=Xye("toPrimitive"),s2=Date.prototype;$ye(s2,o2)||Yye(s2,o2,Qye)});var f2=_(()=>{"use strict";u();l();var d2=ie(),Zye=it(),_E=Date.prototype,l2="Invalid Date",c2="toString",Jye=d2(_E[c2]),eve=d2(_E.getTime);String(new Date(NaN))!==l2&&Zye(_E,c2,function(){var e=eve(this);return e===e?Jye(this):l2})});var p2=_(()=>{"use strict";u();l();var tve=q(),Vc=ie(),rve=Ce(),nve=Vc("".charAt),ive=Vc("".charCodeAt),ave=Vc(/./.exec),ove=Vc(1 .toString),sve=Vc("".toUpperCase),uve=/[\w*+\-./@]/,m2=function(t,e){for(var r=ove(t,16);r.length{"use strict";u();l();var h2=ie(),lve=ft(),dve=De(),cve=Fe(),g2=no(),fve=ju(),y2=Function,mve=h2([].concat),pve=h2([].join),RE={},gve=function(t,e,r){if(!cve(RE,e)){for(var n=[],i=0;i{"use strict";u();l();var hve=q(),b2=ME();hve({target:"Function",proto:!0,forced:Function.bind!==b2},{bind:b2})});var k2=_(()=>{"use strict";u();l();var yve=Ne(),I2=De(),vve=mt(),bve=Gr(),Sve=qe(),Ive=xh(),CE=Sve("hasInstance"),T2=Function.prototype;CE in T2||vve.f(T2,CE,{value:Ive(function(t){if(!yve(this)||!I2(t))return!1;var e=this.prototype;if(!I2(e))return t instanceof this;for(;t=bve(t);)if(e===t)return!0;return!1},CE)})});var M2=_(()=>{"use strict";u();l();var Tve=ke(),kve=vs().EXISTS,E2=ie(),Eve=$t(),_2=Function.prototype,_ve=E2(_2.toString),R2=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Rve=E2(R2.exec),Mve="name";Tve&&!kve&&Eve(_2,Mve,{configurable:!0,get:function(){try{return Rve(R2,_ve(this))[1]}catch(t){return""}}})});var C2=_(()=>{"use strict";u();l();var Cve=q(),wE=pe();Cve({global:!0,forced:wE.globalThis!==wE},{globalThis:wE})});var w2=_(()=>{"use strict";u();l();var wve=pe(),xve=xr();xve(wve.JSON,"JSON",!0)});var Ry=_((krt,x2)=>{"use strict";u();l();var Ave=te();x2.exports=Ave(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})});var Cy=_((Rrt,P2)=>{"use strict";u();l();var Pve=te(),Ove=De(),Lve=mr(),A2=Ry(),My=Object.isExtensible,Nve=Pve(function(){My(1)});P2.exports=Nve||A2?function(e){return!Ove(e)||A2&&Lve(e)==="ArrayBuffer"?!1:My?My(e):!0}:My});var As=_((wrt,O2)=>{"use strict";u();l();var Dve=te();O2.exports=!Dve(function(){return Object.isExtensible(Object.preventExtensions({}))})});var fo=_((Prt,D2)=>{"use strict";u();l();var qve=q(),Bve=ie(),Uve=Hu(),Fve=De(),xE=Fe(),Kve=mt().f,L2=sa(),zve=Bh(),AE=Cy(),jve=ys(),Vve=As(),N2=!1,ya=jve("meta"),Hve=0,PE=function(t){Kve(t,ya,{value:{objectID:"O"+Hve++,weakData:{}}})},Gve=function(t,e){if(!Fve(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!xE(t,ya)){if(!AE(t))return"F";if(!e)return"E";PE(t)}return t[ya].objectID},Wve=function(t,e){if(!xE(t,ya)){if(!AE(t))return!0;if(!e)return!1;PE(t)}return t[ya].weakData},$ve=function(t){return Vve&&N2&&AE(t)&&!xE(t,ya)&&PE(t),t},Yve=function(){Qve.enable=function(){},N2=!0;var t=L2.f,e=Bve([].splice),r={};r[ya]=1,t(r).length&&(L2.f=function(n){for(var i=t(n),a=0,o=i.length;a{"use strict";u();l();var Xve=q(),Zve=pe(),Jve=ie(),q2=Wu(),ebe=it(),tbe=fo(),rbe=pn(),nbe=ui(),ibe=Ne(),abe=Cr(),OE=De(),LE=te(),obe=Nc(),sbe=xr(),ube=Es();B2.exports=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,a=n?"set":"add",o=Zve[t],s=o&&o.prototype,d=o,c={},m=function(S){var I=Jve(s[S]);ebe(s,S,S==="add"?function(R){return I(this,R===0?0:R),this}:S==="delete"?function(E){return i&&!OE(E)?!1:I(this,E===0?0:E)}:S==="get"?function(R){return i&&!OE(R)?void 0:I(this,R===0?0:R)}:S==="has"?function(R){return i&&!OE(R)?!1:I(this,R===0?0:R)}:function(R,M){return I(this,R===0?0:R,M),this})},f=q2(t,!ibe(o)||!(i||s.forEach&&!LE(function(){new o().entries().next()})));if(f)d=r.getConstructor(e,t,n,a),tbe.enable();else if(q2(t,!0)){var p=new d,y=p[a](i?{}:-0,1)!==p,v=LE(function(){p.has(1)}),b=obe(function(S){new o(S)}),T=!i&&LE(function(){for(var S=new o,I=5;I--;)S[a](I,I);return!S.has(-0)});b||(d=e(function(S,I){nbe(S,s);var E=ube(new o,S,d);return abe(I)||rbe(I,E[a],{that:E,AS_ENTRIES:n}),E}),d.prototype=s,s.constructor=d),(v||T)&&(m("delete"),m("has"),n&&m("get")),(T||y)&&m(a),i&&s.clear&&delete s.clear}return c[t]=d,Xve({global:!0,constructor:!0,forced:d!==o},c),sbe(d,t),i||r.setStrong(d,t,n),d}});var DE=_((Brt,j2)=>{"use strict";u();l();var lbe=Vr(),dbe=$t(),U2=al(),cbe=xn(),fbe=ui(),mbe=Cr(),pbe=pn(),gbe=ay(),wy=il(),hbe=Ms(),Gc=ke(),F2=fo().fastKey,z2=Lt(),K2=z2.set,NE=z2.getterFor;j2.exports={getConstructor:function(t,e,r,n){var i=t(function(c,m){fbe(c,a),K2(c,{type:e,index:lbe(null),first:void 0,last:void 0,size:0}),Gc||(c.size=0),mbe(m)||pbe(m,c[n],{that:c,AS_ENTRIES:r})}),a=i.prototype,o=NE(e),s=function(c,m,f){var p=o(c),y=d(c,m),v,b;return y?y.value=f:(p.last=y={index:b=F2(m,!0),key:m,value:f,previous:v=p.last,next:void 0,removed:!1},p.first||(p.first=y),v&&(v.next=y),Gc?p.size++:c.size++,b!=="F"&&(p.index[b]=y)),c},d=function(c,m){var f=o(c),p=F2(m),y;if(p!=="F")return f.index[p];for(y=f.first;y;y=y.next)if(y.key===m)return y};return U2(a,{clear:function(){for(var m=this,f=o(m),p=f.index,y=f.first;y;)y.removed=!0,y.previous&&(y.previous=y.previous.next=void 0),delete p[y.index],y=y.next;f.first=f.last=void 0,Gc?f.size=0:m.size=0},delete:function(c){var m=this,f=o(m),p=d(m,c);if(p){var y=p.next,v=p.previous;delete f.index[p.index],p.removed=!0,v&&(v.next=y),y&&(y.previous=v),f.first===p&&(f.first=y),f.last===p&&(f.last=v),Gc?f.size--:m.size--}return!!p},forEach:function(m){for(var f=o(this),p=cbe(m,arguments.length>1?arguments[1]:void 0),y;y=y?y.next:f.first;)for(p(y.value,y.key,this);y&&y.removed;)y=y.previous},has:function(m){return!!d(this,m)}}),U2(a,r?{get:function(m){var f=d(this,m);return f&&f.value},set:function(m,f){return s(this,m===0?0:m,f)}}:{add:function(m){return s(this,m=m===0?0:m,m)}}),Gc&&dbe(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=NE(e),a=NE(n);gbe(t,e,function(o,s){K2(this,{type:n,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,d=o.last;d&&d.removed;)d=d.previous;return!o.target||!(o.last=d=d?d.next:o.state.first)?(o.target=void 0,wy(void 0,!0)):wy(s==="keys"?d.key:s==="values"?d.value:[d.key,d.value],!1)},r?"entries":"values",!r,!0),hbe(e)}}});var V2=_(()=>{"use strict";u();l();var ybe=Hc(),vbe=DE();ybe("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},vbe)});var H2=_(()=>{"use strict";u();l();V2()});var qE=_((Yrt,G2)=>{"use strict";u();l();var xy=ie(),Wc=Map.prototype;G2.exports={Map,set:xy(Wc.set),get:xy(Wc.get),has:xy(Wc.has),remove:xy(Wc.delete),proto:Wc}});var W2=_(()=>{"use strict";u();l();var bbe=q(),Sbe=ie(),Ibe=ft(),Tbe=ct(),kbe=pn(),Ay=qE(),Ebe=bt(),_be=Ay.Map,Rbe=Ay.has,Mbe=Ay.get,Cbe=Ay.set,wbe=Sbe([].push);bbe({target:"Map",stat:!0,forced:Ebe},{groupBy:function(e,r){Tbe(e),Ibe(r);var n=new _be,i=0;return kbe(e,function(a){var o=r(a,i++);Rbe(n,o)?wbe(Mbe(n,o),a):Cbe(n,o,[a])}),n}})});var BE=_((rnt,$2)=>{"use strict";u();l();var xbe=Math.log;$2.exports=Math.log1p||function(e){var r=+e;return r>-1e-8&&r<1e-8?r-r*r/2:xbe(1+r)}});var Q2=_(()=>{"use strict";u();l();var Abe=q(),Pbe=BE(),UE=Math.acosh,Obe=Math.log,Y2=Math.sqrt,Lbe=Math.LN2,Nbe=!UE||Math.floor(UE(Number.MAX_VALUE))!==710||UE(1/0)!==1/0;Abe({target:"Math",stat:!0,forced:Nbe},{acosh:function(e){var r=+e;return r<1?NaN:r>9490626562425156e-8?Obe(r)+Lbe:Pbe(r-1+Y2(r-1)*Y2(r+1))}})});var J2=_(()=>{"use strict";u();l();var Dbe=q(),X2=Math.asinh,qbe=Math.log,Bbe=Math.sqrt;function Z2(t){var e=+t;return!isFinite(e)||e===0?e:e<0?-Z2(-e):qbe(e+Bbe(e*e+1))}var Ube=!(X2&&1/X2(0)>0);Dbe({target:"Math",stat:!0,forced:Ube},{asinh:Z2})});var tz=_(()=>{"use strict";u();l();var Fbe=q(),ez=Math.atanh,Kbe=Math.log,zbe=!(ez&&1/ez(-0)<0);Fbe({target:"Math",stat:!0,forced:zbe},{atanh:function(e){var r=+e;return r===0?r:Kbe((1+r)/(1-r))/2}})});var rz=_(()=>{"use strict";u();l();var jbe=q(),Vbe=fy(),Hbe=Math.abs,Gbe=Math.pow;jbe({target:"Math",stat:!0},{cbrt:function(e){var r=+e;return Vbe(r)*Gbe(Hbe(r),1/3)}})});var nz=_(()=>{"use strict";u();l();var Wbe=q(),$be=Math.floor,Ybe=Math.log,Qbe=Math.LOG2E;Wbe({target:"Math",stat:!0},{clz32:function(e){var r=e>>>0;return r?31-$be(Ybe(r+.5)*Qbe):32}})});var Yc=_((_nt,iz)=>{"use strict";u();l();var $c=Math.expm1,Xbe=Math.exp;iz.exports=!$c||$c(10)>22025.465794806718||$c(10)<22025.465794806718||$c(-2e-17)!==-2e-17?function(e){var r=+e;return r===0?r:r>-1e-6&&r<1e-6?r+r*r/2:Xbe(r)-1}:$c});var oz=_(()=>{"use strict";u();l();var Zbe=q(),Jbe=Yc(),az=Math.cosh,eSe=Math.abs,FE=Math.E,tSe=!az||az(710)===1/0;Zbe({target:"Math",stat:!0,forced:tSe},{cosh:function(e){var r=Jbe(eSe(e)-1)+1;return(r+1/(r*FE*FE))*(FE/2)}})});var uz=_(()=>{"use strict";u();l();var rSe=q(),sz=Yc();rSe({target:"Math",stat:!0,forced:sz!==Math.expm1},{expm1:sz})});var lz=_(()=>{"use strict";u();l();var nSe=q(),iSe=iE();nSe({target:"Math",stat:!0},{fround:iSe})});var cz=_(()=>{"use strict";u();l();var aSe=q(),dz=Math.hypot,oSe=Math.abs,sSe=Math.sqrt,uSe=!!dz&&dz(1/0,NaN)!==1/0;aSe({target:"Math",stat:!0,arity:2,forced:uSe},{hypot:function(e,r){for(var n=0,i=0,a=arguments.length,o=0,s,d;i0?(d=s/o,n+=d*d):n+=s;return o===1/0?1/0:o*sSe(n)}})});var mz=_(()=>{"use strict";u();l();var lSe=q(),dSe=te(),fz=Math.imul,cSe=dSe(function(){return fz(4294967295,5)!==-5||fz.length!==2});lSe({target:"Math",stat:!0,forced:cSe},{imul:function(e,r){var n=65535,i=+e,a=+r,o=n&i,s=n&a;return 0|o*s+((n&i>>>16)*s+o*(n&a>>>16)<<16>>>0)}})});var KE=_(($nt,pz)=>{"use strict";u();l();var fSe=Math.log,mSe=Math.LOG10E;pz.exports=Math.log10||function(e){return fSe(e)*mSe}});var gz=_(()=>{"use strict";u();l();var pSe=q(),gSe=KE();pSe({target:"Math",stat:!0},{log10:gSe})});var hz=_(()=>{"use strict";u();l();var hSe=q(),ySe=BE();hSe({target:"Math",stat:!0},{log1p:ySe})});var yz=_(()=>{"use strict";u();l();var vSe=q(),bSe=Math.log,SSe=Math.LN2;vSe({target:"Math",stat:!0},{log2:function(e){return bSe(e)/SSe}})});var vz=_(()=>{"use strict";u();l();var ISe=q(),TSe=fy();ISe({target:"Math",stat:!0},{sign:TSe})});var Iz=_(()=>{"use strict";u();l();var kSe=q(),ESe=te(),bz=Yc(),_Se=Math.abs,Sz=Math.exp,RSe=Math.E,MSe=ESe(function(){return Math.sinh(-2e-17)!==-2e-17});kSe({target:"Math",stat:!0,forced:MSe},{sinh:function(e){var r=+e;return _Se(r)<1?(bz(r)-bz(-r))/2:(Sz(r-1)-Sz(-r-1))*(RSe/2)}})});var Ez=_(()=>{"use strict";u();l();var CSe=q(),Tz=Yc(),kz=Math.exp;CSe({target:"Math",stat:!0},{tanh:function(e){var r=+e,n=Tz(r),i=Tz(-r);return n===1/0?1:i===1/0?-1:(n-i)/(kz(r)+kz(-r))}})});var _z=_(()=>{"use strict";u();l();var wSe=xr();wSe(Math,"Math",!0)});var Rz=_(()=>{"use strict";u();l();var xSe=q(),ASe=zT();xSe({target:"Math",stat:!0},{trunc:ASe})});var Qc=_((wit,Mz)=>{"use strict";u();l();var PSe=ie();Mz.exports=PSe(1 .valueOf)});var Xc=_((Pit,Cz)=>{"use strict";u();l();Cz.exports=` +\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var Ps=_((Nit,xz)=>{"use strict";u();l();var OSe=ie(),LSe=ct(),NSe=Ce(),jE=Xc(),wz=OSe("".replace),DSe=RegExp("^["+jE+"]+"),qSe=RegExp("(^|[^"+jE+"])["+jE+"]+$"),zE=function(t){return function(e){var r=NSe(LSe(e));return t&1&&(r=wz(r,DSe,"")),t&2&&(r=wz(r,qSe,"$1")),r}};xz.exports={start:zE(1),end:zE(2),trim:zE(3)}});var qz=_(()=>{"use strict";u();l();var BSe=q(),VE=bt(),USe=ke(),Oz=pe(),HE=Uh(),Lz=ie(),FSe=Wu(),Az=Fe(),KSe=Es(),zSe=fn(),jSe=eo(),Nz=yc(),VSe=te(),HSe=sa().f,GSe=rr().f,WSe=mt().f,$Se=Qc(),YSe=Ps().trim,Zc="Number",cl=Oz[Zc],Pz=HE[Zc],GE=cl.prototype,QSe=Oz.TypeError,XSe=Lz("".slice),Py=Lz("".charCodeAt),ZSe=function(t){var e=Nz(t,"number");return typeof e=="bigint"?e:JSe(e)},JSe=function(t){var e=Nz(t,"number"),r,n,i,a,o,s,d,c;if(jSe(e))throw new QSe("Cannot convert a Symbol value to a number");if(typeof e=="string"&&e.length>2){if(e=YSe(e),r=Py(e,0),r===43||r===45){if(n=Py(e,2),n===88||n===120)return NaN}else if(r===48){switch(Py(e,1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+e}for(o=XSe(e,2),s=o.length,d=0;da)return NaN;return parseInt(o,i)}}return+e},WE=FSe(Zc,!cl(" 0o1")||!cl("0b1")||cl("+0x1")),eIe=function(t){return zSe(GE,t)&&VSe(function(){$Se(t)})},Oy=function(e){var r=arguments.length<1?0:cl(ZSe(e));return eIe(this)?KSe(Object(r),this,Oy):r};Oy.prototype=GE;WE&&!VE&&(GE.constructor=Oy);BSe({global:!0,constructor:!0,wrap:!0,forced:WE},{Number:Oy});var Dz=function(t,e){for(var r=USe?HSe(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0,i;r.length>n;n++)Az(e,i=r[n])&&!Az(t,i)&&WSe(t,i,GSe(e,i))};VE&&Pz&&Dz(HE[Zc],Pz);(WE||VE)&&Dz(HE[Zc],cl)});var Bz=_(()=>{"use strict";u();l();var tIe=q();tIe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})});var Fz=_((Git,Uz)=>{"use strict";u();l();var rIe=pe(),nIe=rIe.isFinite;Uz.exports=Number.isFinite||function(e){return typeof e=="number"&&nIe(e)}});var Kz=_(()=>{"use strict";u();l();var iIe=q(),aIe=Fz();iIe({target:"Number",stat:!0},{isFinite:aIe})});var Ly=_((Jit,zz)=>{"use strict";u();l();var oIe=De(),sIe=Math.floor;zz.exports=Number.isInteger||function(e){return!oIe(e)&&isFinite(e)&&sIe(e)===e}});var jz=_(()=>{"use strict";u();l();var uIe=q(),lIe=Ly();uIe({target:"Number",stat:!0},{isInteger:lIe})});var Vz=_(()=>{"use strict";u();l();var dIe=q();dIe({target:"Number",stat:!0},{isNaN:function(e){return e!==e}})});var Hz=_(()=>{"use strict";u();l();var cIe=q(),fIe=Ly(),mIe=Math.abs;cIe({target:"Number",stat:!0},{isSafeInteger:function(e){return fIe(e)&&mIe(e)<=9007199254740991}})});var Gz=_(()=>{"use strict";u();l();var pIe=q();pIe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})});var Wz=_(()=>{"use strict";u();l();var gIe=q();gIe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})});var $E=_((Tat,Xz)=>{"use strict";u();l();var Qz=pe(),hIe=te(),yIe=ie(),vIe=Ce(),bIe=Ps().trim,SIe=Xc(),IIe=yIe("".charAt),Ny=Qz.parseFloat,$z=Qz.Symbol,Yz=$z&&$z.iterator,TIe=1/Ny(SIe+"-0")!==-1/0||Yz&&!hIe(function(){Ny(Object(Yz))});Xz.exports=TIe?function(e){var r=bIe(vIe(e)),n=Ny(r);return n===0&&IIe(r,0)==="-"?-0:n}:Ny});var Jz=_(()=>{"use strict";u();l();var kIe=q(),Zz=$E();kIe({target:"Number",stat:!0,forced:Number.parseFloat!==Zz},{parseFloat:Zz})});var YE=_((wat,aj)=>{"use strict";u();l();var nj=pe(),EIe=te(),_Ie=ie(),RIe=Ce(),MIe=Ps().trim,ej=Xc(),Jc=nj.parseInt,tj=nj.Symbol,rj=tj&&tj.iterator,ij=/^[+-]?0x/i,CIe=_Ie(ij.exec),wIe=Jc(ej+"08")!==8||Jc(ej+"0x16")!==22||rj&&!EIe(function(){Jc(Object(rj))});aj.exports=wIe?function(e,r){var n=MIe(RIe(e));return Jc(n,r>>>0||(CIe(ij,n)?16:10))}:Jc});var sj=_(()=>{"use strict";u();l();var xIe=q(),oj=YE();xIe({target:"Number",stat:!0,forced:Number.parseInt!==oj},{parseInt:oj})});var fj=_(()=>{"use strict";u();l();var AIe=q(),XE=ie(),PIe=Et(),OIe=Qc(),LIe=jc(),NIe=KE(),QE=te(),DIe=RangeError,uj=String,qIe=isFinite,BIe=Math.abs,UIe=Math.floor,lj=Math.pow,FIe=Math.round,Ui=XE(1 .toExponential),KIe=XE(LIe),dj=XE("".slice),cj=Ui(-69e-12,4)==="-6.9000e-11"&&Ui(1.255,2)==="1.25e+0"&&Ui(12345,3)==="1.235e+4"&&Ui(25,0)==="3e+1",zIe=function(){return QE(function(){Ui(1,1/0)})&&QE(function(){Ui(1,-1/0)})},jIe=function(){return!QE(function(){Ui(1/0,1/0),Ui(NaN,1/0)})},VIe=!cj||!zIe()||!jIe();AIe({target:"Number",proto:!0,forced:VIe},{toExponential:function(e){var r=OIe(this);if(e===void 0)return Ui(r);var n=PIe(e);if(!qIe(r))return String(r);if(n<0||n>20)throw new DIe("Incorrect fraction digits");if(cj)return Ui(r,n);var i="",a="",o=0,s="",d="";if(r<0&&(i="-",r=-r),r===0)o=0,a=KIe("0",n+1);else{var c=NIe(r);o=UIe(c);var m=0,f=lj(10,o-n);m=FIe(r/f),2*r>=(2*m+1)*f&&(m+=1),m>=lj(10,n+1)&&(m/=10,o+=1),a=uj(m)}return n!==0&&(a=dj(a,0,1)+"."+dj(a,1)),o===0?(s="+",d="0"):(s=o>0?"+":"-",d=uj(BIe(o))),a+="e"+s+d,i+a}})});var vj=_(()=>{"use strict";u();l();var HIe=q(),e_=ie(),GIe=Et(),WIe=Qc(),$Ie=jc(),mj=te(),YIe=RangeError,hj=String,yj=Math.floor,JE=e_($Ie),pj=e_("".slice),ef=e_(1 .toFixed),ml=function(t,e,r){return e===0?r:e%2===1?ml(t,e-1,r*t):ml(t*t,e/2,r)},QIe=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e},fl=function(t,e,r){for(var n=-1,i=r;++n<6;)i+=e*t[n],t[n]=i%1e7,i=yj(i/1e7)},ZE=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=yj(n/e),n=n%e*1e7},gj=function(t){for(var e=6,r="";--e>=0;)if(r!==""||e===0||t[e]!==0){var n=hj(t[e]);r=r===""?n:r+JE("0",7-n.length)+n}return r},XIe=mj(function(){return ef(8e-5,3)!=="0.000"||ef(.9,0)!=="1"||ef(1.255,2)!=="1.25"||ef(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!mj(function(){ef({})});HIe({target:"Number",proto:!0,forced:XIe},{toFixed:function(e){var r=WIe(this),n=GIe(e),i=[0,0,0,0,0,0],a="",o="0",s,d,c,m;if(n<0||n>20)throw new YIe("Incorrect fraction digits");if(r!==r)return"NaN";if(r<=-1e21||r>=1e21)return hj(r);if(r<0&&(a="-",r=-r),r>1e-21)if(s=QIe(r*ml(2,69,1))-69,d=s<0?r*ml(2,-s,1):r/ml(2,s,1),d*=4503599627370496,s=52-s,s>0){for(fl(i,0,d),c=n;c>=7;)fl(i,1e7,0),c-=7;for(fl(i,ml(10,c,1),0),c=s-1;c>=23;)ZE(i,1<<23),c-=23;ZE(i,1<0?(m=o.length,o=a+(m<=n?"0."+JE("0",n-m)+o:pj(o,0,m-n)+"."+pj(o,m-n))):o=a+o,o}})});var Ij=_(()=>{"use strict";u();l();var ZIe=q(),JIe=ie(),bj=te(),Sj=Qc(),Dy=JIe(1 .toPrecision),eTe=bj(function(){return Dy(1,void 0)!=="1"})||!bj(function(){Dy({})});ZIe({target:"Number",proto:!0,forced:eTe},{toPrecision:function(e){return e===void 0?Dy(Sj(this)):Dy(Sj(this),e)}})});var r_=_(($at,Ej)=>{"use strict";u();l();var Tj=ke(),tTe=ie(),rTe=we(),nTe=te(),t_=$u(),iTe=Ic(),aTe=hc(),oTe=Ve(),sTe=ps(),pl=Object.assign,kj=Object.defineProperty,uTe=tTe([].concat);Ej.exports=!pl||nTe(function(){if(Tj&&pl({b:1},pl(kj({},"a",{enumerable:!0,get:function(){kj(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(i){e[i]=i}),pl({},t)[r]!==7||t_(pl({},e)).join("")!==n})?function(e,r){for(var n=oTe(e),i=arguments.length,a=1,o=iTe.f,s=aTe.f;i>a;)for(var d=sTe(arguments[a++]),c=o?uTe(t_(d),o(d)):t_(d),m=c.length,f=0,p;m>f;)p=c[f++],(!Tj||rTe(s,d,p))&&(n[p]=d[p]);return n}:pl});var Rj=_(()=>{"use strict";u();l();var lTe=q(),_j=r_();lTe({target:"Object",stat:!0,arity:2,forced:Object.assign!==_j},{assign:_j})});var Mj=_(()=>{"use strict";u();l();var dTe=q(),cTe=ke(),fTe=Vr();dTe({target:"Object",stat:!0,sham:!cTe},{create:fTe})});var tf=_((aot,wj)=>{"use strict";u();l();var mTe=bt(),pTe=pe(),gTe=te(),Cj=ly();wj.exports=mTe||!gTe(function(){if(!(Cj&&Cj<535)){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete pTe[t]}})});var xj=_(()=>{"use strict";u();l();var hTe=q(),yTe=ke(),vTe=tf(),bTe=ft(),STe=Ve(),ITe=mt();yTe&&hTe({target:"Object",proto:!0,forced:vTe},{__defineGetter__:function(e,r){ITe.f(STe(this),e,{get:bTe(r),enumerable:!0,configurable:!0})}})});var Pj=_(()=>{"use strict";u();l();var TTe=q(),kTe=ke(),Aj=Nh().f;TTe({target:"Object",stat:!0,forced:Object.defineProperties!==Aj,sham:!kTe},{defineProperties:Aj})});var Lj=_(()=>{"use strict";u();l();var ETe=q(),_Te=ke(),Oj=mt().f;ETe({target:"Object",stat:!0,forced:Object.defineProperty!==Oj,sham:!_Te},{defineProperty:Oj})});var Nj=_(()=>{"use strict";u();l();var RTe=q(),MTe=ke(),CTe=tf(),wTe=ft(),xTe=Ve(),ATe=mt();MTe&&RTe({target:"Object",proto:!0,forced:CTe},{__defineSetter__:function(e,r){ATe.f(xTe(this),e,{set:wTe(r),enumerable:!0,configurable:!0})}})});var n_=_((Eot,Fj)=>{"use strict";u();l();var qj=ke(),PTe=te(),Bj=ie(),OTe=Gr(),LTe=$u(),NTe=Bt(),DTe=hc().f,Uj=Bj(DTe),qTe=Bj([].push),BTe=qj&&PTe(function(){var t=Object.create(null);return t[2]=2,!Uj(t,2)}),Dj=function(t){return function(e){for(var r=NTe(e),n=LTe(r),i=BTe&&OTe(r)===null,a=n.length,o=0,s=[],d;a>o;)d=n[o++],(!qj||(i?d in r:Uj(r,d)))&&qTe(s,t?[d,r[d]]:r[d]);return s}};Fj.exports={entries:Dj(!0),values:Dj(!1)}});var Kj=_(()=>{"use strict";u();l();var UTe=q(),FTe=n_().entries;UTe({target:"Object",stat:!0},{entries:function(e){return FTe(e)}})});var zj=_(()=>{"use strict";u();l();var KTe=q(),zTe=As(),jTe=te(),VTe=De(),HTe=fo().onFreeze,i_=Object.freeze,GTe=jTe(function(){i_(1)});KTe({target:"Object",stat:!0,forced:GTe,sham:!zTe},{freeze:function(e){return i_&&VTe(e)?i_(HTe(e)):e}})});var jj=_(()=>{"use strict";u();l();var WTe=q(),$Te=pn(),YTe=Oi();WTe({target:"Object",stat:!0},{fromEntries:function(e){var r={};return $Te(e,function(n,i){YTe(r,n,i)},{AS_ENTRIES:!0}),r}})});var Gj=_(()=>{"use strict";u();l();var QTe=q(),XTe=te(),ZTe=Bt(),Vj=rr().f,Hj=ke(),JTe=!Hj||XTe(function(){Vj(1)});QTe({target:"Object",stat:!0,forced:JTe,sham:!Hj},{getOwnPropertyDescriptor:function(e,r){return Vj(ZTe(e),r)}})});var Wj=_(()=>{"use strict";u();l();var eke=q(),tke=ke(),rke=Ph(),nke=Bt(),ike=rr(),ake=Oi();eke({target:"Object",stat:!0,sham:!tke},{getOwnPropertyDescriptors:function(e){for(var r=nke(e),n=ike.f,i=rke(r),a={},o=0,s,d;i.length>o;)d=n(r,s=i[o++]),d!==void 0&&ake(a,s,d);return a}})});var $j=_(()=>{"use strict";u();l();var oke=q(),ske=te(),uke=Bh().f,lke=ske(function(){return!Object.getOwnPropertyNames(1)});oke({target:"Object",stat:!0,forced:lke},{getOwnPropertyNames:uke})});var Qj=_(()=>{"use strict";u();l();var dke=q(),cke=te(),fke=Ve(),Yj=Gr(),mke=Qh(),pke=cke(function(){Yj(1)});dke({target:"Object",stat:!0,forced:pke,sham:!mke},{getPrototypeOf:function(e){return Yj(fke(e))}})});var Xj=_(()=>{"use strict";u();l();var gke=q(),hke=Xe(),yke=ie(),vke=ft(),bke=ct(),Ske=Pi(),Ike=pn(),Tke=hke("Object","create"),kke=yke([].push);gke({target:"Object",stat:!0},{groupBy:function(e,r){bke(e),vke(r);var n=Tke(null),i=0;return Ike(e,function(a){var o=Ske(r(a,i++));o in n?kke(n[o],a):n[o]=[a]}),n}})});var Zj=_(()=>{"use strict";u();l();var Eke=q(),_ke=Fe();Eke({target:"Object",stat:!0},{hasOwn:_ke})});var a_=_((lst,Jj)=>{"use strict";u();l();Jj.exports=Object.is||function(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}});var eV=_(()=>{"use strict";u();l();var Rke=q(),Mke=a_();Rke({target:"Object",stat:!0},{is:Mke})});var rV=_(()=>{"use strict";u();l();var Cke=q(),tV=Cy();Cke({target:"Object",stat:!0,forced:Object.isExtensible!==tV},{isExtensible:tV})});var iV=_(()=>{"use strict";u();l();var wke=q(),xke=te(),Ake=De(),Pke=mr(),nV=Ry(),o_=Object.isFrozen,Oke=nV||xke(function(){o_(1)});wke({target:"Object",stat:!0,forced:Oke},{isFrozen:function(e){return!Ake(e)||nV&&Pke(e)==="ArrayBuffer"?!0:o_?o_(e):!1}})});var oV=_(()=>{"use strict";u();l();var Lke=q(),Nke=te(),Dke=De(),qke=mr(),aV=Ry(),s_=Object.isSealed,Bke=aV||Nke(function(){s_(1)});Lke({target:"Object",stat:!0,forced:Bke},{isSealed:function(e){return!Dke(e)||aV&&qke(e)==="ArrayBuffer"?!0:s_?s_(e):!1}})});var uV=_(()=>{"use strict";u();l();var Uke=q(),Fke=Ve(),sV=$u(),Kke=te(),zke=Kke(function(){sV(1)});Uke({target:"Object",stat:!0,forced:zke},{keys:function(e){return sV(Fke(e))}})});var lV=_(()=>{"use strict";u();l();var jke=q(),Vke=ke(),Hke=tf(),Gke=Ve(),Wke=Pi(),$ke=Gr(),Yke=rr().f;Vke&&jke({target:"Object",proto:!0,forced:Hke},{__lookupGetter__:function(e){var r=Gke(this),n=Wke(e),i;do if(i=Yke(r,n))return i.get;while(r=$ke(r))}})});var dV=_(()=>{"use strict";u();l();var Qke=q(),Xke=ke(),Zke=tf(),Jke=Ve(),eEe=Pi(),tEe=Gr(),rEe=rr().f;Xke&&Qke({target:"Object",proto:!0,forced:Zke},{__lookupSetter__:function(e){var r=Jke(this),n=eEe(e),i;do if(i=rEe(r,n))return i.set;while(r=tEe(r))}})});var cV=_(()=>{"use strict";u();l();var nEe=q(),iEe=De(),aEe=fo().onFreeze,oEe=As(),sEe=te(),u_=Object.preventExtensions,uEe=sEe(function(){u_(1)});nEe({target:"Object",stat:!0,forced:uEe,sham:!oEe},{preventExtensions:function(e){return u_&&iEe(e)?u_(aEe(e)):e}})});var yV=_(()=>{"use strict";u();l();var lEe=ke(),dEe=$t(),fV=De(),cEe=Ve(),fEe=ct(),mV=Object.getPrototypeOf,pV=Object.setPrototypeOf,gV=Object.prototype,hV="__proto__";if(lEe&&mV&&pV&&!(hV in gV))try{dEe(gV,hV,{configurable:!0,get:function(){return mV(cEe(this))},set:function(e){var r=fEe(this);!fV(e)&&e!==null||!fV(r)||pV(r,e)}})}catch(t){}});var vV=_(()=>{"use strict";u();l();var mEe=q(),pEe=De(),gEe=fo().onFreeze,hEe=As(),yEe=te(),l_=Object.seal,vEe=yEe(function(){l_(1)});mEe({target:"Object",stat:!0,forced:vEe,sham:!hEe},{seal:function(e){return l_&&pEe(e)?l_(gEe(e)):e}})});var bV=_(()=>{"use strict";u();l();var bEe=q(),SEe=si();bEe({target:"Object",stat:!0},{setPrototypeOf:SEe})});var IV=_((rut,SV)=>{"use strict";u();l();var IEe=Oh(),TEe=oi();SV.exports=IEe?{}.toString:function(){return"[object "+TEe(this)+"]"}});var TV=_(()=>{"use strict";u();l();var kEe=Oh(),EEe=it(),_Ee=IV();kEe||EEe(Object.prototype,"toString",_Ee,{unsafe:!0})});var kV=_(()=>{"use strict";u();l();var REe=q(),MEe=n_().values;REe({target:"Object",stat:!0},{values:function(e){return MEe(e)}})});var _V=_(()=>{"use strict";u();l();var CEe=q(),EV=$E();CEe({global:!0,forced:parseFloat!==EV},{parseFloat:EV})});var MV=_(()=>{"use strict";u();l();var wEe=q(),RV=YE();wEe({global:!0,forced:parseInt!==RV},{parseInt:RV})});var On=_((Iut,CV)=>{"use strict";u();l();var xEe=TypeError;CV.exports=function(t,e){if(t{"use strict";u();l();var AEe=wi();wV.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(AEe)});var af=_((Mut,BV)=>{"use strict";u();l();var hn=pe(),PEe=mn(),OEe=xn(),xV=Ne(),LEe=Fe(),qV=te(),AV=GT(),NEe=no(),PV=vc(),DEe=On(),qEe=d_(),BEe=Di(),h_=hn.setImmediate,y_=hn.clearImmediate,UEe=hn.process,c_=hn.Dispatch,FEe=hn.Function,OV=hn.MessageChannel,KEe=hn.String,f_=0,rf={},LV="onreadystatechange",nf,Os,m_,p_;qV(function(){nf=hn.location});var v_=function(t){if(LEe(rf,t)){var e=rf[t];delete rf[t],e()}},g_=function(t){return function(){v_(t)}},NV=function(t){v_(t.data)},DV=function(t){hn.postMessage(KEe(t),nf.protocol+"//"+nf.host)};(!h_||!y_)&&(h_=function(e){DEe(arguments.length,1);var r=xV(e)?e:FEe(e),n=NEe(arguments,1);return rf[++f_]=function(){PEe(r,void 0,n)},Os(f_),f_},y_=function(e){delete rf[e]},BEe?Os=function(t){UEe.nextTick(g_(t))}:c_&&c_.now?Os=function(t){c_.now(g_(t))}:OV&&!qEe?(m_=new OV,p_=m_.port2,m_.port1.onmessage=NV,Os=OEe(p_.postMessage,p_)):hn.addEventListener&&xV(hn.postMessage)&&!hn.importScripts&&nf&&nf.protocol!=="file:"&&!qV(DV)?(Os=DV,hn.addEventListener("message",NV,!1)):LV in PV("script")?Os=function(t){AV.appendChild(PV("script"))[LV]=function(){AV.removeChild(this),v_(t)}}:Os=function(t){setTimeout(g_(t),0)});BV.exports={set:h_,clear:y_}});var b_=_((xut,FV)=>{"use strict";u();l();var UV=function(){this.head=null,this.tail=null};UV.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};FV.exports=UV});var zV=_((Out,KV)=>{"use strict";u();l();var zEe=wi();KV.exports=/ipad|iphone|ipod/i.test(zEe)&&typeof Pebble!="undefined"});var VV=_((Dut,jV)=>{"use strict";u();l();var jEe=wi();jV.exports=/web0s(?!.*chrome)/i.test(jEe)});var __=_((Uut,XV)=>{"use strict";u();l();var Ls=pe(),HV=xn(),VEe=rr().f,S_=af().set,HEe=b_(),GEe=d_(),WEe=zV(),$Ee=VV(),I_=Di(),GV=Ls.MutationObserver||Ls.WebKitMutationObserver,WV=Ls.document,$V=Ls.process,qy=Ls.Promise,YV=VEe(Ls,"queueMicrotask"),E_=YV&&YV.value,gl,T_,k_,By,QV;E_||(of=new HEe,sf=function(){var t,e;for(I_&&(t=$V.domain)&&t.exit();e=of.get();)try{e()}catch(r){throw of.head&&gl(),r}t&&t.enter()},!GEe&&!I_&&!$Ee&&GV&&WV?(T_=!0,k_=WV.createTextNode(""),new GV(sf).observe(k_,{characterData:!0}),gl=function(){k_.data=T_=!T_}):!WEe&&qy&&qy.resolve?(By=qy.resolve(void 0),By.constructor=qy,QV=HV(By.then,By),gl=function(){QV(sf)}):I_?gl=function(){$V.nextTick(sf)}:(S_=HV(S_,Ls),gl=function(){S_(sf)}),E_=function(t){of.head||gl(),of.add(t)});var of,sf;XV.exports=E_});var JV=_((zut,ZV)=>{"use strict";u();l();ZV.exports=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch(r){}}});var hl=_((Hut,eH)=>{"use strict";u();l();eH.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}});var Ns=_(($ut,tH)=>{"use strict";u();l();var YEe=pe();tH.exports=YEe.Promise});var Uy=_((Xut,rH)=>{"use strict";u();l();rH.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var R_=_((elt,nH)=>{"use strict";u();l();var QEe=Uy(),XEe=Di();nH.exports=!QEe&&!XEe&&typeof window=="object"&&typeof document=="object"});var yl=_((nlt,oH)=>{"use strict";u();l();var ZEe=pe(),uf=Ns(),JEe=Ne(),e_e=Wu(),t_e=_h(),r_e=qe(),n_e=R_(),i_e=Uy(),a_e=bt(),M_=xi(),iH=uf&&uf.prototype,o_e=r_e("species"),C_=!1,aH=JEe(ZEe.PromiseRejectionEvent),s_e=e_e("Promise",function(){var t=t_e(uf),e=t!==String(uf);if(!e&&M_===66||a_e&&!(iH.catch&&iH.finally))return!0;if(!M_||M_<51||!/native code/.test(t)){var r=new uf(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=r.constructor={};if(i[o_e]=n,C_=r.then(function(){})instanceof n,!C_)return!0}return!e&&(n_e||i_e)&&!aH});oH.exports={CONSTRUCTOR:s_e,REJECTION_EVENT:aH,SUBCLASSING:C_}});var va=_((olt,uH)=>{"use strict";u();l();var sH=ft(),u_e=TypeError,l_e=function(t){var e,r;this.promise=new t(function(n,i){if(e!==void 0||r!==void 0)throw new u_e("Bad Promise constructor");e=n,r=i}),this.resolve=sH(e),this.reject=sH(r)};uH.exports.f=function(t){return new l_e(t)}});var MH=_(()=>{"use strict";u();l();var d_e=q(),c_e=bt(),jy=Di(),mo=pe(),Il=we(),lH=it(),dH=si(),f_e=xr(),m_e=Ms(),p_e=ft(),zy=Ne(),g_e=De(),h_e=ui(),y_e=ws(),gH=af().set,O_=__(),v_e=JV(),b_e=hl(),S_e=b_(),hH=Lt(),Vy=Ns(),L_=yl(),yH=va(),Hy="Promise",vH=L_.CONSTRUCTOR,I_e=L_.REJECTION_EVENT,T_e=L_.SUBCLASSING,w_=hH.getterFor(Hy),k_e=hH.set,vl=Vy&&Vy.prototype,Ds=Vy,Fy=vl,bH=mo.TypeError,x_=mo.document,N_=mo.process,A_=yH.f,E_e=A_,__e=!!(x_&&x_.createEvent&&mo.dispatchEvent),SH="unhandledrejection",R_e="rejectionhandled",cH=0,IH=1,M_e=2,D_=1,TH=2,Ky,fH,C_e,mH,kH=function(t){var e;return g_e(t)&&zy(e=t.then)?e:!1},EH=function(t,e){var r=e.value,n=e.state===IH,i=n?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,d,c,m;try{i?(n||(e.rejection===TH&&x_e(e),e.rejection=D_),i===!0?d=r:(s&&s.enter(),d=i(r),s&&(s.exit(),m=!0)),d===t.promise?o(new bH("Promise-chain cycle")):(c=kH(d))?Il(c,d,a,o):a(d)):o(r)}catch(f){s&&!m&&s.exit(),o(f)}},_H=function(t,e){t.notified||(t.notified=!0,O_(function(){for(var r=t.reactions,n;n=r.get();)EH(n,t);t.notified=!1,e&&!t.rejection&&w_e(t)}))},RH=function(t,e,r){var n,i;__e?(n=x_.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),mo.dispatchEvent(n)):n={promise:e,reason:r},!I_e&&(i=mo["on"+t])?i(n):t===SH&&v_e("Unhandled promise rejection",r)},w_e=function(t){Il(gH,mo,function(){var e=t.facade,r=t.value,n=pH(t),i;if(n&&(i=b_e(function(){jy?N_.emit("unhandledRejection",r,e):RH(SH,e,r)}),t.rejection=jy||pH(t)?TH:D_,i.error))throw i.value})},pH=function(t){return t.rejection!==D_&&!t.parent},x_e=function(t){Il(gH,mo,function(){var e=t.facade;jy?N_.emit("rejectionHandled",e):RH(R_e,e,t.value)})},bl=function(t,e,r){return function(n){t(e,n,r)}},Sl=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=M_e,_H(t,!0))},P_=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new bH("Promise can't be resolved itself");var n=kH(e);n?O_(function(){var i={done:!1};try{Il(n,e,bl(P_,i,t),bl(Sl,i,t))}catch(a){Sl(i,a,t)}}):(t.value=e,t.state=IH,_H(t,!1))}catch(i){Sl({done:!1},i,t)}}};if(vH&&(Ds=function(e){h_e(this,Fy),p_e(e),Il(Ky,this);var r=w_(this);try{e(bl(P_,r),bl(Sl,r))}catch(n){Sl(r,n)}},Fy=Ds.prototype,Ky=function(e){k_e(this,{type:Hy,done:!1,notified:!1,parent:!1,reactions:new S_e,rejection:!1,state:cH,value:void 0})},Ky.prototype=lH(Fy,"then",function(e,r){var n=w_(this),i=A_(y_e(this,Ds));return n.parent=!0,i.ok=zy(e)?e:!0,i.fail=zy(r)&&r,i.domain=jy?N_.domain:void 0,n.state===cH?n.reactions.add(i):O_(function(){EH(i,n)}),i.promise}),fH=function(){var t=new Ky,e=w_(t);this.promise=t,this.resolve=bl(P_,e),this.reject=bl(Sl,e)},yH.f=A_=function(t){return t===Ds||t===C_e?new fH(t):E_e(t)},!c_e&&zy(Vy)&&vl!==Object.prototype)){mH=vl.then,T_e||lH(vl,"then",function(e,r){var n=this;return new Ds(function(i,a){Il(mH,n,i,a)}).then(e,r)},{unsafe:!0});try{delete vl.constructor}catch(t){}dH&&dH(vl,Fy)}d_e({global:!0,constructor:!0,wrap:!0,forced:vH},{Promise:Ds});f_e(Ds,Hy,!1,!0);m_e(Hy)});var lf=_((mlt,CH)=>{"use strict";u();l();var A_e=Ns(),P_e=Nc(),O_e=yl().CONSTRUCTOR;CH.exports=O_e||!P_e(function(t){A_e.all(t).then(void 0,function(){})})});var wH=_(()=>{"use strict";u();l();var L_e=q(),N_e=we(),D_e=ft(),q_e=va(),B_e=hl(),U_e=pn(),F_e=lf();L_e({target:"Promise",stat:!0,forced:F_e},{all:function(e){var r=this,n=q_e.f(r),i=n.resolve,a=n.reject,o=B_e(function(){var s=D_e(r.resolve),d=[],c=0,m=1;U_e(e,function(f){var p=c++,y=!1;m++,N_e(s,r,f).then(function(v){y||(y=!0,d[p]=v,--m||i(d))},a)}),--m||i(d)});return o.error&&a(o.value),n.promise}})});var AH=_(()=>{"use strict";u();l();var K_e=q(),z_e=bt(),j_e=yl().CONSTRUCTOR,B_=Ns(),V_e=Xe(),H_e=Ne(),G_e=it(),xH=B_&&B_.prototype;K_e({target:"Promise",proto:!0,forced:j_e,real:!0},{catch:function(t){return this.then(void 0,t)}});!z_e&&H_e(B_)&&(q_=V_e("Promise").prototype.catch,xH.catch!==q_&&G_e(xH,"catch",q_,{unsafe:!0}));var q_});var PH=_(()=>{"use strict";u();l();var W_e=q(),$_e=we(),Y_e=ft(),Q_e=va(),X_e=hl(),Z_e=pn(),J_e=lf();W_e({target:"Promise",stat:!0,forced:J_e},{race:function(e){var r=this,n=Q_e.f(r),i=n.reject,a=X_e(function(){var o=Y_e(r.resolve);Z_e(e,function(s){$_e(o,r,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}})});var OH=_(()=>{"use strict";u();l();var eRe=q(),tRe=we(),rRe=va(),nRe=yl().CONSTRUCTOR;eRe({target:"Promise",stat:!0,forced:nRe},{reject:function(e){var r=rRe.f(this);return tRe(r.reject,void 0,e),r.promise}})});var U_=_((Plt,LH)=>{"use strict";u();l();var iRe=xe(),aRe=De(),oRe=va();LH.exports=function(t,e){if(iRe(t),aRe(e)&&e.constructor===t)return e;var r=oRe.f(t),n=r.resolve;return n(e),r.promise}});var qH=_(()=>{"use strict";u();l();var sRe=q(),uRe=Xe(),NH=bt(),lRe=Ns(),DH=yl().CONSTRUCTOR,dRe=U_(),cRe=uRe("Promise"),fRe=NH&&!DH;sRe({target:"Promise",stat:!0,forced:NH||DH},{resolve:function(e){return dRe(fRe&&this===cRe?lRe:this,e)}})});var BH=_(()=>{"use strict";u();l();MH();wH();AH();PH();OH();qH()});var UH=_(()=>{"use strict";u();l();var mRe=q(),pRe=we(),gRe=ft(),hRe=va(),yRe=hl(),vRe=pn(),bRe=lf();mRe({target:"Promise",stat:!0,forced:bRe},{allSettled:function(e){var r=this,n=hRe.f(r),i=n.resolve,a=n.reject,o=yRe(function(){var s=gRe(r.resolve),d=[],c=0,m=1;vRe(e,function(f){var p=c++,y=!1;m++,pRe(s,r,f).then(function(v){y||(y=!0,d[p]={status:"fulfilled",value:v},--m||i(d))},function(v){y||(y=!0,d[p]={status:"rejected",reason:v},--m||i(d))})}),--m||i(d)});return o.error&&a(o.value),n.promise}})});var KH=_(()=>{"use strict";u();l();var SRe=q(),IRe=we(),TRe=ft(),kRe=Xe(),ERe=va(),_Re=hl(),RRe=pn(),MRe=lf(),FH="No one promise resolved";SRe({target:"Promise",stat:!0,forced:MRe},{any:function(e){var r=this,n=kRe("AggregateError"),i=ERe.f(r),a=i.resolve,o=i.reject,s=_Re(function(){var d=TRe(r.resolve),c=[],m=0,f=1,p=!1;RRe(e,function(y){var v=m++,b=!1;f++,IRe(d,r,y).then(function(T){b||p||(p=!0,a(T))},function(T){b||p||(b=!0,c[v]=T,--f||o(new n(c,FH)))})}),--f||o(new n(c,FH))});return s.error&&o(s.value),i.promise}})});var HH=_(()=>{"use strict";u();l();var CRe=q(),wRe=bt(),Gy=Ns(),xRe=te(),jH=Xe(),VH=Ne(),ARe=ws(),zH=U_(),PRe=it(),K_=Gy&&Gy.prototype,ORe=!!Gy&&xRe(function(){K_.finally.call({then:function(){}},function(){})});CRe({target:"Promise",proto:!0,real:!0,forced:ORe},{finally:function(t){var e=ARe(this,jH("Promise")),r=VH(t);return this.then(r?function(n){return zH(e,t()).then(function(){return n})}:t,r?function(n){return zH(e,t()).then(function(){throw n})}:t)}});!wRe&&VH(Gy)&&(F_=jH("Promise").prototype.finally,K_.finally!==F_&&PRe(K_,"finally",F_,{unsafe:!0}));var F_});var GH=_(()=>{"use strict";u();l();var LRe=q(),NRe=va();LRe({target:"Promise",stat:!0},{withResolvers:function(){var e=NRe.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})});var WH=_(()=>{"use strict";u();l();var DRe=q(),qRe=mn(),BRe=ft(),URe=xe(),FRe=te(),KRe=!FRe(function(){Reflect.apply(function(){})});DRe({target:"Reflect",stat:!0,forced:KRe},{apply:function(e,r,n){return qRe(BRe(e),r,URe(n))}})});var e8=_(()=>{"use strict";u();l();var zRe=q(),jRe=Xe(),z_=mn(),VRe=ME(),$H=Ey(),HRe=xe(),YH=De(),GRe=Vr(),XH=te(),j_=jRe("Reflect","construct"),WRe=Object.prototype,$Re=[].push,ZH=XH(function(){function t(){}return!(j_(function(){},[],t)instanceof t)}),JH=!XH(function(){j_(function(){})}),QH=ZH||JH;zRe({target:"Reflect",stat:!0,forced:QH,sham:QH},{construct:function(e,r){$H(e),HRe(r);var n=arguments.length<3?e:$H(arguments[2]);if(JH&&!ZH)return j_(e,r,n);if(e===n){switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3])}var i=[null];return z_($Re,i,r),new(z_(VRe,e,i))}var a=n.prototype,o=GRe(YH(a)?a:WRe),s=z_(e,o,r);return YH(s)?s:o}})});var n8=_(()=>{"use strict";u();l();var YRe=q(),QRe=ke(),t8=xe(),XRe=Pi(),r8=mt(),ZRe=te(),JRe=ZRe(function(){Reflect.defineProperty(r8.f({},1,{value:1}),1,{value:2})});YRe({target:"Reflect",stat:!0,forced:JRe,sham:!QRe},{defineProperty:function(e,r,n){t8(e);var i=XRe(r);t8(n);try{return r8.f(e,i,n),!0}catch(a){return!1}}})});var i8=_(()=>{"use strict";u();l();var eMe=q(),tMe=xe(),rMe=rr().f;eMe({target:"Reflect",stat:!0},{deleteProperty:function(e,r){var n=rMe(tMe(e),r);return n&&!n.configurable?!1:delete e[r]}})});var V_=_((Idt,o8)=>{"use strict";u();l();var a8=Fe();o8.exports=function(t){return t!==void 0&&(a8(t,"value")||a8(t,"writable"))}});var u8=_(()=>{"use strict";u();l();var nMe=q(),iMe=we(),aMe=De(),oMe=xe(),sMe=V_(),uMe=rr(),lMe=Gr();function s8(t,e){var r=arguments.length<3?t:arguments[2],n,i;if(oMe(t)===r)return t[e];if(n=uMe.f(t,e),n)return sMe(n)?n.value:n.get===void 0?void 0:iMe(n.get,r);if(aMe(i=lMe(t)))return s8(i,e,r)}nMe({target:"Reflect",stat:!0},{get:s8})});var l8=_(()=>{"use strict";u();l();var dMe=q(),cMe=ke(),fMe=xe(),mMe=rr();dMe({target:"Reflect",stat:!0,sham:!cMe},{getOwnPropertyDescriptor:function(e,r){return mMe.f(fMe(e),r)}})});var d8=_(()=>{"use strict";u();l();var pMe=q(),gMe=xe(),hMe=Gr(),yMe=Qh();pMe({target:"Reflect",stat:!0,sham:!yMe},{getPrototypeOf:function(e){return hMe(gMe(e))}})});var c8=_(()=>{"use strict";u();l();var vMe=q();vMe({target:"Reflect",stat:!0},{has:function(e,r){return r in e}})});var f8=_(()=>{"use strict";u();l();var bMe=q(),SMe=xe(),IMe=Cy();bMe({target:"Reflect",stat:!0},{isExtensible:function(e){return SMe(e),IMe(e)}})});var m8=_(()=>{"use strict";u();l();var TMe=q(),kMe=Ph();TMe({target:"Reflect",stat:!0},{ownKeys:kMe})});var p8=_(()=>{"use strict";u();l();var EMe=q(),_Me=Xe(),RMe=xe(),MMe=As();EMe({target:"Reflect",stat:!0,sham:!MMe},{preventExtensions:function(e){RMe(e);try{var r=_Me("Object","preventExtensions");return r&&r(e),!0}catch(n){return!1}}})});var b8=_(()=>{"use strict";u();l();var CMe=q(),wMe=we(),xMe=xe(),g8=De(),AMe=V_(),PMe=te(),H_=mt(),h8=rr(),OMe=Gr(),y8=cn();function v8(t,e,r){var n=arguments.length<4?t:arguments[3],i=h8.f(xMe(t),e),a,o,s;if(!i){if(g8(o=OMe(t)))return v8(o,e,r,n);i=y8(0)}if(AMe(i)){if(i.writable===!1||!g8(n))return!1;if(a=h8.f(n,e)){if(a.get||a.set||a.writable===!1)return!1;a.value=r,H_.f(n,e,a)}else H_.f(n,e,y8(0,r))}else{if(s=i.set,s===void 0)return!1;wMe(s,n,r)}return!0}var LMe=PMe(function(){var t=function(){},e=H_.f(new t,"a",{configurable:!0});return Reflect.set(t.prototype,"a",1,e)!==!1});CMe({target:"Reflect",stat:!0,forced:LMe},{set:v8})});var I8=_(()=>{"use strict";u();l();var NMe=q(),DMe=xe(),qMe=gk(),S8=si();S8&&NMe({target:"Reflect",stat:!0},{setPrototypeOf:function(e,r){DMe(e),qMe(r);try{return S8(e,r),!0}catch(n){return!1}}})});var T8=_(()=>{"use strict";u();l();var BMe=q(),UMe=pe(),FMe=xr();BMe({global:!0},{Reflect:{}});FMe(UMe.Reflect,"Reflect",!0)});var Tl=_((dct,k8)=>{"use strict";u();l();var KMe=De(),zMe=mr(),jMe=qe(),VMe=jMe("match");k8.exports=function(t){var e;return KMe(t)&&((e=t[VMe])!==void 0?!!e:zMe(t)==="RegExp")}});var Wy=_((mct,E8)=>{"use strict";u();l();var HMe=xe();E8.exports=function(){var t=HMe(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}});var kl=_((hct,R8)=>{"use strict";u();l();var GMe=we(),WMe=Fe(),$Me=fn(),YMe=Wy(),_8=RegExp.prototype;R8.exports=function(t){var e=t.flags;return e===void 0&&!("flags"in _8)&&!WMe(t,"flags")&&$Me(_8,t)?GMe(YMe,t):e}});var df=_((bct,M8)=>{"use strict";u();l();var G_=te(),QMe=pe(),W_=QMe.RegExp,$_=G_(function(){var t=W_("a","y");return t.lastIndex=2,t.exec("abcd")!==null}),XMe=$_||G_(function(){return!W_("a","y").sticky}),ZMe=$_||G_(function(){var t=W_("^r","gy");return t.lastIndex=2,t.exec("str")!==null});M8.exports={BROKEN_CARET:ZMe,MISSED_STICKY:XMe,UNSUPPORTED_Y:$_}});var $y=_((Tct,C8)=>{"use strict";u();l();var JMe=te(),eCe=pe(),tCe=eCe.RegExp;C8.exports=JMe(function(){var t=tCe(".","s");return!(t.dotAll&&t.test(` +`)&&t.flags==="s")})});var Y_=_((_ct,w8)=>{"use strict";u();l();var rCe=te(),nCe=pe(),iCe=nCe.RegExp;w8.exports=rCe(function(){var t=iCe("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"})});var B8=_(()=>{"use strict";u();l();var aCe=ke(),J_=pe(),cf=ie(),oCe=Wu(),sCe=Es(),uCe=pr(),lCe=Vr(),dCe=sa().f,x8=fn(),cCe=Tl(),A8=Ce(),fCe=kl(),L8=df(),mCe=hk(),pCe=it(),gCe=te(),hCe=Fe(),yCe=Lt().enforce,vCe=Ms(),bCe=qe(),N8=$y(),D8=Y_(),SCe=bCe("match"),go=J_.RegExp,El=go.prototype,ICe=J_.SyntaxError,TCe=cf(El.exec),Yy=cf("".charAt),P8=cf("".replace),O8=cf("".indexOf),kCe=cf("".slice),ECe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,qs=/a/g,Q_=/a/g,_Ce=new go(qs)!==qs,q8=L8.MISSED_STICKY,RCe=L8.UNSUPPORTED_Y,MCe=aCe&&(!_Ce||q8||N8||D8||gCe(function(){return Q_[SCe]=!1,go(qs)!==qs||go(Q_)===Q_||String(go(qs,"i"))!=="/a/i"})),CCe=function(t){for(var e=t.length,r=0,n="",i=!1,a;r<=e;r++){if(a=Yy(t,r),a==="\\"){n+=a+Yy(t,++r);continue}!i&&a==="."?n+="[\\s\\S]":(a==="["?i=!0:a==="]"&&(i=!1),n+=a)}return n},wCe=function(t){for(var e=t.length,r=0,n="",i=[],a=lCe(null),o=!1,s=!1,d=0,c="",m;r<=e;r++){if(m=Yy(t,r),m==="\\")m+=Yy(t,++r);else if(m==="]")o=!1;else if(!o)switch(!0){case m==="[":o=!0;break;case m==="(":TCe(ECe,kCe(t,r+1))&&(r+=2,s=!0),n+=m,d++;continue;case(m===">"&&s):if(c===""||hCe(a,c))throw new ICe("Invalid capture group name");a[c]=!0,i[i.length]=[c,d],s=!1,c="";continue}s?c+=m:n+=m}return[n,i]};if(oCe("RegExp",MCe)){for(po=function(e,r){var n=x8(El,this),i=cCe(e),a=r===void 0,o=[],s=e,d,c,m,f,p,y;if(!n&&i&&a&&e.constructor===po)return e;if((i||x8(El,e))&&(e=e.source,a&&(r=fCe(s))),e=e===void 0?"":A8(e),r=r===void 0?"":A8(r),s=e,N8&&"dotAll"in qs&&(c=!!r&&O8(r,"s")>-1,c&&(r=P8(r,/s/g,""))),d=r,q8&&"sticky"in qs&&(m=!!r&&O8(r,"y")>-1,m&&RCe&&(r=P8(r,/y/g,""))),D8&&(f=wCe(e),e=f[0],o=f[1]),p=sCe(go(e,r),n?this:El,po),(c||m||o.length)&&(y=yCe(p),c&&(y.dotAll=!0,y.raw=po(CCe(e),d)),m&&(y.sticky=!0),o.length&&(y.groups=o)),e!==s)try{uCe(p,"source",s===""?"(?:)":s)}catch(v){}return p},X_=dCe(go),Z_=0;X_.length>Z_;)mCe(po,go,X_[Z_++]);El.constructor=po,po.prototype=El,pCe(J_,"RegExp",po,{constructor:!0})}var po,X_,Z_;vCe("RegExp")});var F8=_(()=>{"use strict";u();l();var xCe=ke(),ACe=$y(),PCe=mr(),OCe=$t(),LCe=Lt().get,U8=RegExp.prototype,NCe=TypeError;xCe&&ACe&&OCe(U8,"dotAll",{configurable:!0,get:function(){if(this!==U8){if(PCe(this)==="RegExp")return!!LCe(this).dotAll;throw new NCe("Incompatible receiver, RegExp required")}}})});var ff=_((Dct,z8)=>{"use strict";u();l();var _l=we(),Xy=ie(),DCe=Ce(),qCe=Wy(),BCe=df(),UCe=hs(),FCe=Vr(),KCe=Lt().get,zCe=$y(),jCe=Y_(),VCe=UCe("native-string-replace",String.prototype.replace),Qy=RegExp.prototype.exec,tR=Qy,HCe=Xy("".charAt),GCe=Xy("".indexOf),WCe=Xy("".replace),eR=Xy("".slice),rR=function(){var t=/a/,e=/b*/g;return _l(Qy,t,"a"),_l(Qy,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),K8=BCe.BROKEN_CARET,nR=/()??/.exec("")[1]!==void 0,$Ce=rR||nR||K8||zCe||jCe;$Ce&&(tR=function(e){var r=this,n=KCe(r),i=DCe(e),a=n.raw,o,s,d,c,m,f,p;if(a)return a.lastIndex=r.lastIndex,o=_l(tR,a,i),r.lastIndex=a.lastIndex,o;var y=n.groups,v=K8&&r.sticky,b=_l(qCe,r),T=r.source,S=0,I=i;if(v&&(b=WCe(b,"y",""),GCe(b,"g")===-1&&(b+="g"),I=eR(i,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&HCe(i,r.lastIndex-1)!==` +`)&&(T="(?: "+T+")",I=" "+I,S++),s=new RegExp("^(?:"+T+")",b)),nR&&(s=new RegExp("^"+T+"$(?!\\s)",b)),rR&&(d=r.lastIndex),c=_l(Qy,v?s:r,I),v?c?(c.input=eR(c.input,S),c[0]=eR(c[0],S),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:rR&&c&&(r.lastIndex=r.global?c.index+c[0].length:d),nR&&c&&c.length>1&&_l(VCe,c[0],s,function(){for(m=1;m{"use strict";u();l();var YCe=q(),j8=ff();YCe({target:"RegExp",proto:!0,forced:/./.exec!==j8},{exec:j8})});var G8=_(()=>{"use strict";u();l();var QCe=pe(),XCe=ke(),ZCe=$t(),JCe=Wy(),ewe=te(),V8=QCe.RegExp,H8=V8.prototype,twe=XCe&&ewe(function(){var t=!0;try{V8(".","d")}catch(d){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(d,c){Object.defineProperty(e,d,{get:function(){return r+=c,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};t&&(a.hasIndices="d");for(var o in a)i(o,a[o]);var s=Object.getOwnPropertyDescriptor(H8,"flags").get.call(e);return s!==n||r!==n});twe&&ZCe(H8,"flags",{configurable:!0,get:JCe})});var $8=_(()=>{"use strict";u();l();var rwe=ke(),nwe=df().MISSED_STICKY,iwe=mr(),awe=$t(),owe=Lt().get,W8=RegExp.prototype,swe=TypeError;rwe&&nwe&&awe(W8,"sticky",{configurable:!0,get:function(){if(this!==W8){if(iwe(this)==="RegExp")return!!owe(this).sticky;throw new swe("Incompatible receiver, RegExp required")}}})});var X8=_(()=>{"use strict";u();l();Zy();var uwe=q(),Y8=we(),lwe=Ne(),Q8=xe(),dwe=Ce(),cwe=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},e.test("abc")===!0&&t}(),fwe=/./.test;uwe({target:"RegExp",proto:!0,forced:!cwe},{test:function(t){var e=Q8(this),r=dwe(t),n=e.exec;if(!lwe(n))return Y8(fwe,e,r);var i=Y8(n,e,r);return i===null?!1:(Q8(i),!0)}})});var e5=_(()=>{"use strict";u();l();var mwe=vs().PROPER,pwe=it(),gwe=xe(),Z8=Ce(),hwe=te(),ywe=kl(),iR="toString",vwe=RegExp.prototype,J8=vwe[iR],bwe=hwe(function(){return J8.call({source:"a",flags:"b"})!=="/a/b"}),Swe=mwe&&J8.name!==iR;(bwe||Swe)&&pwe(RegExp.prototype,iR,function(){var e=gwe(this),r=Z8(e.source),n=Z8(ywe(e));return"/"+r+"/"+n},{unsafe:!0})});var t5=_(()=>{"use strict";u();l();var Iwe=Hc(),Twe=DE();Iwe("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Twe)});var r5=_(()=>{"use strict";u();l();t5()});var n5=_(()=>{"use strict";u();l();var kwe=q(),Ewe=ie(),_we=ct(),Rwe=Et(),Mwe=Ce(),Cwe=te(),wwe=Ewe("".charAt),xwe=Cwe(function(){return"\u{20BB7}".at(-2)!=="\uD842"});kwe({target:"String",proto:!0,forced:xwe},{at:function(e){var r=Mwe(_we(this)),n=r.length,i=Rwe(e),a=i>=0?i:n+i;return a<0||a>=n?void 0:wwe(r,a)}})});var mf=_((yft,o5)=>{"use strict";u();l();var aR=ie(),Awe=Et(),Pwe=Ce(),Owe=ct(),Lwe=aR("".charAt),i5=aR("".charCodeAt),Nwe=aR("".slice),a5=function(t){return function(e,r){var n=Pwe(Owe(e)),i=Awe(r),a=n.length,o,s;return i<0||i>=a?t?"":void 0:(o=i5(n,i),o<55296||o>56319||i+1===a||(s=i5(n,i+1))<56320||s>57343?t?Lwe(n,i):o:t?Nwe(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}};o5.exports={codeAt:a5(!1),charAt:a5(!0)}});var s5=_(()=>{"use strict";u();l();var Dwe=q(),qwe=mf().codeAt;Dwe({target:"String",proto:!0},{codePointAt:function(e){return qwe(this,e)}})});var Jy=_((Eft,u5)=>{"use strict";u();l();var Bwe=Tl(),Uwe=TypeError;u5.exports=function(t){if(Bwe(t))throw new Uwe("The method doesn't accept regular expressions");return t}});var ev=_((Mft,l5)=>{"use strict";u();l();var Fwe=qe(),Kwe=Fwe("match");l5.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Kwe]=!1,"/./"[t](e)}catch(n){}}return!1}});var p5=_(()=>{"use strict";u();l();var zwe=q(),f5=ua(),jwe=rr().f,Vwe=jr(),d5=Ce(),Hwe=Jy(),Gwe=ct(),Wwe=ev(),$we=bt(),c5=f5("".endsWith),Ywe=f5("".slice),Qwe=Math.min,m5=Wwe("endsWith"),Xwe=!$we&&!m5&&!!function(){var t=jwe(String.prototype,"endsWith");return t&&!t.writable}();zwe({target:"String",proto:!0,forced:!Xwe&&!m5},{endsWith:function(e){var r=d5(Gwe(this));Hwe(e);var n=arguments.length>1?arguments[1]:void 0,i=r.length,a=n===void 0?i:Qwe(Vwe(n),i),o=d5(e);return c5?c5(r,o,a):Ywe(r,a-o.length,a)===o}})});var y5=_(()=>{"use strict";u();l();var Zwe=q(),Jwe=ie(),exe=ai(),txe=RangeError,g5=String.fromCharCode,h5=String.fromCodePoint,rxe=Jwe([].join),nxe=!!h5&&h5.length!==1;Zwe({target:"String",stat:!0,arity:1,forced:nxe},{fromCodePoint:function(e){for(var r=[],n=arguments.length,i=0,a;n>i;){if(a=+arguments[i++],exe(a,1114111)!==a)throw new txe(a+" is not a valid code point");r[i]=a<65536?g5(a):g5(((a-=65536)>>10)+55296,a%1024+56320)}return rxe(r,"")}})});var b5=_(()=>{"use strict";u();l();var ixe=q(),axe=ie(),oxe=Jy(),sxe=ct(),v5=Ce(),uxe=ev(),lxe=axe("".indexOf);ixe({target:"String",proto:!0,forced:!uxe("includes")},{includes:function(e){return!!~lxe(v5(sxe(this)),v5(oxe(e)),arguments.length>1?arguments[1]:void 0)}})});var I5=_(()=>{"use strict";u();l();var dxe=q(),cxe=ie(),fxe=ct(),mxe=Ce(),S5=cxe("".charCodeAt);dxe({target:"String",proto:!0},{isWellFormed:function(){for(var e=mxe(fxe(this)),r=e.length,n=0;n=56320||++n>=r||(S5(e,n)&64512)!==56320))return!1}return!0}})});var oR=_(()=>{"use strict";u();l();var pxe=mf().charAt,gxe=Ce(),k5=Lt(),hxe=ay(),T5=il(),E5="String Iterator",yxe=k5.set,vxe=k5.getterFor(E5);hxe(String,"String",function(t){yxe(this,{type:E5,string:gxe(t),index:0})},function(){var e=vxe(this),r=e.string,n=e.index,i;return n>=r.length?T5(void 0,!0):(i=pxe(r,n),e.index+=i.length,T5(i,!1))})});var pf=_((Qft,w5)=>{"use strict";u();l();Zy();var _5=ua(),R5=it(),bxe=ff(),M5=te(),C5=qe(),Sxe=pr(),Ixe=C5("species"),sR=RegExp.prototype;w5.exports=function(t,e,r,n){var i=C5(t),a=!M5(function(){var c={};return c[i]=function(){return 7},""[t](c)!==7}),o=a&&!M5(function(){var c=!1,m=/a/;return t==="split"&&(m={},m.constructor={},m.constructor[Ixe]=function(){return m},m.flags="",m[i]=/./[i]),m.exec=function(){return c=!0,null},m[i](""),!c});if(!a||!o||r){var s=_5(/./[i]),d=e(i,""[t],function(c,m,f,p,y){var v=_5(c),b=m.exec;return b===bxe||b===sR.exec?a&&!y?{done:!0,value:s(m,f,p)}:{done:!0,value:v(f,m,p)}:{done:!1}});R5(String.prototype,t,d[0]),R5(sR,i,d[1])}n&&Sxe(sR[i],"sham",!0)}});var gf=_((Jft,x5)=>{"use strict";u();l();var Txe=mf().charAt;x5.exports=function(t,e,r){return e+(r?Txe(t,e).length:1)}});var Rl=_((rmt,P5)=>{"use strict";u();l();var A5=we(),kxe=xe(),Exe=Ne(),_xe=mr(),Rxe=ff(),Mxe=TypeError;P5.exports=function(t,e){var r=t.exec;if(Exe(r)){var n=A5(r,t,e);return n!==null&&kxe(n),n}if(_xe(t)==="RegExp")return A5(Rxe,t,e);throw new Mxe("RegExp#exec called on incompatible receiver")}});var L5=_(()=>{"use strict";u();l();var Cxe=we(),wxe=pf(),xxe=xe(),Axe=Cr(),Pxe=jr(),uR=Ce(),Oxe=ct(),Lxe=Ai(),Nxe=gf(),O5=Rl();wxe("match",function(t,e,r){return[function(i){var a=Oxe(this),o=Axe(i)?void 0:Lxe(i,t);return o?Cxe(o,i,a):new RegExp(i)[t](uR(a))},function(n){var i=xxe(this),a=uR(n),o=r(e,i,a);if(o.done)return o.value;if(!i.global)return O5(i,a);var s=i.unicode;i.lastIndex=0;for(var d=[],c=0,m;(m=O5(i,a))!==null;){var f=uR(m[0]);d[c]=f,f===""&&(i.lastIndex=Nxe(a,Pxe(i.lastIndex),s)),c++}return c===0?null:d}]})});var V5=_(()=>{"use strict";u();l();var Dxe=q(),N5=we(),B5=ua(),qxe=ry(),tv=il(),D5=ct(),U5=jr(),hf=Ce(),Bxe=xe(),Uxe=Cr(),Fxe=mr(),Kxe=Tl(),F5=kl(),zxe=Ai(),jxe=it(),Vxe=te(),Hxe=qe(),Gxe=ws(),Wxe=gf(),$xe=Rl(),K5=Lt(),dR=bt(),rv=Hxe("matchAll"),z5="RegExp String",j5=z5+" Iterator",Yxe=K5.set,Qxe=K5.getterFor(j5),q5=RegExp.prototype,Xxe=TypeError,cR=B5("".indexOf),nv=B5("".matchAll),lR=!!nv&&!Vxe(function(){nv("a",/./)}),Zxe=qxe(function(e,r,n,i){Yxe(this,{type:j5,regexp:e,string:r,global:n,unicode:i,done:!1})},z5,function(){var e=Qxe(this);if(e.done)return tv(void 0,!0);var r=e.regexp,n=e.string,i=$xe(r,n);return i===null?(e.done=!0,tv(void 0,!0)):e.global?(hf(i[0])===""&&(r.lastIndex=Wxe(n,U5(r.lastIndex),e.unicode)),tv(i,!1)):(e.done=!0,tv(i,!1))}),fR=function(t){var e=Bxe(this),r=hf(t),n=Gxe(e,RegExp),i=hf(F5(e)),a,o,s;return a=new n(n===RegExp?e.source:e,i),o=!!~cR(i,"g"),s=!!~cR(i,"u"),a.lastIndex=U5(e.lastIndex),new Zxe(a,r,o,s)};Dxe({target:"String",proto:!0,forced:lR},{matchAll:function(e){var r=D5(this),n,i,a,o;if(Uxe(e)){if(lR)return nv(r,e)}else{if(Kxe(e)&&(n=hf(D5(F5(e))),!~cR(n,"g")))throw new Xxe("`.matchAll` does not allow non-global regexes");if(lR)return nv(r,e);if(a=zxe(e,rv),a===void 0&&dR&&Fxe(e)==="RegExp"&&(a=fR),a)return N5(a,e,r)}return i=hf(r),o=new RegExp(e,"g"),dR?N5(fR,o,i):o[rv](i)}});dR||rv in q5||jxe(q5,rv,fR)});var mR=_((mmt,H5)=>{"use strict";u();l();var Jxe=wi();H5.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Jxe)});var G5=_(()=>{"use strict";u();l();var eAe=q(),tAe=_y().end,rAe=mR();eAe({target:"String",proto:!0,forced:rAe},{padEnd:function(e){return tAe(this,e,arguments.length>1?arguments[1]:void 0)}})});var W5=_(()=>{"use strict";u();l();var nAe=q(),iAe=_y().start,aAe=mR();nAe({target:"String",proto:!0,forced:aAe},{padStart:function(e){return iAe(this,e,arguments.length>1?arguments[1]:void 0)}})});var X5=_(()=>{"use strict";u();l();var oAe=q(),Q5=ie(),sAe=Bt(),uAe=Ve(),$5=Ce(),lAe=Ge(),Y5=Q5([].push),dAe=Q5([].join);oAe({target:"String",stat:!0},{raw:function(e){var r=sAe(uAe(e).raw),n=lAe(r);if(!n)return"";for(var i=arguments.length,a=[],o=0;;){if(Y5(a,$5(r[o++])),o===n)return dAe(a,"");o{"use strict";u();l();var cAe=q(),fAe=jc();cAe({target:"String",proto:!0},{repeat:fAe})});var yR=_((Pmt,J5)=>{"use strict";u();l();var hR=ie(),mAe=Ve(),pAe=Math.floor,pR=hR("".charAt),gAe=hR("".replace),gR=hR("".slice),hAe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,yAe=/\$([$&'`]|\d{1,2})/g;J5.exports=function(t,e,r,n,i,a){var o=r+t.length,s=n.length,d=yAe;return i!==void 0&&(i=mAe(i),d=hAe),gAe(a,d,function(c,m){var f;switch(pR(m,0)){case"$":return"$";case"&":return t;case"`":return gR(e,0,r);case"'":return gR(e,o);case"<":f=i[gR(m,1,-1)];break;default:var p=+m;if(p===0)return c;if(p>s){var y=pAe(p/10);return y===0?c:y<=s?n[y-1]===void 0?pR(m,1):n[y-1]+pR(m,1):c}f=n[p-1]}return f===void 0?"":f})}});var iG=_(()=>{"use strict";u();l();var vAe=mn(),eG=we(),iv=ie(),bAe=pf(),SAe=te(),IAe=xe(),TAe=Ne(),kAe=Cr(),EAe=Et(),_Ae=jr(),Ml=Ce(),RAe=ct(),MAe=gf(),CAe=Ai(),wAe=yR(),xAe=Rl(),AAe=qe(),bR=AAe("replace"),PAe=Math.max,OAe=Math.min,LAe=iv([].concat),vR=iv([].push),tG=iv("".indexOf),rG=iv("".slice),NAe=function(t){return t===void 0?t:String(t)},DAe=function(){return"a".replace(/./,"$0")==="$0"}(),nG=function(){return/./[bR]?/./[bR]("a","$0")==="":!1}(),qAe=!SAe(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$")!=="7"});bAe("replace",function(t,e,r){var n=nG?"$":"$0";return[function(a,o){var s=RAe(this),d=kAe(a)?void 0:CAe(a,bR);return d?eG(d,a,s,o):eG(e,Ml(s),a,o)},function(i,a){var o=IAe(this),s=Ml(i);if(typeof a=="string"&&tG(a,n)===-1&&tG(a,"$<")===-1){var d=r(e,o,s,a);if(d.done)return d.value}var c=TAe(a);c||(a=Ml(a));var m=o.global,f;m&&(f=o.unicode,o.lastIndex=0);for(var p=[],y;y=xAe(o,s),!(y===null||(vR(p,y),!m));){var v=Ml(y[0]);v===""&&(o.lastIndex=MAe(s,_Ae(o.lastIndex),f))}for(var b="",T=0,S=0;S=T&&(b+=rG(s,T,E)+M,T=E+I.length)}return b+rG(s,T)}]},!qAe||!DAe||nG)});var lG=_(()=>{"use strict";u();l();var BAe=q(),UAe=we(),SR=ie(),aG=ct(),FAe=Ne(),KAe=Cr(),zAe=Tl(),Cl=Ce(),jAe=Ai(),VAe=kl(),HAe=yR(),GAe=qe(),WAe=bt(),$Ae=GAe("replace"),YAe=TypeError,uG=SR("".indexOf),QAe=SR("".replace),oG=SR("".slice),XAe=Math.max,sG=function(t,e,r){return r>t.length?-1:e===""?r:uG(t,e,r)};BAe({target:"String",proto:!0},{replaceAll:function(e,r){var n=aG(this),i,a,o,s,d,c,m,f,p,y=0,v=0,b="";if(!KAe(e)){if(i=zAe(e),i&&(a=Cl(aG(VAe(e))),!~uG(a,"g")))throw new YAe("`.replaceAll` does not allow non-global regexes");if(o=jAe(e,$Ae),o)return UAe(o,e,n,r);if(WAe&&i)return QAe(Cl(n),e,r)}for(s=Cl(n),d=Cl(e),c=FAe(r),c||(r=Cl(r)),m=d.length,f=XAe(1,m),y=sG(s,d,0);y!==-1;)p=c?Cl(r(d,y,s)):HAe(d,s,y,[],void 0,r),b+=oG(s,v,y)+p,v=y+m,y=sG(s,d,y+f);return v{"use strict";u();l();var ZAe=we(),JAe=pf(),ePe=xe(),tPe=Cr(),rPe=ct(),dG=a_(),cG=Ce(),nPe=Ai(),iPe=Rl();JAe("search",function(t,e,r){return[function(i){var a=rPe(this),o=tPe(i)?void 0:nPe(i,t);return o?ZAe(o,i,a):new RegExp(i)[t](cG(a))},function(n){var i=ePe(this),a=cG(n),o=r(e,i,a);if(o.done)return o.value;var s=i.lastIndex;dG(s,0)||(i.lastIndex=0);var d=iPe(i,a);return dG(i.lastIndex,s)||(i.lastIndex=s),d===null?-1:d.index}]})});var vG=_(()=>{"use strict";u();l();var aPe=mn(),yf=we(),TR=ie(),oPe=pf(),sPe=xe(),uPe=Cr(),lPe=Tl(),mG=ct(),dPe=ws(),cPe=gf(),fPe=jr(),IR=Ce(),mPe=Ai(),pG=Yu(),gG=Rl(),pPe=ff(),gPe=df(),hPe=te(),wl=gPe.UNSUPPORTED_Y,hG=4294967295,yPe=Math.min,yG=[].push,vPe=TR(/./.exec),xl=TR(yG),vf=TR("".slice),bPe=!hPe(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return r.length!==2||r[0]!=="a"||r[1]!=="b"});oPe("split",function(t,e,r){var n;return"abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length?n=function(i,a){var o=IR(mG(this)),s=a===void 0?hG:a>>>0;if(s===0)return[];if(i===void 0)return[o];if(!lPe(i))return yf(e,o,i,s);for(var d=[],c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),m=0,f=new RegExp(i.source,c+"g"),p,y,v;(p=yf(pPe,f,o))&&(y=f.lastIndex,!(y>m&&(xl(d,vf(o,m,p.index)),p.length>1&&p.index=s)));)f.lastIndex===p.index&&f.lastIndex++;return m===o.length?(v||!vPe(f,""))&&xl(d,""):xl(d,vf(o,m)),d.length>s?pG(d,0,s):d}:"0".split(void 0,0).length?n=function(i,a){return i===void 0&&a===0?[]:yf(e,this,i,a)}:n=e,[function(a,o){var s=mG(this),d=uPe(a)?void 0:mPe(a,t);return d?yf(d,a,s,o):yf(n,IR(s),a,o)},function(i,a){var o=sPe(this),s=IR(i),d=r(n,o,s,a,n!==e);if(d.done)return d.value;var c=dPe(o,RegExp),m=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(wl?"g":"y"),p=new c(wl?"^(?:"+o.source+")":o,f),y=a===void 0?hG:a>>>0;if(y===0)return[];if(s.length===0)return gG(p,s)===null?[s]:[];for(var v=0,b=0,T=[];b{"use strict";u();l();var SPe=q(),IG=ua(),IPe=rr().f,TPe=jr(),bG=Ce(),kPe=Jy(),EPe=ct(),_Pe=ev(),RPe=bt(),SG=IG("".startsWith),MPe=IG("".slice),CPe=Math.min,TG=_Pe("startsWith"),wPe=!RPe&&!TG&&!!function(){var t=IPe(String.prototype,"startsWith");return t&&!t.writable}();SPe({target:"String",proto:!0,forced:!wPe&&!TG},{startsWith:function(e){var r=bG(EPe(this));kPe(e);var n=TPe(CPe(arguments.length>1?arguments[1]:void 0,r.length)),i=bG(e);return SG?SG(r,i,n):MPe(r,n,n+i.length)===i}})});var _G=_(()=>{"use strict";u();l();var xPe=q(),APe=ie(),PPe=ct(),EG=Et(),OPe=Ce(),LPe=APe("".slice),NPe=Math.max,DPe=Math.min,qPe=!"".substr||"ab".substr(-1)!=="b";xPe({target:"String",proto:!0,forced:qPe},{substr:function(e,r){var n=OPe(PPe(this)),i=n.length,a=EG(e),o,s;return a===1/0&&(a=0),a<0&&(a=NPe(i+a,0)),o=r===void 0?i:EG(r),o<=0||o===1/0?"":(s=DPe(a+o,i),a>=s?"":LPe(n,a,s))}})});var wG=_(()=>{"use strict";u();l();var BPe=q(),CG=we(),_R=ie(),UPe=ct(),FPe=Ce(),KPe=te(),zPe=Array,kR=_R("".charAt),RG=_R("".charCodeAt),jPe=_R([].join),ER="".toWellFormed,VPe="\uFFFD",MG=ER&&KPe(function(){return CG(ER,1)!=="1"});BPe({target:"String",proto:!0,forced:MG},{toWellFormed:function(){var e=FPe(UPe(this));if(MG)return CG(ER,e);for(var r=e.length,n=zPe(r),i=0;i=56320||i+1>=r||(RG(e,i+1)&64512)!==56320?n[i]=VPe:(n[i]=kR(e,i),n[++i]=kR(e,i))}return jPe(n,"")}})});var av=_((lpt,PG)=>{"use strict";u();l();var HPe=vs().PROPER,GPe=te(),xG=Xc(),AG="\u200B\x85\u180E";PG.exports=function(t){return GPe(function(){return!!xG[t]()||AG[t]()!==AG||HPe&&xG[t].name!==t})}});var OG=_(()=>{"use strict";u();l();var WPe=q(),$Pe=Ps().trim,YPe=av();WPe({target:"String",proto:!0,forced:YPe("trim")},{trim:function(){return $Pe(this)}})});var RR=_((hpt,LG)=>{"use strict";u();l();var QPe=Ps().end,XPe=av();LG.exports=XPe("trimEnd")?function(){return QPe(this)}:"".trimEnd});var DG=_(()=>{"use strict";u();l();var ZPe=q(),NG=RR();ZPe({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==NG},{trimRight:NG})});var BG=_(()=>{"use strict";u();l();DG();var JPe=q(),qG=RR();JPe({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==qG},{trimEnd:qG})});var MR=_((Mpt,UG)=>{"use strict";u();l();var e0e=Ps().start,t0e=av();UG.exports=t0e("trimStart")?function(){return e0e(this)}:"".trimStart});var KG=_(()=>{"use strict";u();l();var r0e=q(),FG=MR();r0e({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==FG},{trimLeft:FG})});var jG=_(()=>{"use strict";u();l();KG();var n0e=q(),zG=MR();n0e({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==zG},{trimStart:zG})});var $r=_((Bpt,HG)=>{"use strict";u();l();var i0e=ie(),a0e=ct(),VG=Ce(),o0e=/"/g,s0e=i0e("".replace);HG.exports=function(t,e,r,n){var i=VG(a0e(t)),a="<"+e;return r!==""&&(a+=" "+r+'="'+s0e(VG(n),o0e,""")+'"'),a+">"+i+""}});var Yr=_((Kpt,GG)=>{"use strict";u();l();var u0e=te();GG.exports=function(t){return u0e(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})}});var WG=_(()=>{"use strict";u();l();var l0e=q(),d0e=$r(),c0e=Yr();l0e({target:"String",proto:!0,forced:c0e("anchor")},{anchor:function(e){return d0e(this,"a","name",e)}})});var $G=_(()=>{"use strict";u();l();var f0e=q(),m0e=$r(),p0e=Yr();f0e({target:"String",proto:!0,forced:p0e("big")},{big:function(){return m0e(this,"big","","")}})});var YG=_(()=>{"use strict";u();l();var g0e=q(),h0e=$r(),y0e=Yr();g0e({target:"String",proto:!0,forced:y0e("blink")},{blink:function(){return h0e(this,"blink","","")}})});var QG=_(()=>{"use strict";u();l();var v0e=q(),b0e=$r(),S0e=Yr();v0e({target:"String",proto:!0,forced:S0e("bold")},{bold:function(){return b0e(this,"b","","")}})});var XG=_(()=>{"use strict";u();l();var I0e=q(),T0e=$r(),k0e=Yr();I0e({target:"String",proto:!0,forced:k0e("fixed")},{fixed:function(){return T0e(this,"tt","","")}})});var ZG=_(()=>{"use strict";u();l();var E0e=q(),_0e=$r(),R0e=Yr();E0e({target:"String",proto:!0,forced:R0e("fontcolor")},{fontcolor:function(e){return _0e(this,"font","color",e)}})});var JG=_(()=>{"use strict";u();l();var M0e=q(),C0e=$r(),w0e=Yr();M0e({target:"String",proto:!0,forced:w0e("fontsize")},{fontsize:function(e){return C0e(this,"font","size",e)}})});var eW=_(()=>{"use strict";u();l();var x0e=q(),A0e=$r(),P0e=Yr();x0e({target:"String",proto:!0,forced:P0e("italics")},{italics:function(){return A0e(this,"i","","")}})});var tW=_(()=>{"use strict";u();l();var O0e=q(),L0e=$r(),N0e=Yr();O0e({target:"String",proto:!0,forced:N0e("link")},{link:function(e){return L0e(this,"a","href",e)}})});var rW=_(()=>{"use strict";u();l();var D0e=q(),q0e=$r(),B0e=Yr();D0e({target:"String",proto:!0,forced:B0e("small")},{small:function(){return q0e(this,"small","","")}})});var nW=_(()=>{"use strict";u();l();var U0e=q(),F0e=$r(),K0e=Yr();U0e({target:"String",proto:!0,forced:K0e("strike")},{strike:function(){return F0e(this,"strike","","")}})});var iW=_(()=>{"use strict";u();l();var z0e=q(),j0e=$r(),V0e=Yr();z0e({target:"String",proto:!0,forced:V0e("sub")},{sub:function(){return j0e(this,"sub","","")}})});var aW=_(()=>{"use strict";u();l();var H0e=q(),G0e=$r(),W0e=Yr();H0e({target:"String",proto:!0,forced:W0e("sup")},{sup:function(){return G0e(this,"sup","","")}})});var ov=_((zgt,sW)=>{"use strict";u();l();var oW=pe(),CR=te(),$0e=Nc(),Y0e=Pe().NATIVE_ARRAY_BUFFER_VIEWS,Q0e=oW.ArrayBuffer,Bs=oW.Int8Array;sW.exports=!Y0e||!CR(function(){Bs(1)})||!CR(function(){new Bs(-1)})||!$0e(function(t){new Bs,new Bs(null),new Bs(1.5),new Bs(t)},!0)||CR(function(){return new Bs(new Q0e(2),1,void 0).length!==1})});var lW=_((Hgt,uW)=>{"use strict";u();l();var X0e=Et(),Z0e=RangeError;uW.exports=function(t){var e=X0e(t);if(e<0)throw new Z0e("The argument can't be less than 0");return e}});var wR=_(($gt,dW)=>{"use strict";u();l();var J0e=lW(),eOe=RangeError;dW.exports=function(t,e){var r=J0e(t);if(r%e)throw new eOe("Wrong offset");return r}});var fW=_((Xgt,cW)=>{"use strict";u();l();var tOe=Math.round;cW.exports=function(t){var e=tOe(t);return e<0?0:e>255?255:e&255}});var xR=_((eht,mW)=>{"use strict";u();l();var rOe=oi();mW.exports=function(t){var e=rOe(t);return e==="BigInt64Array"||e==="BigUint64Array"}});var sv=_((nht,pW)=>{"use strict";u();l();var nOe=yc(),iOe=TypeError;pW.exports=function(t){var e=nOe(t,"number");if(typeof e=="number")throw new iOe("Can't convert number to bigint");return BigInt(e)}});var AR=_((oht,gW)=>{"use strict";u();l();var aOe=xn(),oOe=we(),sOe=Ey(),uOe=Ve(),lOe=Ge(),dOe=Pc(),cOe=tl(),fOe=Xh(),mOe=xR(),pOe=Pe().aTypedArrayConstructor,gOe=sv();gW.exports=function(e){var r=sOe(this),n=uOe(e),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0,s=cOe(n),d,c,m,f,p,y,v,b;if(s&&!fOe(s))for(v=dOe(n,s),b=v.next,n=[];!(y=oOe(b,v)).done;)n.push(y.value);for(o&&i>2&&(a=aOe(a,arguments[2])),c=lOe(n),m=new(pOe(r))(c),f=mOe(m),d=0;c>d;d++)p=o?a(n[d],d):n[d],m[d]=f?gOe(p):+p;return m}});var Fi=_((lht,BR)=>{"use strict";u();l();var hW=q(),MW=pe(),yW=we(),hOe=ke(),yOe=ov(),Al=Pe(),CW=zc(),vW=ui(),vOe=cn(),bf=pr(),bOe=Ly(),SOe=jr(),bW=nE(),PR=wR(),IOe=fW(),wW=Pi(),Sf=Fe(),TOe=oi(),NR=De(),kOe=eo(),EOe=Vr(),_Oe=fn(),uv=si(),ROe=sa().f,SW=AR(),MOe=Yt().forEach,COe=Ms(),wOe=$t(),xW=mt(),AW=rr(),UR=Lt(),xOe=Es(),DR=UR.get,AOe=UR.set,POe=UR.enforce,PW=xW.f,OOe=AW.f,OR=MW.RangeError,OW=CW.ArrayBuffer,LOe=OW.prototype,NOe=CW.DataView,lv=Al.NATIVE_ARRAY_BUFFER_VIEWS,IW=Al.TYPED_ARRAY_TAG,TW=Al.TypedArray,If=Al.TypedArrayPrototype,DOe=Al.aTypedArrayConstructor,qR=Al.isTypedArray,dv="BYTES_PER_ELEMENT",LR="Wrong length",kW=function(t,e){DOe(t);for(var r=0,n=e.length,i=new t(n);n>r;)i[r]=e[r++];return i},cv=function(t,e){wOe(t,e,{configurable:!0,get:function(){return DR(this)[e]}})},EW=function(t){var e;return _Oe(LOe,t)||(e=TOe(t))==="ArrayBuffer"||e==="SharedArrayBuffer"},LW=function(t,e){return qR(t)&&!kOe(e)&&e in t&&bOe(+e)&&e>=0},_W=function(e,r){return r=wW(r),LW(e,r)?vOe(2,e[r]):OOe(e,r)},RW=function(e,r,n){return r=wW(r),LW(e,r)&&NR(n)&&Sf(n,"value")&&!Sf(n,"get")&&!Sf(n,"set")&&!n.configurable&&(!Sf(n,"writable")||n.writable)&&(!Sf(n,"enumerable")||n.enumerable)?(e[r]=n.value,e):PW(e,r,n)};hOe?(lv||(AW.f=_W,xW.f=RW,cv(If,"buffer"),cv(If,"byteOffset"),cv(If,"byteLength"),cv(If,"length")),hW({target:"Object",stat:!0,forced:!lv},{getOwnPropertyDescriptor:_W,defineProperty:RW}),BR.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,i=t+(r?"Clamped":"")+"Array",a="get"+t,o="set"+t,s=MW[i],d=s,c=d&&d.prototype,m={},f=function(b,T){var S=DR(b);return S.view[a](T*n+S.byteOffset,!0)},p=function(b,T,S){var I=DR(b);I.view[o](T*n+I.byteOffset,r?IOe(S):S,!0)},y=function(b,T){PW(b,T,{get:function(){return f(this,T)},set:function(S){return p(this,T,S)},enumerable:!0})};lv?yOe&&(d=e(function(b,T,S,I){return vW(b,c),xOe(function(){return NR(T)?EW(T)?I!==void 0?new s(T,PR(S,n),I):S!==void 0?new s(T,PR(S,n)):new s(T):qR(T)?kW(d,T):yW(SW,d,T):new s(bW(T))}(),b,d)}),uv&&uv(d,TW),MOe(ROe(s),function(b){b in d||bf(d,b,s[b])}),d.prototype=c):(d=e(function(b,T,S,I){vW(b,c);var E=0,R=0,M,C,A;if(!NR(T))A=bW(T),C=A*n,M=new OW(C);else if(EW(T)){M=T,R=PR(S,n);var x=T.byteLength;if(I===void 0){if(x%n)throw new OR(LR);if(C=x-R,C<0)throw new OR(LR)}else if(C=SOe(I)*n,C+R>x)throw new OR(LR);A=C/n}else return qR(T)?kW(d,T):yW(SW,d,T);for(AOe(b,{buffer:M,byteOffset:R,byteLength:C,length:A,view:new NOe(M)});E{"use strict";u();l();var qOe=Fi();qOe("Float32",function(t){return function(r,n,i){return t(this,r,n,i)}})});var DW=_(()=>{"use strict";u();l();var BOe=Fi();BOe("Float64",function(t){return function(r,n,i){return t(this,r,n,i)}})});var qW=_(()=>{"use strict";u();l();var UOe=Fi();UOe("Int8",function(t){return function(r,n,i){return t(this,r,n,i)}})});var BW=_(()=>{"use strict";u();l();var FOe=Fi();FOe("Int16",function(t){return function(r,n,i){return t(this,r,n,i)}})});var UW=_(()=>{"use strict";u();l();var KOe=Fi();KOe("Int32",function(t){return function(r,n,i){return t(this,r,n,i)}})});var FW=_(()=>{"use strict";u();l();var zOe=Fi();zOe("Uint8",function(t){return function(r,n,i){return t(this,r,n,i)}})});var KW=_(()=>{"use strict";u();l();var jOe=Fi();jOe("Uint8",function(t){return function(r,n,i){return t(this,r,n,i)}},!0)});var zW=_(()=>{"use strict";u();l();var VOe=Fi();VOe("Uint16",function(t){return function(r,n,i){return t(this,r,n,i)}})});var jW=_(()=>{"use strict";u();l();var HOe=Fi();HOe("Uint32",function(t){return function(r,n,i){return t(this,r,n,i)}})});var HW=_(()=>{"use strict";u();l();var VW=Pe(),GOe=Ge(),WOe=Et(),$Oe=VW.aTypedArray,YOe=VW.exportTypedArrayMethod;YOe("at",function(e){var r=$Oe(this),n=GOe(r),i=WOe(e),a=i>=0?i:n+i;return a<0||a>=n?void 0:r[a]})});var WW=_(()=>{"use strict";u();l();var QOe=ie(),GW=Pe(),XOe=Ok(),ZOe=QOe(XOe),JOe=GW.aTypedArray,eLe=GW.exportTypedArrayMethod;eLe("copyWithin",function(e,r){return ZOe(JOe(this),e,r,arguments.length>2?arguments[2]:void 0)})});var YW=_(()=>{"use strict";u();l();var $W=Pe(),tLe=Yt().every,rLe=$W.aTypedArray,nLe=$W.exportTypedArrayMethod;nLe("every",function(e){return tLe(rLe(this),e,arguments.length>1?arguments[1]:void 0)})});var XW=_(()=>{"use strict";u();l();var QW=Pe(),iLe=ty(),aLe=sv(),oLe=oi(),sLe=we(),uLe=ie(),lLe=te(),dLe=QW.aTypedArray,cLe=QW.exportTypedArrayMethod,fLe=uLe("".slice),mLe=lLe(function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),t!==1});cLe("fill",function(e){var r=arguments.length;dLe(this);var n=fLe(oLe(this),0,3)==="Big"?aLe(e):+e;return sLe(iLe,this,n,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)},mLe)});var Tf=_((dyt,JW)=>{"use strict";u();l();var ZW=Pe(),pLe=ws(),gLe=ZW.aTypedArrayConstructor,hLe=ZW.getTypedArrayConstructor;JW.exports=function(t){return gLe(pLe(t,hLe(t)))}});var t4=_((myt,e4)=>{"use strict";u();l();var yLe=dy(),vLe=Tf();e4.exports=function(t,e){return yLe(vLe(t),e)}});var n4=_(()=>{"use strict";u();l();var r4=Pe(),bLe=Yt().filter,SLe=t4(),ILe=r4.aTypedArray,TLe=r4.exportTypedArrayMethod;TLe("filter",function(e){var r=bLe(ILe(this),e,arguments.length>1?arguments[1]:void 0);return SLe(this,r)})});var a4=_(()=>{"use strict";u();l();var i4=Pe(),kLe=Yt().find,ELe=i4.aTypedArray,_Le=i4.exportTypedArrayMethod;_Le("find",function(e){return kLe(ELe(this),e,arguments.length>1?arguments[1]:void 0)})});var s4=_(()=>{"use strict";u();l();var o4=Pe(),RLe=Yt().findIndex,MLe=o4.aTypedArray,CLe=o4.exportTypedArrayMethod;CLe("findIndex",function(e){return RLe(MLe(this),e,arguments.length>1?arguments[1]:void 0)})});var l4=_(()=>{"use strict";u();l();var u4=Pe(),wLe=Lc().findLast,xLe=u4.aTypedArray,ALe=u4.exportTypedArrayMethod;ALe("findLast",function(e){return wLe(xLe(this),e,arguments.length>1?arguments[1]:void 0)})});var c4=_(()=>{"use strict";u();l();var d4=Pe(),PLe=Lc().findLastIndex,OLe=d4.aTypedArray,LLe=d4.exportTypedArrayMethod;LLe("findLastIndex",function(e){return PLe(OLe(this),e,arguments.length>1?arguments[1]:void 0)})});var m4=_(()=>{"use strict";u();l();var f4=Pe(),NLe=Yt().forEach,DLe=f4.aTypedArray,qLe=f4.exportTypedArrayMethod;qLe("forEach",function(e){NLe(DLe(this),e,arguments.length>1?arguments[1]:void 0)})});var p4=_(()=>{"use strict";u();l();var BLe=ov(),ULe=Pe().exportTypedArrayStaticMethod,FLe=AR();ULe("from",FLe,BLe)});var h4=_(()=>{"use strict";u();l();var g4=Pe(),KLe=Gu().includes,zLe=g4.aTypedArray,jLe=g4.exportTypedArrayMethod;jLe("includes",function(e){return KLe(zLe(this),e,arguments.length>1?arguments[1]:void 0)})});var v4=_(()=>{"use strict";u();l();var y4=Pe(),VLe=Gu().indexOf,HLe=y4.aTypedArray,GLe=y4.exportTypedArrayMethod;GLe("indexOf",function(e){return VLe(HLe(this),e,arguments.length>1?arguments[1]:void 0)})});var k4=_(()=>{"use strict";u();l();var WLe=pe(),$Le=te(),FR=ie(),S4=Pe(),KR=Bc(),YLe=qe(),zR=YLe("iterator"),b4=WLe.Uint8Array,QLe=FR(KR.values),XLe=FR(KR.keys),ZLe=FR(KR.entries),jR=S4.aTypedArray,fv=S4.exportTypedArrayMethod,Pl=b4&&b4.prototype,mv=!$Le(function(){Pl[zR].call([1])}),I4=!!Pl&&Pl.values&&Pl[zR]===Pl.values&&Pl.values.name==="values",T4=function(){return QLe(jR(this))};fv("entries",function(){return ZLe(jR(this))},mv);fv("keys",function(){return XLe(jR(this))},mv);fv("values",T4,mv||!I4,{name:"values"});fv(zR,T4,mv||!I4,{name:"values"})});var _4=_(()=>{"use strict";u();l();var E4=Pe(),JLe=ie(),eNe=E4.aTypedArray,tNe=E4.exportTypedArrayMethod,rNe=JLe([].join);tNe("join",function(e){return rNe(eNe(this),e)})});var M4=_(()=>{"use strict";u();l();var R4=Pe(),nNe=mn(),iNe=$k(),aNe=R4.aTypedArray,oNe=R4.exportTypedArrayMethod;oNe("lastIndexOf",function(e){var r=arguments.length;return nNe(iNe,aNe(this),r>1?[e,arguments[1]]:[e])})});var w4=_(()=>{"use strict";u();l();var C4=Pe(),sNe=Yt().map,uNe=Tf(),lNe=C4.aTypedArray,dNe=C4.exportTypedArrayMethod;dNe("map",function(e){return sNe(lNe(this),e,arguments.length>1?arguments[1]:void 0,function(r,n){return new(uNe(r))(n)})})});var A4=_(()=>{"use strict";u();l();var x4=Pe(),cNe=ov(),fNe=x4.aTypedArrayConstructor,mNe=x4.exportTypedArrayStaticMethod;mNe("of",function(){for(var e=0,r=arguments.length,n=new(fNe(this))(r);r>e;)n[e]=arguments[e++];return n},cNe)});var O4=_(()=>{"use strict";u();l();var P4=Pe(),pNe=Uc().left,gNe=P4.aTypedArray,hNe=P4.exportTypedArrayMethod;hNe("reduce",function(e){var r=arguments.length;return pNe(gNe(this),e,r,r>1?arguments[1]:void 0)})});var N4=_(()=>{"use strict";u();l();var L4=Pe(),yNe=Uc().right,vNe=L4.aTypedArray,bNe=L4.exportTypedArrayMethod;bNe("reduceRight",function(e){var r=arguments.length;return yNe(vNe(this),e,r,r>1?arguments[1]:void 0)})});var q4=_(()=>{"use strict";u();l();var D4=Pe(),SNe=D4.aTypedArray,INe=D4.exportTypedArrayMethod,TNe=Math.floor;INe("reverse",function(){for(var e=this,r=SNe(e).length,n=TNe(r/2),i=0,a;i{"use strict";u();l();var U4=pe(),F4=we(),GR=Pe(),kNe=Ge(),ENe=wR(),_Ne=Ve(),K4=te(),RNe=U4.RangeError,VR=U4.Int8Array,B4=VR&&VR.prototype,z4=B4&&B4.set,MNe=GR.aTypedArray,CNe=GR.exportTypedArrayMethod,HR=!K4(function(){var t=new Uint8ClampedArray(2);return F4(z4,t,{length:1,0:3},1),t[1]!==3}),wNe=HR&&GR.NATIVE_ARRAY_BUFFER_VIEWS&&K4(function(){var t=new VR(2);return t.set(1),t.set("2",1),t[0]!==0||t[1]!==2});CNe("set",function(e){MNe(this);var r=ENe(arguments.length>1?arguments[1]:void 0,1),n=_Ne(e);if(HR)return F4(z4,this,n,r);var i=this.length,a=kNe(n),o=0;if(a+r>i)throw new RNe("Wrong length");for(;o{"use strict";u();l();var V4=Pe(),xNe=Tf(),ANe=te(),PNe=no(),ONe=V4.aTypedArray,LNe=V4.exportTypedArrayMethod,NNe=ANe(function(){new Int8Array(1).slice()});LNe("slice",function(e,r){for(var n=PNe(ONe(this),e,r),i=xNe(this),a=0,o=n.length,s=new i(o);o>a;)s[a]=n[a++];return s},NNe)});var W4=_(()=>{"use strict";u();l();var G4=Pe(),DNe=Yt().some,qNe=G4.aTypedArray,BNe=G4.exportTypedArrayMethod;BNe("some",function(e){return DNe(qNe(this),e,arguments.length>1?arguments[1]:void 0)})});var J4=_(()=>{"use strict";u();l();var UNe=pe(),FNe=ua(),WR=te(),KNe=ft(),zNe=uy(),Z4=Pe(),$4=Xk(),jNe=Zk(),Y4=xi(),Q4=ly(),VNe=Z4.aTypedArray,HNe=Z4.exportTypedArrayMethod,kf=UNe.Uint16Array,Ol=kf&&FNe(kf.prototype.sort),GNe=!!Ol&&!(WR(function(){Ol(new kf(2),null)})&&WR(function(){Ol(new kf(2),{})})),X4=!!Ol&&!WR(function(){if(Y4)return Y4<74;if($4)return $4<67;if(jNe)return!0;if(Q4)return Q4<602;var t=new kf(516),e=Array(516),r,n;for(r=0;r<516;r++)n=r%4,t[r]=515-r,e[r]=r-2*n+3;for(Ol(t,function(i,a){return(i/4|0)-(a/4|0)}),r=0;r<516;r++)if(t[r]!==e[r])return!0}),WNe=function(t){return function(e,r){return t!==void 0?+t(e,r)||0:r!==r?-1:e!==e?1:e===0&&r===0?1/e>0&&1/r<0?1:-1:e>r}};HNe("sort",function(e){return e!==void 0&&KNe(e),X4?Ol(this,e):zNe(VNe(this),WNe(e))},!X4||GNe)});var r3=_(()=>{"use strict";u();l();var t3=Pe(),$Ne=jr(),e3=ai(),YNe=Tf(),QNe=t3.aTypedArray,XNe=t3.exportTypedArrayMethod;XNe("subarray",function(e,r){var n=QNe(this),i=n.length,a=e3(e,i),o=YNe(n);return new o(n.buffer,n.byteOffset+a*n.BYTES_PER_ELEMENT,$Ne((r===void 0?i:e3(r,i))-a))})});var s3=_(()=>{"use strict";u();l();var ZNe=pe(),JNe=mn(),a3=Pe(),$R=te(),n3=no(),pv=ZNe.Int8Array,i3=a3.aTypedArray,e1e=a3.exportTypedArrayMethod,o3=[].toLocaleString,t1e=!!pv&&$R(function(){o3.call(new pv(1))}),r1e=$R(function(){return[1,2].toLocaleString()!==new pv([1,2]).toLocaleString()})||!$R(function(){pv.prototype.toLocaleString.call([1,2])});e1e("toLocaleString",function(){return JNe(o3,t1e?n3(i3(this)):i3(this),n3(arguments))},r1e)});var u3=_(()=>{"use strict";u();l();var n1e=tE(),YR=Pe(),i1e=YR.aTypedArray,a1e=YR.exportTypedArrayMethod,o1e=YR.getTypedArrayConstructor;a1e("toReversed",function(){return n1e(i1e(this),o1e(this))})});var l3=_(()=>{"use strict";u();l();var gv=Pe(),s1e=ie(),u1e=ft(),l1e=dy(),d1e=gv.aTypedArray,c1e=gv.getTypedArrayConstructor,f1e=gv.exportTypedArrayMethod,m1e=s1e(gv.TypedArrayPrototype.sort);f1e("toSorted",function(e){e!==void 0&&u1e(e);var r=d1e(this),n=l1e(c1e(r),r);return m1e(n,e)})});var c3=_(()=>{"use strict";u();l();var p1e=Pe().exportTypedArrayMethod,g1e=te(),h1e=pe(),y1e=ie(),d3=h1e.Uint8Array,v1e=d3&&d3.prototype||{},hv=[].toString,b1e=y1e([].join);g1e(function(){hv.call({})})&&(hv=function(){return b1e(this)});var S1e=v1e.toString!==hv;p1e("toString",hv,S1e)});var f3=_(()=>{"use strict";u();l();var I1e=rE(),QR=Pe(),T1e=xR(),k1e=Et(),E1e=sv(),_1e=QR.aTypedArray,R1e=QR.getTypedArrayConstructor,M1e=QR.exportTypedArrayMethod,C1e=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return t===8}}();M1e("with",function(t,e){var r=_1e(this),n=k1e(t),i=T1e(r)?E1e(e):+e;return I1e(r,R1e(r),n,i)},!C1e)});var y3=_(()=>{"use strict";u();l();var w1e=q(),XR=ie(),x1e=Ce(),m3=String.fromCharCode,p3=XR("".charAt),g3=XR(/./.exec),h3=XR("".slice),A1e=/^[\da-f]{2}$/i,P1e=/^[\da-f]{4}$/i;w1e({global:!0},{unescape:function(e){for(var r=x1e(e),n="",i=r.length,a=0,o,s;a{"use strict";u();l();var O1e=ie(),v3=al(),yv=fo().getWeakData,L1e=ui(),N1e=xe(),D1e=Cr(),ZR=De(),q1e=pn(),S3=Yt(),b3=Fe(),I3=Lt(),B1e=I3.set,U1e=I3.getterFor,F1e=S3.find,K1e=S3.findIndex,z1e=O1e([].splice),j1e=0,vv=function(t){return t.frozen||(t.frozen=new T3)},T3=function(){this.entries=[]},JR=function(t,e){return F1e(t.entries,function(r){return r[0]===e})};T3.prototype={get:function(t){var e=JR(this,t);if(e)return e[1]},has:function(t){return!!JR(this,t)},set:function(t,e){var r=JR(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=K1e(this.entries,function(r){return r[0]===t});return~e&&z1e(this.entries,e,1),!!~e}};k3.exports={getConstructor:function(t,e,r,n){var i=t(function(d,c){L1e(d,a),B1e(d,{type:e,id:j1e++,frozen:void 0}),D1e(c)||q1e(c,d[n],{that:d,AS_ENTRIES:r})}),a=i.prototype,o=U1e(e),s=function(d,c,m){var f=o(d),p=yv(N1e(c),!0);return p===!0?vv(f).set(c,m):p[f.id]=m,d};return v3(a,{delete:function(d){var c=o(this);if(!ZR(d))return!1;var m=yv(d);return m===!0?vv(c).delete(d):m&&b3(m,c.id)&&delete m[c.id]},has:function(c){var m=o(this);if(!ZR(c))return!1;var f=yv(c);return f===!0?vv(m).has(c):f&&b3(f,m.id)}}),v3(a,r?{get:function(c){var m=o(this);if(ZR(c)){var f=yv(c);return f===!0?vv(m).get(c):f?f[m.id]:void 0}},set:function(c,m){return s(this,c,m)}}:{add:function(c){return s(this,c,!0)}}),i}}});var O3=_(()=>{"use strict";u();l();var V1e=As(),E3=pe(),Tv=ie(),_3=al(),H1e=fo(),G1e=Hc(),C3=eM(),bv=De(),Sv=Lt().enforce,W1e=te(),$1e=DT(),Rf=Object,Y1e=Array.isArray,Iv=Rf.isExtensible,w3=Rf.isFrozen,Q1e=Rf.isSealed,x3=Rf.freeze,X1e=Rf.seal,R3={},M3={},Z1e=!E3.ActiveXObject&&"ActiveXObject"in E3,Ef,A3=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},P3=G1e("WeakMap",A3,C3),Ll=P3.prototype,kv=Tv(Ll.set),J1e=function(){return V1e&&W1e(function(){var t=x3([]);return kv(new P3,t,1),!w3(t)})};$1e&&(Z1e?(Ef=C3.getConstructor(A3,"WeakMap",!0),H1e.enable(),tM=Tv(Ll.delete),_f=Tv(Ll.has),rM=Tv(Ll.get),_3(Ll,{delete:function(t){if(bv(t)&&!Iv(t)){var e=Sv(this);return e.frozen||(e.frozen=new Ef),tM(this,t)||e.frozen.delete(t)}return tM(this,t)},has:function(e){if(bv(e)&&!Iv(e)){var r=Sv(this);return r.frozen||(r.frozen=new Ef),_f(this,e)||r.frozen.has(e)}return _f(this,e)},get:function(e){if(bv(e)&&!Iv(e)){var r=Sv(this);return r.frozen||(r.frozen=new Ef),_f(this,e)?rM(this,e):r.frozen.get(e)}return rM(this,e)},set:function(e,r){if(bv(e)&&!Iv(e)){var n=Sv(this);n.frozen||(n.frozen=new Ef),_f(this,e)?kv(this,e,r):n.frozen.set(e,r)}else kv(this,e,r);return this}})):J1e()&&_3(Ll,{set:function(e,r){var n;return Y1e(e)&&(w3(e)?n=R3:Q1e(e)&&(n=M3)),kv(this,e,r),n===R3&&x3(e),n===M3&&X1e(e),this}}));var tM,_f,rM});var L3=_(()=>{"use strict";u();l();O3()});var N3=_(()=>{"use strict";u();l();var eDe=Hc(),tDe=eM();eDe("WeakSet",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},tDe)});var D3=_(()=>{"use strict";u();l();N3()});var nM=_((Ubt,K3)=>{"use strict";u();l();var F3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",q3=F3+"+/",B3=F3+"-_",U3=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};K3.exports={i2c:q3,c2i:U3(q3),i2cUrl:B3,c2iUrl:U3(B3)}});var $3=_(()=>{"use strict";u();l();var rDe=q(),nDe=pe(),V3=Xe(),iM=ie(),iDe=we(),Ev=te(),aDe=Ce(),oDe=On(),z3=nM().c2i,H3=/[^\d+/a-z]/i,sDe=/[\t\n\f\r ]+/g,uDe=/[=]{1,2}$/,Us=V3("atob"),lDe=String.fromCharCode,dDe=iM("".charAt),j3=iM("".replace),cDe=iM(H3.exec),Nl=!!Us&&!Ev(function(){return Us("aGk=")!=="hi"}),G3=Nl&&Ev(function(){return Us(" ")!==""}),W3=Nl&&!Ev(function(){Us("a")}),fDe=Nl&&!Ev(function(){Us()}),mDe=Nl&&Us.length!==1,pDe=!Nl||G3||W3||fDe||mDe;rDe({global:!0,bind:!0,enumerable:!0,forced:pDe},{atob:function(e){if(oDe(arguments.length,1),Nl&&!G3&&!W3)return iDe(Us,nDe,e);var r=j3(aDe(e),sDe,""),n="",i=0,a=0,o,s,d;if(r.length%4===0&&(r=j3(r,uDe,"")),o=r.length,o%4===1||cDe(H3,r))throw new(V3("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;i>(-2*a&6)));return n}})});var J3=_(()=>{"use strict";u();l();var gDe=q(),hDe=pe(),X3=Xe(),Z3=ie(),yDe=we(),aM=te(),Y3=Ce(),vDe=On(),bDe=nM().i2c,Dl=X3("btoa"),Q3=Z3("".charAt),SDe=Z3("".charCodeAt),Mf=!!Dl&&!aM(function(){return Dl("hi")!=="aGk="}),IDe=Mf&&!aM(function(){Dl()}),TDe=Mf&&aM(function(){return Dl(null)!=="bnVsbA=="}),kDe=Mf&&Dl.length!==1;gDe({global:!0,bind:!0,enumerable:!0,forced:!Mf||IDe||TDe||kDe},{btoa:function(e){if(vDe(arguments.length,1),Mf)return yDe(Dl,hDe,Y3(e));for(var r=Y3(e),n="",i=0,a=bDe,o,s;Q3(r,i)||(a="=",i%1);){if(s=SDe(r,i+=3/4),s>255)throw new(X3("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o=o<<8|s,n+=Q3(a,63&o>>8-i%1*8)}return n}})});var oM=_((Qbt,e6)=>{"use strict";u();l();e6.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var uM=_((Jbt,r6)=>{"use strict";u();l();var EDe=vc(),sM=EDe("span").classList,t6=sM&&sM.constructor&&sM.constructor.prototype;r6.exports=t6===Object.prototype?void 0:t6});var o6=_(()=>{"use strict";u();l();var n6=pe(),i6=oM(),_De=uM(),lM=qk(),RDe=pr(),a6=function(t){if(t&&t.forEach!==lM)try{RDe(t,"forEach",lM)}catch(e){t.forEach=lM}};for(_v in i6)i6[_v]&&a6(n6[_v]&&n6[_v].prototype);var _v;a6(_De)});var c6=_(()=>{"use strict";u();l();var s6=pe(),l6=oM(),MDe=uM(),Cf=Bc(),u6=pr(),CDe=xr(),wDe=qe(),dM=wDe("iterator"),cM=Cf.values,d6=function(t,e){if(t){if(t[dM]!==cM)try{u6(t,dM,cM)}catch(n){t[dM]=cM}if(CDe(t,e,!0),l6[e]){for(var r in Cf)if(t[r]!==Cf[r])try{u6(t,r,Cf[r])}catch(n){t[r]=Cf[r]}}}};for(Rv in l6)d6(s6[Rv]&&s6[Rv].prototype,Rv);var Rv;d6(MDe,"DOMTokenList")});var fM=_((dSt,f6)=>{"use strict";u();l();var xDe=Di();f6.exports=function(t){try{if(xDe)return Function('return require("'+t+'")')()}catch(e){}}});var mM=_((mSt,m6)=>{"use strict";u();l();m6.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}});var E6=_(()=>{"use strict";u();l();var ADe=q(),PDe=fM(),wv=Xe(),bM=te(),ODe=Vr(),SM=cn(),xv=mt().f,LDe=it(),Mv=$t(),Cv=Fe(),NDe=ui(),DDe=xe(),h6=kk(),p6=Ju(),ql=mM(),qDe=Wh(),y6=Lt(),IM=ke(),v6=bt(),Bl="DOMException",vM="DATA_CLONE_ERR",Pv=wv("Error"),ba=wv(Bl)||function(){try{var t=wv("MessageChannel")||PDe("worker_threads").MessageChannel;new t().port1.postMessage(new WeakMap)}catch(e){if(e.name===vM&&e.code===25)return e.constructor}}(),BDe=ba&&ba.prototype,b6=Pv.prototype,UDe=y6.set,FDe=y6.getterFor(Bl),KDe="stack"in new Pv(Bl),S6=function(t){return Cv(ql,t)&&ql[t].m?ql[t].c:0},TM=function(){NDe(this,xf);var e=arguments.length,r=p6(e<1?void 0:arguments[0]),n=p6(e<2?void 0:arguments[1],"Error"),i=S6(n);if(UDe(this,{type:Bl,name:n,message:r,code:i}),IM||(this.name=n,this.message=r,this.code=i),KDe){var a=new Pv(r);a.name=Bl,xv(this,"stack",SM(1,qDe(a.stack,1)))}},xf=TM.prototype=ODe(b6),I6=function(t){return{enumerable:!0,configurable:!0,get:t}},pM=function(t){return I6(function(){return FDe(this)[t]})};IM&&(Mv(xf,"code",pM("code")),Mv(xf,"message",pM("message")),Mv(xf,"name",pM("name")));xv(xf,"constructor",SM(1,TM));var Ov=bM(function(){return!(new ba instanceof Pv)}),T6=Ov||bM(function(){return b6.toString!==h6||String(new ba(1,2))!=="2: 1"}),k6=Ov||bM(function(){return new ba(1,"DataCloneError").code!==25}),zDe=Ov||ba[vM]!==25||BDe[vM]!==25,g6=v6?T6||k6||zDe:Ov;ADe({global:!0,constructor:!0,forced:g6},{DOMException:g6?TM:ba});var Af=wv(Bl),Av=Af.prototype;T6&&(v6||ba===Af)&&LDe(Av,"toString",h6);k6&&IM&&ba===Af&&Mv(Av,"code",I6(function(){return S6(DDe(this).name)}));for(gM in ql)Cv(ql,gM)&&(hM=ql[gM],wf=hM.s,yM=SM(6,hM.c),Cv(Af,wf)||xv(Af,wf,yM),Cv(Av,wf)||xv(Av,wf,yM));var hM,wf,yM,gM});var A6=_(()=>{"use strict";u();l();var jDe=q(),VDe=pe(),xM=Xe(),CM=cn(),wM=mt().f,_6=Fe(),HDe=ui(),GDe=Es(),R6=Ju(),kM=mM(),WDe=Wh(),$De=ke(),w6=bt(),Of="DOMException",x6=xM("Error"),Lf=xM(Of),AM=function(){HDe(this,YDe);var e=arguments.length,r=R6(e<1?void 0:arguments[0]),n=R6(e<2?void 0:arguments[1],"Error"),i=new Lf(r,n),a=new x6(r);return a.name=Of,wM(i,"stack",CM(1,WDe(a.stack,1))),GDe(i,this,AM),i},YDe=AM.prototype=Lf.prototype,QDe="stack"in new x6(Of),XDe="stack"in new Lf(1,2),EM=Lf&&$De&&Object.getOwnPropertyDescriptor(VDe,Of),ZDe=!!EM&&!(EM.writable&&EM.configurable),M6=QDe&&!ZDe&&!XDe;jDe({global:!0,constructor:!0,forced:w6||M6},{DOMException:M6?AM:Lf});var Pf=xM(Of),C6=Pf.prototype;if(C6.constructor!==Pf){w6||wM(C6,"constructor",CM(1,Pf));for(_M in kM)_6(kM,_M)&&(RM=kM[_M],MM=RM.s,_6(Pf,MM)||wM(Pf,MM,CM(6,RM.c)))}var RM,MM,_M});var O6=_(()=>{"use strict";u();l();var JDe=Xe(),eqe=xr(),P6="DOMException";eqe(JDe(P6),P6)});var N6=_(()=>{"use strict";u();l();var tqe=q(),rqe=pe(),L6=af().clear;tqe({global:!0,bind:!0,enumerable:!0,forced:rqe.clearImmediate!==L6},{clearImmediate:L6})});var q6=_((PSt,D6)=>{"use strict";u();l();D6.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"});var Lv=_((NSt,U6)=>{"use strict";u();l();var B6=pe(),nqe=mn(),iqe=Ne(),aqe=q6(),oqe=wi(),sqe=no(),uqe=On(),lqe=B6.Function,dqe=/MSIE .\./.test(oqe)||aqe&&function(){var t=B6.Bun.version.split(".");return t.length<3||t[0]==="0"&&(t[1]<3||t[1]==="3"&&t[2]==="0")}();U6.exports=function(t,e){var r=e?2:1;return dqe?function(n,i){var a=uqe(arguments.length,1)>r,o=iqe(n)?n:lqe(n),s=a?sqe(arguments,r):[],d=a?function(){nqe(o,this,s)}:o;return e?t(d,i):t(d)}:t}});var j6=_(()=>{"use strict";u();l();var cqe=q(),z6=pe(),F6=af().set,fqe=Lv(),K6=z6.setImmediate?fqe(F6,!1):F6;cqe({global:!0,bind:!0,enumerable:!0,forced:z6.setImmediate!==K6},{setImmediate:K6})});var V6=_(()=>{"use strict";u();l();N6();j6()});var H6=_(()=>{"use strict";u();l();var mqe=q(),pqe=pe(),gqe=__(),hqe=ft(),yqe=On(),vqe=Di(),bqe=pqe.process;mqe({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(e){yqe(arguments.length,1),hqe(e);var r=vqe&&bqe.domain;gqe(r?r.bind(e):e)}})});var W6=_(()=>{"use strict";u();l();var Sqe=q(),ho=pe(),Iqe=$t(),Tqe=ke(),kqe=TypeError,Eqe=Object.defineProperty,G6=ho.self!==ho;try{Tqe?(Nv=Object.getOwnPropertyDescriptor(ho,"self"),(G6||!Nv||!Nv.get||!Nv.enumerable)&&Iqe(ho,"self",{get:function(){return ho},set:function(e){if(this!==ho)throw new kqe("Illegal invocation");Eqe(ho,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):Sqe({global:!0,simple:!0,forced:G6},{self:ho})}catch(t){}var Nv});var OM=_((eIt,$6)=>{"use strict";u();l();var PM=ie(),Dv=Set.prototype;$6.exports={Set,add:PM(Dv.add),has:PM(Dv.has),remove:PM(Dv.delete),proto:Dv}});var Q6=_((nIt,Y6)=>{"use strict";u();l();var _qe=we();Y6.exports=function(t,e,r){for(var n=r?t:t.iterator,i=t.next,a,o;!(a=_qe(i,n)).done;)if(o=e(a.value),o!==void 0)return o}});var r7=_((oIt,t7)=>{"use strict";u();l();var X6=ie(),Rqe=Q6(),Z6=OM(),Mqe=Z6.Set,J6=Z6.proto,Cqe=X6(J6.forEach),e7=X6(J6.keys),wqe=e7(new Mqe).next;t7.exports=function(t,e,r){return r?Rqe({iterator:e7(t),next:wqe},e):Cqe(t,e)}});var NM=_((lIt,i7)=>{"use strict";u();l();var xqe=pe(),Aqe=te(),LM=xi(),Pqe=R_(),Oqe=Uy(),Lqe=Di(),n7=xqe.structuredClone;i7.exports=!!n7&&!Aqe(function(){if(Oqe&&LM>92||Lqe&&LM>94||Pqe&&LM>97)return!1;var t=new ArrayBuffer(8),e=n7(t,{transfer:[t]});return t.byteLength!==0||e.byteLength!==8})});var u7=_((fIt,s7)=>{"use strict";u();l();var UM=pe(),Nqe=fM(),Dqe=NM(),qqe=UM.structuredClone,a7=UM.ArrayBuffer,qv=UM.MessageChannel,BM=!1,DM,o7,Bv,qM;if(Dqe)BM=function(t){qqe(t,{transfer:[t]})};else if(a7)try{qv||(DM=Nqe("worker_threads"),DM&&(qv=DM.MessageChannel)),qv&&(o7=new qv,Bv=new a7(2),qM=function(t){o7.port1.postMessage(null,[t])},Bv.byteLength===2&&(qM(Bv),Bv.byteLength===0&&(BM=qM)))}catch(t){}s7.exports=BM});var b7=_(()=>{"use strict";u();l();var Bqe=bt(),Uqe=q(),ir=pe(),Df=Xe(),Bf=ie(),HM=te(),Fqe=ys(),Fl=Ne(),Kqe=Ss(),zqe=Cr(),jv=De(),jqe=eo(),Vqe=pn(),c7=xe(),Kv=oi(),Hqe=Fe(),Gqe=Oi(),FM=pr(),Uv=Ge(),Wqe=On(),$qe=kl(),Vv=qE(),GM=OM(),Yqe=r7(),l7=u7(),Qqe=vk(),WM=NM(),Nf=ir.Object,Xqe=ir.Array,f7=ir.Date,m7=ir.Error,Zqe=ir.TypeError,Jqe=ir.PerformanceMark,Fs=Df("DOMException"),jM=Vv.Map,$M=Vv.has,p7=Vv.get,zv=Vv.set,g7=GM.Set,h7=GM.add,eBe=GM.has,tBe=Df("Object","keys"),rBe=Bf([].push),nBe=Bf((!0).valueOf),iBe=Bf(1 .valueOf),aBe=Bf("".valueOf),oBe=Bf(f7.prototype.getTime),VM=Fqe("structuredClone"),qf="DataCloneError",Fv="Transferring",y7=function(t){return!HM(function(){var e=new ir.Set([7]),r=t(e),n=t(Nf(7));return r===e||!r.has(7)||!jv(n)||+n!=7})&&t},d7=function(t,e){return!HM(function(){var r=new e,n=t({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof e&&n.a.stack===r.stack)})},sBe=function(t){return!HM(function(){var e=t(new ir.AggregateError([1],VM,{cause:3}));return e.name!=="AggregateError"||e.errors[0]!==1||e.message!==VM||e.cause!==3})},Ul=ir.structuredClone,uBe=Bqe||!d7(Ul,m7)||!d7(Ul,Fs)||!sBe(Ul),lBe=!Ul&&y7(function(t){return new Jqe(VM,{detail:t}).detail}),Sa=y7(Ul)||lBe,KM=function(t){throw new Fs("Uncloneable type: "+t,qf)},Qr=function(t,e){throw new Fs((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",qf)},zM=function(t,e){return Sa||Qr(e),Sa(t)},dBe=function(){var t;try{t=new ir.DataTransfer}catch(e){try{t=new ir.ClipboardEvent("").clipboardData}catch(r){}}return t&&t.items&&t.files?t:null},v7=function(t,e,r){if($M(e,t))return p7(e,t);var n=r||Kv(t),i,a,o,s,d,c;if(n==="SharedArrayBuffer")Sa?i=Sa(t):i=t;else{var m=ir.DataView;!m&&!Fl(t.slice)&&Qr("ArrayBuffer");try{if(Fl(t.slice)&&!t.resizable)i=t.slice(0);else for(a=t.byteLength,o=("maxByteLength"in t)?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(a,o),s=new m(t),d=new m(i),c=0;c1&&!zqe(arguments[1])?c7(arguments[1]):void 0,n=r?r.transfer:void 0,i,a;n!==void 0&&(i=new jM,a=fBe(n,i));var o=nr(e,i);return a&&mBe(a),o}})});var T7=_(()=>{"use strict";u();l();var pBe=q(),I7=pe(),gBe=Lv(),S7=gBe(I7.setInterval,!0);pBe({global:!0,bind:!0,forced:I7.setInterval!==S7},{setInterval:S7})});var _7=_(()=>{"use strict";u();l();var hBe=q(),E7=pe(),yBe=Lv(),k7=yBe(E7.setTimeout,!0);hBe({global:!0,bind:!0,forced:E7.setTimeout!==k7},{setTimeout:k7})});var R7=_(()=>{"use strict";u();l();T7();_7()});var Hv=_((AIt,C7)=>{"use strict";u();l();var vBe=te(),bBe=qe(),SBe=ke(),M7=bt(),IBe=bBe("iterator");C7.exports=!vBe(function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach(function(i,a){e.delete("b"),n+=a+i}),r.delete("a",2),r.delete("b",void 0),M7&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(M7||!SBe)||!e.sort||t.href!=="http://a/c%20d?a=1&c=3"||e.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!e[IBe]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||n!=="a1c3"||new URL("http://x",void 0).host!=="x"})});var q7=_((LIt,D7)=>{"use strict";u();l();var Ks=ie(),YM=2147483647,Uf=36,O7=1,ZM=26,TBe=38,kBe=700,EBe=72,_Be=128,RBe="-",MBe=/[^\0-\u007E]/,L7=/[.\u3002\uFF0E\uFF61]/g,w7="Overflow: input needs wider integers to process",QM=Uf-O7,x7=RangeError,CBe=Ks(L7.exec),Kl=Math.floor,XM=String.fromCharCode,A7=Ks("".charCodeAt),N7=Ks([].join),yo=Ks([].push),wBe=Ks("".replace),xBe=Ks("".split),ABe=Ks("".toLowerCase),PBe=function(t){for(var e=[],r=0,n=t.length;r=55296&&i<=56319&&r>1,t+=Kl(t/e);t>QM*ZM>>1;)t=Kl(t/QM),n+=Uf;return Kl(n+(QM+1)*t/(t+TBe))},LBe=function(t){var e=[];t=PBe(t);var r=t.length,n=_Be,i=0,a=EBe,o,s;for(o=0;o=n&&sKl((YM-i)/f))throw new x7(w7);for(i+=(m-n)*f,n=m,o=0;oYM)throw new x7(w7);if(s===n){for(var p=i,y=Uf;;){var v=y<=a?O7:y>=a+ZM?ZM:y-a;if(p{"use strict";u();l();Bc();var nC=q(),Vl=pe(),Gv=we(),Ki=ie(),jl=ke(),Q7=Hv(),X7=it(),NBe=$t(),DBe=al(),qBe=xr(),BBe=ry(),aC=Lt(),Z7=ui(),JM=Ne(),UBe=Fe(),FBe=xn(),KBe=oi(),zBe=xe(),J7=De(),Or=Ce(),jBe=Vr(),B7=cn(),U7=Pc(),VBe=tl(),Wv=il(),zl=On(),HBe=qe(),GBe=uy(),WBe=HBe("iterator"),Gl="URLSearchParams",e$=Gl+"Iterator",t$=aC.set,Ln=aC.getterFor(Gl),$Be=aC.getterFor(e$),YBe=Object.getOwnPropertyDescriptor,oC=function(t){if(!jl)return Vl[t];var e=YBe(Vl,t);return e&&e.value},F7=oC("fetch"),Yv=oC("Request"),Ff=oC("Headers"),eC=Yv&&Yv.prototype,K7=Ff&&Ff.prototype,QBe=Vl.RegExp,XBe=Vl.TypeError,r$=Vl.decodeURIComponent,ZBe=Vl.encodeURIComponent,JBe=Ki("".charAt),z7=Ki([].join),zs=Ki([].push),iC=Ki("".replace),eUe=Ki([].shift),j7=Ki([].splice),V7=Ki("".split),tUe=Ki("".slice),rUe=/\+/g,H7=Array(4),nUe=function(t){return H7[t-1]||(H7[t-1]=QBe("((?:%[\\da-f]{2}){"+t+"})","gi"))},iUe=function(t){try{return r$(t)}catch(e){return t}},G7=function(t){var e=iC(t,rUe," "),r=4;try{return r$(e)}catch(n){for(;r;)e=iC(e,nUe(r--),iUe);return e}},aUe=/[!'()~]|%20/g,oUe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sUe=function(t){return oUe[t]},W7=function(t){return iC(ZBe(t),aUe,sUe)},tC=BBe(function(e,r){t$(this,{type:e$,target:Ln(e).entries,index:0,kind:r})},Gl,function(){var e=$Be(this),r=e.target,n=e.index++;if(!r||n>=r.length)return e.target=void 0,Wv(void 0,!0);var i=r[n];switch(e.kind){case"keys":return Wv(i.key,!1);case"values":return Wv(i.value,!1)}return Wv([i.key,i.value],!1)},!0),n$=function(t){this.entries=[],this.url=null,t!==void 0&&(J7(t)?this.parseObject(t):this.parseQuery(typeof t=="string"?JBe(t,0)==="?"?tUe(t,1):t:Or(t)))};n$.prototype={type:Gl,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e=this.entries,r=VBe(t),n,i,a,o,s,d,c;if(r)for(n=U7(t,r),i=n.next;!(a=Gv(i,n)).done;){if(o=U7(zBe(a.value)),s=o.next,(d=Gv(s,o)).done||(c=Gv(s,o)).done||!Gv(s,o).done)throw new XBe("Expected sequence with length 2");zs(e,{key:Or(d.value),value:Or(c.value)})}else for(var m in t)UBe(t,m)&&zs(e,{key:m,value:Or(t[m])})},parseQuery:function(t){if(t)for(var e=this.entries,r=V7(t,"&"),n=0,i,a;n0?arguments[0]:void 0,r=t$(this,new n$(e));jl||(this.size=r.entries.length)},Hl=Qv.prototype;DBe(Hl,{append:function(e,r){var n=Ln(this);zl(arguments.length,2),zs(n.entries,{key:Or(e),value:Or(r)}),jl||this.length++,n.updateURL()},delete:function(t){for(var e=Ln(this),r=zl(arguments.length,1),n=e.entries,i=Or(t),a=r<2?void 0:arguments[1],o=a===void 0?a:Or(a),s=0;sn.key?1:-1}),e.updateURL()},forEach:function(e){for(var r=Ln(this).entries,n=FBe(e,arguments.length>1?arguments[1]:void 0),i=0,a;i1?rC(arguments[1]):{})}}),JM(Yv)&&($v=function(e){return Z7(this,eC),new Yv(e,arguments.length>1?rC(arguments[1]):{})},eC.constructor=$v,$v.prototype=eC,nC({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:$v})));var $7,Y7,rC,$v;i$.exports={URLSearchParams:Qv,getState:Ln}});var T$=_(()=>{"use strict";u();l();oR();var uUe=q(),EC=ke(),lUe=Hv(),_C=pe(),a$=xn(),Un=ie(),tb=it(),Nn=$t(),dUe=ui(),IC=Fe(),RC=r_(),Wl=Bk(),di=Yu(),cUe=mf().codeAt,fUe=q7(),Ta=Ce(),mUe=xr(),pUe=On(),h$=sC(),y$=Lt(),gUe=y$.set,rb=y$.getterFor("URL"),hUe=h$.URLSearchParams,yUe=h$.getState,Kf=_C.URL,TC=_C.TypeError,nb=_C.parseInt,vUe=Math.floor,o$=Math.pow,Bn=Un("".charAt),ci=Un(/./.exec),jf=Un([].join),bUe=Un(1 .toString),SUe=Un([].pop),Yl=Un([].push),uC=Un("".replace),IUe=Un([].shift),TUe=Un("".split),Hf=Un("".slice),ib=Un("".toLowerCase),kUe=Un([].unshift),EUe="Invalid authority",lC="Invalid scheme",js="Invalid host",s$="Invalid port",v$=/[a-z]/i,_Ue=/[\d+-.a-z]/i,kC=/\d/,RUe=/^0x/i,MUe=/^[0-7]+$/,CUe=/^\d+$/,b$=/^[\da-f]+$/i,wUe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,xUe=/[\0\t\n\r #/:<>?@[\\\]^|]/,AUe=/^[\u0000-\u0020]+/,PUe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,OUe=/[\t\n\r]/g,Dn,LUe=function(t){var e=TUe(t,"."),r,n,i,a,o,s,d;if(e.length&&e[e.length-1]===""&&e.length--,r=e.length,r>4)return t;for(n=[],i=0;i1&&Bn(a,0)==="0"&&(o=ci(RUe,a)?16:8,a=Hf(a,o===8?1:2)),a==="")s=0;else{if(!ci(o===10?CUe:o===8?MUe:b$,a))return t;s=nb(a,o)}Yl(n,s)}for(i=0;i=o$(256,5-r))return null}else if(s>255)return null;for(d=SUe(n),i=0;i6))return;for(s=0;p();){if(d=null,s>0)if(p()==="."&&s<4)i++;else return;if(!ci(kC,p()))return;for(;ci(kC,p());){if(c=nb(p(),10),d===null)d=c;else{if(d===0)return;d=d*10+c}if(d>255)return;i++}e[r]=e[r]*256+d,s++,(s===2||s===4)&&r++}if(s!==4)return;break}else if(p()===":"){if(i++,!p())return}else if(p())return;e[r++]=a}if(n!==null)for(m=r-n,r=7;r!==0&&m>0;)f=e[r],e[r--]=e[n+m-1],e[n+--m]=f;else if(r!==8)return;return e},DUe=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)t[a]!==0?(i>r&&(e=n,r=i),n=null,i=0):(n===null&&(n=a),++i);return i>r&&(e=n,r=i),e},zf=function(t){var e,r,n,i;if(typeof t=="number"){for(e=[],r=0;r<4;r++)kUe(e,t%256),t=vUe(t/256);return jf(e,".")}else if(typeof t=="object"){for(e="",n=DUe(t),r=0;r<8;r++)i&&t[r]===0||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=bUe(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},eb={},S$=RC({},eb,{" ":1,'"':1,"<":1,">":1,"`":1}),I$=RC({},S$,{"#":1,"?":1,"{":1,"}":1}),dC=RC({},I$,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),vo=function(t,e){var r=cUe(t,0);return r>32&&r<127&&!IC(e,t)?t:encodeURIComponent(t)},Xv={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Vf=function(t,e){var r;return t.length===2&&ci(v$,Bn(t,0))&&((r=Bn(t,1))===":"||!e&&r==="|")},u$=function(t){var e;return t.length>1&&Vf(Hf(t,0,2))&&(t.length===2||(e=Bn(t,2))==="/"||e==="\\"||e==="?"||e==="#")},qUe=function(t){return t==="."||ib(t)==="%2e"},BUe=function(t){return t=ib(t),t===".."||t==="%2e."||t===".%2e"||t==="%2e%2e"},cC={},l$={},fC={},d$={},c$={},mC={},f$={},m$={},Zv={},Jv={},pC={},gC={},hC={},yC={},p$={},vC={},$l={},zi={},g$={},Vs={},Ia={},MC=function(t,e,r){var n=Ta(t),i,a,o;if(e){if(a=this.parse(n),a)throw new TC(a);this.searchParams=null}else{if(r!==void 0&&(i=new MC(r,!0)),a=this.parse(n,null,i),a)throw new TC(a);o=yUe(new hUe),o.bindURL(this),this.searchParams=o}};MC.prototype={type:"URL",parse:function(t,e,r){var n=this,i=e||cC,a=0,o="",s=!1,d=!1,c=!1,m,f,p,y;for(t=Ta(t),e||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,t=uC(t,AUe,""),t=uC(t,PUe,"$1")),t=uC(t,OUe,""),m=Wl(t);a<=m.length;){switch(f=m[a],i){case cC:if(f&&ci(v$,f))o+=ib(f),i=l$;else{if(e)return lC;i=fC;continue}break;case l$:if(f&&(ci(_Ue,f)||f==="+"||f==="-"||f==="."))o+=ib(f);else if(f===":"){if(e&&(n.isSpecial()!==IC(Xv,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,e){n.isSpecial()&&Xv[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?i=yC:n.isSpecial()&&r&&r.scheme===n.scheme?i=d$:n.isSpecial()?i=m$:m[a+1]==="/"?(i=c$,a++):(n.cannotBeABaseURL=!0,Yl(n.path,""),i=g$)}else{if(e)return lC;o="",i=fC,a=0;continue}break;case fC:if(!r||r.cannotBeABaseURL&&f!=="#")return lC;if(r.cannotBeABaseURL&&f==="#"){n.scheme=r.scheme,n.path=di(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,i=Ia;break}i=r.scheme==="file"?yC:mC;continue;case d$:if(f==="/"&&m[a+1]==="/")i=Zv,a++;else{i=mC;continue}break;case c$:if(f==="/"){i=Jv;break}else{i=zi;continue}case mC:if(n.scheme=r.scheme,f===Dn)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=di(r.path),n.query=r.query;else if(f==="/"||f==="\\"&&n.isSpecial())i=f$;else if(f==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=di(r.path),n.query="",i=Vs;else if(f==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=di(r.path),n.query=r.query,n.fragment="",i=Ia;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=di(r.path),n.path.length--,i=zi;continue}break;case f$:if(n.isSpecial()&&(f==="/"||f==="\\"))i=Zv;else if(f==="/")i=Jv;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,i=zi;continue}break;case m$:if(i=Zv,f!=="/"||Bn(o,a+1)!=="/")continue;a++;break;case Zv:if(f!=="/"&&f!=="\\"){i=Jv;continue}break;case Jv:if(f==="@"){s&&(o="%40"+o),s=!0,p=Wl(o);for(var v=0;v65535)return s$;n.port=n.isSpecial()&&S===Xv[n.scheme]?null:S,o=""}if(e)return;i=$l;continue}else return s$;break;case yC:if(n.scheme="file",f==="/"||f==="\\")i=p$;else if(r&&r.scheme==="file")switch(f){case Dn:n.host=r.host,n.path=di(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=di(r.path),n.query="",i=Vs;break;case"#":n.host=r.host,n.path=di(r.path),n.query=r.query,n.fragment="",i=Ia;break;default:u$(jf(di(m,a),""))||(n.host=r.host,n.path=di(r.path),n.shortenPath()),i=zi;continue}else{i=zi;continue}break;case p$:if(f==="/"||f==="\\"){i=vC;break}r&&r.scheme==="file"&&!u$(jf(di(m,a),""))&&(Vf(r.path[0],!0)?Yl(n.path,r.path[0]):n.host=r.host),i=zi;continue;case vC:if(f===Dn||f==="/"||f==="\\"||f==="?"||f==="#"){if(!e&&Vf(o))i=zi;else if(o===""){if(n.host="",e)return;i=$l}else{if(y=n.parseHost(o),y)return y;if(n.host==="localhost"&&(n.host=""),e)return;o="",i=$l}continue}else o+=f;break;case $l:if(n.isSpecial()){if(i=zi,f!=="/"&&f!=="\\")continue}else if(!e&&f==="?")n.query="",i=Vs;else if(!e&&f==="#")n.fragment="",i=Ia;else if(f!==Dn&&(i=zi,f!=="/"))continue;break;case zi:if(f===Dn||f==="/"||f==="\\"&&n.isSpecial()||!e&&(f==="?"||f==="#")){if(BUe(o)?(n.shortenPath(),f!=="/"&&!(f==="\\"&&n.isSpecial())&&Yl(n.path,"")):qUe(o)?f!=="/"&&!(f==="\\"&&n.isSpecial())&&Yl(n.path,""):(n.scheme==="file"&&!n.path.length&&Vf(o)&&(n.host&&(n.host=""),o=Bn(o,0)+":"),Yl(n.path,o)),o="",n.scheme==="file"&&(f===Dn||f==="?"||f==="#"))for(;n.path.length>1&&n.path[0]==="";)IUe(n.path);f==="?"?(n.query="",i=Vs):f==="#"&&(n.fragment="",i=Ia)}else o+=vo(f,I$);break;case g$:f==="?"?(n.query="",i=Vs):f==="#"?(n.fragment="",i=Ia):f!==Dn&&(n.path[0]+=vo(f,eb));break;case Vs:!e&&f==="#"?(n.fragment="",i=Ia):f!==Dn&&(f==="'"&&n.isSpecial()?n.query+="%27":f==="#"?n.query+="%23":n.query+=vo(f,eb));break;case Ia:f!==Dn&&(n.fragment+=vo(f,S$));break}a++}},parseHost:function(t){var e,r,n;if(Bn(t,0)==="["){if(Bn(t,t.length-1)!=="]"||(e=NUe(Hf(t,1,-1)),!e))return js;this.host=e}else if(this.isSpecial()){if(t=fUe(t),ci(wUe,t)||(e=LUe(t),e===null))return js;this.host=e}else{if(ci(xUe,t))return js;for(e="",r=Wl(t),n=0;n1?arguments[1]:void 0,i=gUe(r,new MC(e,!1,n));EC||(r.href=i.serialize(),r.origin=i.getOrigin(),r.protocol=i.getProtocol(),r.username=i.getUsername(),r.password=i.getPassword(),r.host=i.getHost(),r.hostname=i.getHostname(),r.port=i.getPort(),r.pathname=i.getPathname(),r.search=i.getSearch(),r.searchParams=i.getSearchParams(),r.hash=i.getHash())},Lr=Ql.prototype,qn=function(t,e){return{get:function(){return rb(this)[t]()},set:e&&function(r){return rb(this)[e](r)},configurable:!0,enumerable:!0}};EC&&(Nn(Lr,"href",qn("serialize","setHref")),Nn(Lr,"origin",qn("getOrigin")),Nn(Lr,"protocol",qn("getProtocol","setProtocol")),Nn(Lr,"username",qn("getUsername","setUsername")),Nn(Lr,"password",qn("getPassword","setPassword")),Nn(Lr,"host",qn("getHost","setHost")),Nn(Lr,"hostname",qn("getHostname","setHostname")),Nn(Lr,"port",qn("getPort","setPort")),Nn(Lr,"pathname",qn("getPathname","setPathname")),Nn(Lr,"search",qn("getSearch","setSearch")),Nn(Lr,"searchParams",qn("getSearchParams")),Nn(Lr,"hash",qn("getHash","setHash")));tb(Lr,"toJSON",function(){return rb(this).serialize()},{enumerable:!0});tb(Lr,"toString",function(){return rb(this).serialize()},{enumerable:!0});Kf&&(bC=Kf.createObjectURL,SC=Kf.revokeObjectURL,bC&&tb(Ql,"createObjectURL",a$(bC,Kf)),SC&&tb(Ql,"revokeObjectURL",a$(SC,Kf)));var bC,SC;mUe(Ql,"URL");uUe({global:!0,constructor:!0,forced:!lUe,sham:!EC},{URL:Ql})});var k$=_(()=>{"use strict";u();l();T$()});var R$=_(()=>{"use strict";u();l();var UUe=q(),FUe=Xe(),KUe=te(),zUe=On(),E$=Ce(),jUe=Hv(),_$=FUe("URL"),VUe=jUe&&KUe(function(){_$.canParse()});UUe({target:"URL",stat:!0,forced:!VUe},{canParse:function(e){var r=zUe(arguments.length,1),n=E$(e),i=r<2||arguments[1]===void 0?void 0:E$(arguments[1]);try{return!!new _$(n,i)}catch(a){return!1}}})});var M$=_(()=>{"use strict";u();l();var HUe=q(),GUe=we();HUe({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return GUe(URL.prototype.toString,this)}})});var C$=_(()=>{"use strict";u();l();sC()});var P$=_(()=>{"use strict";u();l();var WUe=it(),ab=ie(),w$=Ce(),$Ue=On(),A$=URLSearchParams,ob=A$.prototype,YUe=ab(ob.append),x$=ab(ob.delete),QUe=ab(ob.forEach),XUe=ab([].push),CC=new A$("a=1&a=2&b=3");CC.delete("a",1);CC.delete("b",void 0);CC+""!="a=2"&&WUe(ob,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&r===void 0)return x$(this,t);var n=[];QUe(this,function(f,p){XUe(n,{key:p,value:f})}),$Ue(e,1);for(var i=w$(t),a=w$(r),o=0,s=0,d=!1,c=n.length,m;o{"use strict";u();l();var ZUe=it(),L$=ie(),JUe=Ce(),eFe=On(),N$=URLSearchParams,wC=N$.prototype,tFe=L$(wC.getAll),rFe=L$(wC.has),O$=new N$("a=1");(O$.has("a",2)||!O$.has("a",void 0))&&ZUe(wC,"has",function(e){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return rFe(this,e);var i=tFe(this,e);eFe(r,1);for(var a=JUe(n),o=0;o{"use strict";u();l();var nFe=ke(),iFe=ie(),aFe=$t(),xC=URLSearchParams.prototype,oFe=iFe(xC.forEach);nFe&&!("size"in xC)&&aFe(xC,"size",{get:function(){var e=0;return oFe(this,function(){e++}),e},configurable:!0,enumerable:!0})});var U$=_((vTt,B$)=>{"use strict";u();l();oq();mq();pq();gq();hq();yq();vq();bq();Sq();Iq();Tq();kq();Eq();_q();Rq();Zq();nB();SB();EB();RB();PB();DB();BB();KB();zB();VB();GB();YB();QB();JB();eU();nU();mU();pU();hU();yU();Bc();BU();zU();jU();HU();WU();ZU();eF();rF();aF();oF();TF();_F();RF();CF();PF();OF();LF();NF();DF();BF();hK();CK();qK();UK();FK();zK();HK();GK();r2();n2();u2();f2();p2();S2();k2();M2();C2();mk();w2();H2();W2();Q2();J2();tz();rz();nz();oz();uz();lz();cz();mz();gz();hz();yz();vz();Iz();Ez();_z();Rz();qz();Bz();Kz();jz();Vz();Hz();Gz();Wz();Jz();sj();fj();vj();Ij();Rj();Mj();xj();Pj();Lj();Nj();Kj();zj();jj();Gj();Wj();$j();Qj();Xj();Zj();eV();rV();iV();oV();uV();lV();dV();cV();yV();vV();bV();TV();kV();_V();MV();BH();UH();KH();HH();GH();WH();e8();n8();i8();u8();l8();d8();c8();f8();m8();p8();b8();I8();T8();B8();F8();Zy();G8();$8();X8();e5();r5();n5();s5();p5();y5();b5();I5();oR();L5();V5();G5();W5();X5();Z5();iG();lG();fG();vG();kG();_G();wG();OG();BG();jG();WG();$G();YG();QG();XG();ZG();JG();eW();tW();rW();nW();iW();aW();NW();DW();qW();BW();UW();FW();KW();zW();jW();HW();WW();YW();XW();n4();a4();s4();l4();c4();m4();p4();h4();v4();k4();_4();M4();w4();A4();O4();N4();q4();j4();H4();W4();J4();r3();s3();u3();l3();c3();f3();y3();L3();D3();$3();J3();o6();c6();E6();A6();O6();V6();H6();W6();b7();R7();k$();R$();M$();C$();P$();D$();q$();B$.exports=Uh()});var F$=_((ITt,PC)=>{u();l();var AC=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(N,B,U){N[B]=U.value},i,a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",d=a.toStringTag||"@@toStringTag";function c(N,B,U){return Object.defineProperty(N,B,{value:U,enumerable:!0,configurable:!0,writable:!0}),N[B]}try{c({},"")}catch(N){c=function(B,U,j){return B[U]=j}}function m(N,B,U,j){var Y=B&&B.prototype instanceof S?B:S,W=Object.create(Y.prototype),se=new L(j||[]);return n(W,"_invoke",{value:D(N,U,se)}),W}t.wrap=m;function f(N,B,U){try{return{type:"normal",arg:N.call(B,U)}}catch(j){return{type:"throw",arg:j}}}var p="suspendedStart",y="suspendedYield",v="executing",b="completed",T={};function S(){}function I(){}function E(){}var R={};c(R,o,function(){return this});var M=Object.getPrototypeOf,C=M&&M(M(V([])));C&&C!==e&&r.call(C,o)&&(R=C);var A=E.prototype=S.prototype=Object.create(R);I.prototype=E,n(A,"constructor",{value:E,configurable:!0}),n(E,"constructor",{value:I,configurable:!0}),I.displayName=c(E,d,"GeneratorFunction");function x(N){["next","throw","return"].forEach(function(B){c(N,B,function(U){return this._invoke(B,U)})})}t.isGeneratorFunction=function(N){var B=typeof N=="function"&&N.constructor;return B?B===I||(B.displayName||B.name)==="GeneratorFunction":!1},t.mark=function(N){return Object.setPrototypeOf?Object.setPrototypeOf(N,E):(N.__proto__=E,c(N,d,"GeneratorFunction")),N.prototype=Object.create(A),N},t.awrap=function(N){return{__await:N}};function O(N,B){function U(W,se,Z,$){var ue=f(N[W],N,se);if(ue.type==="throw")$(ue.arg);else{var Le=ue.arg,Re=Le.value;return Re&&typeof Re=="object"&&r.call(Re,"__await")?B.resolve(Re.__await).then(function(ne){U("next",ne,Z,$)},function(ne){U("throw",ne,Z,$)}):B.resolve(Re).then(function(ne){Le.value=ne,Z(Le)},function(ne){return U("throw",ne,Z,$)})}}var j;function Y(W,se){function Z(){return new B(function($,ue){U(W,se,$,ue)})}return j=j?j.then(Z,Z):Z()}n(this,"_invoke",{value:Y})}x(O.prototype),c(O.prototype,s,function(){return this}),t.AsyncIterator=O,t.async=function(N,B,U,j,Y){Y===void 0&&(Y=Promise);var W=new O(m(N,B,U,j),Y);return t.isGeneratorFunction(B)?W:W.next().then(function(se){return se.done?se.value:W.next()})};function D(N,B,U){var j=p;return function(W,se){if(j===v)throw new Error("Generator is already running");if(j===b){if(W==="throw")throw se;return z()}for(U.method=W,U.arg=se;;){var Z=U.delegate;if(Z){var $=F(Z,U);if($){if($===T)continue;return $}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(j===p)throw j=b,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);j=v;var ue=f(N,B,U);if(ue.type==="normal"){if(j=U.done?b:y,ue.arg===T)continue;return{value:ue.arg,done:U.done}}else ue.type==="throw"&&(j=b,U.method="throw",U.arg=ue.arg)}}}function F(N,B){var U=B.method,j=N.iterator[U];if(j===i)return B.delegate=null,U==="throw"&&N.iterator.return&&(B.method="return",B.arg=i,F(N,B),B.method==="throw")||U!=="return"&&(B.method="throw",B.arg=new TypeError("The iterator does not provide a '"+U+"' method")),T;var Y=f(j,N.iterator,B.arg);if(Y.type==="throw")return B.method="throw",B.arg=Y.arg,B.delegate=null,T;var W=Y.arg;if(!W)return B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,T;if(W.done)B[N.resultName]=W.value,B.next=N.nextLoc,B.method!=="return"&&(B.method="next",B.arg=i);else return W;return B.delegate=null,T}x(A),c(A,d,"Generator"),c(A,o,function(){return this}),c(A,"toString",function(){return"[object Generator]"});function K(N){var B={tryLoc:N[0]};1 in N&&(B.catchLoc=N[1]),2 in N&&(B.finallyLoc=N[2],B.afterLoc=N[3]),this.tryEntries.push(B)}function P(N){var B=N.completion||{};B.type="normal",delete B.arg,N.completion=B}function L(N){this.tryEntries=[{tryLoc:"root"}],N.forEach(K,this),this.reset(!0)}t.keys=function(N){var B=Object(N),U=[];for(var j in B)U.push(j);return U.reverse(),function Y(){for(;U.length;){var W=U.pop();if(W in B)return Y.value=W,Y.done=!1,Y}return Y.done=!0,Y}};function V(N){if(N!=null){var B=N[o];if(B)return B.call(N);if(typeof N.next=="function")return N;if(!isNaN(N.length)){var U=-1,j=function Y(){for(;++U=0;--j){var Y=this.tryEntries[j],W=Y.completion;if(Y.tryLoc==="root")return U("end");if(Y.tryLoc<=this.prev){var se=r.call(Y,"catchLoc"),Z=r.call(Y,"finallyLoc");if(se&&Z){if(this.prev=0;--U){var j=this.tryEntries[U];if(j.tryLoc<=this.prev&&r.call(j,"finallyLoc")&&this.prev=0;--B){var U=this.tryEntries[B];if(U.finallyLoc===N)return this.complete(U.completion,U.afterLoc),P(U),T}},catch:function(N){for(var B=this.tryEntries.length-1;B>=0;--B){var U=this.tryEntries[B];if(U.tryLoc===N){var j=U.completion;if(j.type==="throw"){var Y=j.arg;P(U)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(N,B,U){return this.delegate={iterator:V(N),resultName:B,nextLoc:U},this.method==="next"&&(this.arg=i),T}},t}(typeof PC=="object"?PC.exports:{});try{regeneratorRuntime=AC}catch(t){typeof globalThis=="object"?globalThis.regeneratorRuntime=AC:Function("r","regeneratorRuntime = r")(AC)}});var X$=_(Be=>{"use strict";u();l();var Gf=Symbol.for("react.element"),sFe=Symbol.for("react.portal"),uFe=Symbol.for("react.fragment"),lFe=Symbol.for("react.strict_mode"),dFe=Symbol.for("react.profiler"),cFe=Symbol.for("react.provider"),fFe=Symbol.for("react.context"),mFe=Symbol.for("react.forward_ref"),pFe=Symbol.for("react.suspense"),gFe=Symbol.for("react.memo"),hFe=Symbol.for("react.lazy"),K$=Symbol.iterator;function yFe(t){return t===null||typeof t!="object"?null:(t=K$&&t[K$]||t["@@iterator"],typeof t=="function"?t:null)}var V$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H$=Object.assign,G$={};function Xl(t,e,r){this.props=t,this.context=e,this.refs=G$,this.updater=r||V$}Xl.prototype.isReactComponent={};Xl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Xl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function W$(){}W$.prototype=Xl.prototype;function LC(t,e,r){this.props=t,this.context=e,this.refs=G$,this.updater=r||V$}var NC=LC.prototype=new W$;NC.constructor=LC;H$(NC,Xl.prototype);NC.isPureReactComponent=!0;var z$=Array.isArray,$$=Object.prototype.hasOwnProperty,DC={current:null},Y$={key:!0,ref:!0,__self:!0,__source:!0};function Q$(t,e,r){var n,i={},a=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)$$.call(e,n)&&!Y$.hasOwnProperty(n)&&(i[n]=e[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1{"use strict";u();l();Z$.exports=X$()});var uY=_(Ze=>{"use strict";u();l();function KC(t,e){var r=t.length;t.push(e);e:for(;0>>1,i=t[n];if(0>>1;ndb(s,r))ddb(c,s)?(t[n]=c,t[d]=r,n=d):(t[n]=s,t[o]=r,n=o);else if(ddb(c,r))t[n]=c,t[d]=r,n=d;else break e}}return e}function db(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}typeof performance=="object"&&typeof performance.now=="function"?(J$=performance,Ze.unstable_now=function(){return J$.now()}):(BC=Date,eY=BC.now(),Ze.unstable_now=function(){return BC.now()-eY});var J$,BC,eY,ji=[],bo=[],TFe=1,Fn=null,gr=3,mb=!1,Hs=!1,$f=!1,nY=typeof setTimeout=="function"?setTimeout:null,iY=typeof clearTimeout=="function"?clearTimeout:null,tY=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function zC(t){for(var e=fi(bo);e!==null;){if(e.callback===null)fb(bo);else if(e.startTime<=t)fb(bo),e.sortIndex=e.expirationTime,KC(ji,e);else break;e=fi(bo)}}function jC(t){if($f=!1,zC(t),!Hs)if(fi(ji)!==null)Hs=!0,HC(VC);else{var e=fi(bo);e!==null&&GC(jC,e.startTime-t)}}function VC(t,e){Hs=!1,$f&&($f=!1,iY(Yf),Yf=-1),mb=!0;var r=gr;try{for(zC(e),Fn=fi(ji);Fn!==null&&(!(Fn.expirationTime>e)||t&&!sY());){var n=Fn.callback;if(typeof n=="function"){Fn.callback=null,gr=Fn.priorityLevel;var i=n(Fn.expirationTime<=e);e=Ze.unstable_now(),typeof i=="function"?Fn.callback=i:Fn===fi(ji)&&fb(ji),zC(e)}else fb(ji);Fn=fi(ji)}if(Fn!==null)var a=!0;else{var o=fi(bo);o!==null&&GC(jC,o.startTime-e),a=!1}return a}finally{Fn=null,gr=r,mb=!1}}var pb=!1,cb=null,Yf=-1,aY=5,oY=-1;function sY(){return!(Ze.unstable_now()-oYt||125n?(t.sortIndex=r,KC(bo,t),fi(ji)===null&&t===fi(bo)&&($f?(iY(Yf),Yf=-1):$f=!0,GC(jC,r-n))):(t.sortIndex=i,KC(ji,t),Hs||mb||(Hs=!0,HC(VC))),t};Ze.unstable_shouldYield=sY;Ze.unstable_wrapCallback=function(t){var e=gr;return function(){var r=gr;gr=e;try{return t.apply(this,arguments)}finally{gr=r}}}});var dY=_((OTt,lY)=>{"use strict";u();l();lY.exports=uY()});var hX=_(Tn=>{"use strict";u();l();var y9=Ie(),Sn=dY();function J(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;re}return!1}function Br(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){sr[t]=new Br(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];sr[e]=new Br(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){sr[t]=new Br(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){sr[t]=new Br(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){sr[t]=new Br(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){sr[t]=new Br(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){sr[t]=new Br(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){sr[t]=new Br(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){sr[t]=new Br(t,5,!1,t.toLowerCase(),null,!1,!1)});var sx=/[\-:]([a-z])/g;function ux(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(sx,ux);sr[e]=new Br(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(sx,ux);sr[e]=new Br(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(sx,ux);sr[e]=new Br(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){sr[t]=new Br(t,1,!1,t.toLowerCase(),null,!1,!1)});sr.xlinkHref=new Br("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){sr[t]=new Br(t,1,!1,t.toLowerCase(),null,!0,!0)});function lx(t,e,r,n){var i=sr.hasOwnProperty(e)?sr[e]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var d=` +`+i[o].replace(" at new "," at ");return t.displayName&&d.includes("")&&(d=d.replace("",t.displayName)),d}while(1<=o&&0<=s);break}}}finally{$C=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?im(t):""}function MFe(t){switch(t.tag){case 5:return im(t.type);case 16:return im("Lazy");case 13:return im("Suspense");case 19:return im("SuspenseList");case 0:case 2:case 15:return t=YC(t.type,!1),t;case 11:return t=YC(t.type.render,!1),t;case 1:return t=YC(t.type,!0),t;default:return""}}function bw(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case td:return"Fragment";case ed:return"Portal";case hw:return"Profiler";case dx:return"StrictMode";case yw:return"Suspense";case vw:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case S9:return(t.displayName||"Context")+".Consumer";case b9:return(t._context.displayName||"Context")+".Provider";case cx:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case fx:return e=t.displayName||null,e!==null?e:bw(t.type)||"Memo";case Io:e=t._payload,t=t._init;try{return bw(t(e))}catch(r){}}return null}function CFe(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bw(e);case 8:return e===dx?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function No(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function T9(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function wFe(t){var e=T9(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r!="undefined"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function hb(t){t._valueTracker||(t._valueTracker=wFe(t))}function k9(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=T9(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Vb(t){if(t=t||(typeof document!="undefined"?document:void 0),typeof t=="undefined")return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Sw(t,e){var r=e.checked;return Tt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:t._wrapperState.initialChecked})}function pY(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=No(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function E9(t,e){e=e.checked,e!=null&&lx(t,"checked",e,!1)}function Iw(t,e){E9(t,e);var r=No(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Tw(t,e.type,r):e.hasOwnProperty("defaultValue")&&Tw(t,e.type,No(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function gY(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Tw(t,e,r){(e!=="number"||Vb(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var am=Array.isArray;function fd(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=yb.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function vm(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var um={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xFe=["Webkit","ms","Moz","O"];Object.keys(um).forEach(function(t){xFe.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),um[e]=um[t]})});function C9(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||um.hasOwnProperty(t)&&um[t]?(""+e).trim():e+"px"}function w9(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=C9(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var AFe=Tt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _w(t,e){if(e){if(AFe[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(J(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(J(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(J(61))}if(e.style!=null&&typeof e.style!="object")throw Error(J(62))}}function Rw(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mw=null;function mx(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cw=null,md=null,pd=null;function vY(t){if(t=Dm(t)){if(typeof Cw!="function")throw Error(J(280));var e=t.stateNode;e&&(e=vS(e),Cw(t.stateNode,t.type,e))}}function x9(t){md?pd?pd.push(t):pd=[t]:md=t}function A9(){if(md){var t=md,e=pd;if(pd=md=null,vY(t),e)for(t=0;t>>=0,t===0?32:31-(zFe(t)/jFe|0)|0}var vb=64,bb=4194304;function om(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $b(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=om(s):(a&=o,a!==0&&(n=om(a)))}else o=r&~i,o!==0?n=om(o):a!==0&&(n=om(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Lm(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-yi(e),t[e]=r}function WFe(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=dm),MY=" ",CY=!1;function X9(t,e){switch(t){case"keyup":return IKe.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Z9(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rd=!1;function kKe(t,e){switch(t){case"compositionend":return Z9(e);case"keypress":return e.which!==32?null:(CY=!0,MY);case"textInput":return t=e.data,t===MY&&CY?null:t;default:return null}}function EKe(t,e){if(rd)return t==="compositionend"||!Ix&&X9(t,e)?(t=Y9(),Nb=vx=_o=null,rd=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=AY(r)}}function rQ(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?rQ(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function nQ(){for(var t=window,e=Vb();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch(n){r=!1}if(r)t=e.contentWindow;else break;e=Vb(t.document)}return e}function Tx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function OKe(t){var e=nQ(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&rQ(r.ownerDocument.documentElement,r)){if(n!==null&&Tx(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=PY(r,a);var o=PY(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,nd=null,Lw=null,fm=null,Nw=!1;function OY(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Nw||nd==null||nd!==Vb(n)||(n=nd,"selectionStart"in n&&Tx(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),fm&&Em(fm,n)||(fm=n,n=Xb(Lw,"onSelect"),0od||(t.current=Kw[od],Kw[od]=null,od--)}function Je(t,e){od++,Kw[od]=t.current,t.current=e}var Do={},br=Bo(Do),Jr=Bo(!1),Js=Do;function bd(t,e){var r=t.type.contextTypes;if(!r)return Do;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function en(t){return t=t.childContextTypes,t!=null}function Jb(){ot(Jr),ot(br)}function zY(t,e,r){if(br.current!==Do)throw Error(J(168));Je(br,e),Je(Jr,r)}function fQ(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(J(108,CFe(t)||"Unknown",i));return Tt({},r,n)}function eS(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Do,Js=br.current,Je(br,t),Je(Jr,Jr.current),!0}function jY(t,e,r){var n=t.stateNode;if(!n)throw Error(J(169));r?(t=fQ(t,e,Js),n.__reactInternalMemoizedMergedChildContext=t,ot(Jr),ot(br),Je(br,t)):ot(Jr),Je(Jr,r)}var Ea=null,bS=!1,ow=!1;function mQ(t){Ea===null?Ea=[t]:Ea.push(t)}function jKe(t){bS=!0,mQ(t)}function Uo(){if(!ow&&Ea!==null){ow=!0;var t=0,e=We;try{var r=Ea;for(We=1;t>=o,i-=o,_a=1<<32-yi(e)+i|r<x?(O=A,A=null):O=A.sibling;var D=p(S,A,E[x],R);if(D===null){A===null&&(A=O);break}t&&A&&D.alternate===null&&e(S,A),I=a(D,I,x),C===null?M=D:C.sibling=D,C=D,A=O}if(x===E.length)return r(S,A),pt&&Gs(S,x),M;if(A===null){for(;xx?(O=A,A=null):O=A.sibling;var F=p(S,A,D.value,R);if(F===null){A===null&&(A=O);break}t&&A&&F.alternate===null&&e(S,A),I=a(F,I,x),C===null?M=F:C.sibling=F,C=F,A=O}if(D.done)return r(S,A),pt&&Gs(S,x),M;if(A===null){for(;!D.done;x++,D=E.next())D=f(S,D.value,R),D!==null&&(I=a(D,I,x),C===null?M=D:C.sibling=D,C=D);return pt&&Gs(S,x),M}for(A=n(S,A);!D.done;x++,D=E.next())D=y(A,S,x,D.value,R),D!==null&&(t&&D.alternate!==null&&A.delete(D.key===null?x:D.key),I=a(D,I,x),C===null?M=D:C.sibling=D,C=D);return t&&A.forEach(function(K){return e(S,K)}),pt&&Gs(S,x),M}function T(S,I,E,R){if(typeof E=="object"&&E!==null&&E.type===td&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case gb:e:{for(var M=E.key,C=I;C!==null;){if(C.key===M){if(M=E.type,M===td){if(C.tag===7){r(S,C.sibling),I=i(C,E.props.children),I.return=S,S=I;break e}}else if(C.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Io&&QY(M)===C.type){r(S,C.sibling),I=i(C,E.props),I.ref=em(S,C,E),I.return=S,S=I;break e}r(S,C);break}else e(S,C);C=C.sibling}E.type===td?(I=Zs(E.props.children,S.mode,R,E.key),I.return=S,S=I):(R=jb(E.type,E.key,E.props,null,S.mode,R),R.ref=em(S,I,E),R.return=S,S=R)}return o(S);case ed:e:{for(C=E.key;I!==null;){if(I.key===C)if(I.tag===4&&I.stateNode.containerInfo===E.containerInfo&&I.stateNode.implementation===E.implementation){r(S,I.sibling),I=i(I,E.children||[]),I.return=S,S=I;break e}else{r(S,I);break}else e(S,I);I=I.sibling}I=pw(E,S.mode,R),I.return=S,S=I}return o(S);case Io:return C=E._init,T(S,I,C(E._payload),R)}if(am(E))return v(S,I,E,R);if(Qf(E))return b(S,I,E,R);xb(S,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,I!==null&&I.tag===6?(r(S,I.sibling),I=i(I,E),I.return=S,S=I):(r(S,I),I=mw(E,S.mode,R),I.return=S,S=I),o(S)):r(S,I)}return T}var Id=IQ(!0),TQ=IQ(!1),qm={},$i=Bo(qm),Cm=Bo(qm),wm=Bo(qm);function Qs(t){if(t===qm)throw Error(J(174));return t}function Ax(t,e){switch(Je(wm,e),Je(Cm,t),Je($i,qm),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ew(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ew(e,t)}ot($i),Je($i,e)}function Td(){ot($i),ot(Cm),ot(wm)}function kQ(t){Qs(wm.current);var e=Qs($i.current),r=Ew(e,t.type);e!==r&&(Je(Cm,t),Je($i,r))}function Px(t){Cm.current===t&&(ot($i),ot(Cm))}var St=Bo(0);function oS(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var sw=[];function Ox(){for(var t=0;tr?r:4,t(!0);var n=uw.transition;uw.transition={};try{t(!1),e()}finally{We=r,uw.transition=n}}function UQ(){return Gn().memoizedState}function WKe(t,e,r){var n=Oo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},FQ(t))KQ(e,r);else if(r=yQ(t,e,r,n),r!==null){var i=qr();vi(r,t,n,i),zQ(r,e,n)}}function $Ke(t,e,r){var n=Oo(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(FQ(t))KQ(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,bi(s,o)){var d=e.interleaved;d===null?(i.next=i,wx(e)):(i.next=d.next,d.next=i),e.interleaved=i;return}}catch(c){}finally{}r=yQ(t,e,i,n),r!==null&&(i=qr(),vi(r,t,n,i),zQ(r,e,n))}}function FQ(t){var e=t.alternate;return t===It||e!==null&&e===It}function KQ(t,e){mm=sS=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function zQ(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,gx(t,r)}}var uS={readContext:Hn,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},YKe={readContext:Hn,useCallback:function(t,e){return Hi().memoizedState=[t,e===void 0?null:e],t},useContext:Hn,useEffect:ZY,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Ub(4194308,4,LQ.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Ub(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ub(4,2,t,e)},useMemo:function(t,e){var r=Hi();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Hi();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=WKe.bind(null,It,t),[n.memoizedState,t]},useRef:function(t){var e=Hi();return t={current:t},e.memoizedState=t},useState:XY,useDebugValue:Bx,useDeferredValue:function(t){return Hi().memoizedState=t},useTransition:function(){var t=XY(!1),e=t[0];return t=GKe.bind(null,t[1]),Hi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=It,i=Hi();if(pt){if(r===void 0)throw Error(J(407));r=r()}else{if(r=e(),Zt===null)throw Error(J(349));tu&30||RQ(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,ZY(CQ.bind(null,n,a,t),[t]),n.flags|=2048,Pm(9,MQ.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=Hi(),e=Zt.identifierPrefix;if(pt){var r=Ra,n=_a;r=(n&~(1<<32-yi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=xm++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Gi]=e,t[Mm]=n,XQ(t,e,!1,!1),e.stateNode=t;e:{switch(o=Rw(r,n),r){case"dialog":at("cancel",t),at("close",t),i=n;break;case"iframe":case"object":case"embed":at("load",t),i=n;break;case"video":case"audio":for(i=0;iEd&&(e.flags|=128,n=!0,tm(a,!1),e.lanes=4194304)}else{if(!n)if(t=oS(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),tm(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!pt)return yr(e),null}else 2*At()-a.renderingStartTime>Ed&&r!==1073741824&&(e.flags|=128,n=!0,tm(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=At(),e.sibling=null,r=St.current,Je(St,n?r&1|2:r&1),e):(yr(e),null);case 22:case 23:return Vx(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?yn&1073741824&&(yr(e),e.subtreeFlags&6&&(e.flags|=8192)):yr(e),null;case 24:return null;case 25:return null}throw Error(J(156,e.tag))}function n2e(t,e){switch(Ex(e),e.tag){case 1:return en(e.type)&&Jb(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Td(),ot(Jr),ot(br),Ox(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Px(e),null;case 13:if(ot(St),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(J(340));Sd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ot(St),null;case 4:return Td(),null;case 10:return Cx(e.type._context),null;case 22:case 23:return Vx(),null;case 24:return null;default:return null}}var Pb=!1,vr=!1,i2e=typeof WeakSet=="function"?WeakSet:Set,me=null;function dd(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){_t(t,e,n)}else r.current=null}function Jw(t,e,r){try{r()}catch(n){_t(t,e,n)}}var s9=!1;function a2e(t,e){if(Dw=Yb,t=nQ(),Tx(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch(R){r=null;break e}var o=0,s=-1,d=-1,c=0,m=0,f=t,p=null;t:for(;;){for(var y;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(d=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===t)break t;if(p===r&&++c===i&&(s=o),p===a&&++m===n&&(d=o),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}r=s===-1||d===-1?null:{start:s,end:d}}else r=null}r=r||{start:0,end:0}}else r=null;for(qw={focusedElem:t,selectionRange:r},Yb=!1,me=e;me!==null;)if(e=me,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,me=t;else for(;me!==null;){e=me;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var b=v.memoizedProps,T=v.memoizedState,S=e.stateNode,I=S.getSnapshotBeforeUpdate(e.elementType===e.type?b:pi(e.type,b),T);S.__reactInternalSnapshotBeforeUpdate=I}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(R){_t(e,e.return,R)}if(t=e.sibling,t!==null){t.return=e.return,me=t;break}me=e.return}return v=s9,s9=!1,v}function pm(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Jw(e,r,a)}i=i.next}while(i!==n)}}function TS(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function ex(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function eX(t){var e=t.alternate;e!==null&&(t.alternate=null,eX(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Gi],delete e[Mm],delete e[Fw],delete e[KKe],delete e[zKe])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function tX(t){return t.tag===5||t.tag===3||t.tag===4}function u9(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||tX(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function tx(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Zb));else if(n!==4&&(t=t.child,t!==null))for(tx(t,e,r),t=t.sibling;t!==null;)tx(t,e,r),t=t.sibling}function rx(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(rx(t,e,r),t=t.sibling;t!==null;)rx(t,e,r),t=t.sibling}var ar=null,gi=!1;function So(t,e,r){for(r=r.child;r!==null;)rX(t,e,r),r=r.sibling}function rX(t,e,r){if(Wi&&typeof Wi.onCommitFiberUnmount=="function")try{Wi.onCommitFiberUnmount(pS,r)}catch(s){}switch(r.tag){case 5:vr||dd(r,e);case 6:var n=ar,i=gi;ar=null,So(t,e,r),ar=n,gi=i,ar!==null&&(gi?(t=ar,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):ar.removeChild(r.stateNode));break;case 18:ar!==null&&(gi?(t=ar,r=r.stateNode,t.nodeType===8?aw(t.parentNode,r):t.nodeType===1&&aw(t,r),Tm(t)):aw(ar,r.stateNode));break;case 4:n=ar,i=gi,ar=r.stateNode.containerInfo,gi=!0,So(t,e,r),ar=n,gi=i;break;case 0:case 11:case 14:case 15:if(!vr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Jw(r,e,o),i=i.next}while(i!==n)}So(t,e,r);break;case 1:if(!vr&&(dd(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){_t(r,e,s)}So(t,e,r);break;case 21:So(t,e,r);break;case 22:r.mode&1?(vr=(n=vr)||r.memoizedState!==null,So(t,e,r),vr=n):So(t,e,r);break;default:So(t,e,r)}}function l9(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new i2e),e.forEach(function(n){var i=p2e.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function mi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=At()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*s2e(n/1960))-n,10t?16:t,Ro===null)var n=!1;else{if(t=Ro,Ro=null,cS=0,Ke&6)throw Error(J(331));var i=Ke;for(Ke|=4,me=t.current;me!==null;){var a=me,o=a.child;if(me.flags&16){var s=a.deletions;if(s!==null){for(var d=0;dAt()-zx?Xs(t,0):Kx|=r),tn(t,e)}function dX(t,e){e===0&&(t.mode&1?(e=bb,bb<<=1,!(bb&130023424)&&(bb=4194304)):e=1);var r=qr();t=xa(t,e),t!==null&&(Lm(t,e,r),tn(t,r))}function m2e(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),dX(t,r)}function p2e(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(J(314))}n!==null&&n.delete(e),dX(t,r)}var cX;cX=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Jr.current)Zr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zr=!1,t2e(t,e,r);Zr=!!(t.flags&131072)}else Zr=!1,pt&&e.flags&1048576&&pQ(e,rS,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Fb(t,e),t=e.pendingProps;var i=bd(e,br.current);hd(e,r),i=Nx(null,e,n,t,i,r);var a=Dx();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,en(n)?(a=!0,eS(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,xx(e),i.updater=SS,e.stateNode=i,i._reactInternals=e,Gw(e,n,t,r),e=Yw(null,e,n,!0,a,r)):(e.tag=0,pt&&a&&kx(e),Dr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Fb(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=h2e(n),t=pi(n,t),i){case 0:e=$w(null,e,n,t,r);break e;case 1:e=i9(null,e,n,t,r);break e;case 11:e=r9(null,e,n,t,r);break e;case 14:e=n9(null,e,n,pi(n.type,t),r);break e}throw Error(J(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pi(n,i),$w(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pi(n,i),i9(t,e,n,i,r);case 3:e:{if($Q(e),t===null)throw Error(J(387));n=e.pendingProps,a=e.memoizedState,i=a.element,vQ(t,e),aS(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=kd(Error(J(423)),e),e=a9(t,e,n,r,i);break e}else if(n!==i){i=kd(Error(J(424)),e),e=a9(t,e,n,r,i);break e}else for(vn=xo(e.stateNode.containerInfo.firstChild),bn=e,pt=!0,hi=null,r=TQ(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Sd(),n===i){e=Aa(t,e,r);break e}Dr(t,e,n,r)}e=e.child}return e;case 5:return kQ(e),t===null&&jw(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,Bw(n,i)?o=null:a!==null&&Bw(n,a)&&(e.flags|=32),WQ(t,e),Dr(t,e,o,r),e.child;case 6:return t===null&&jw(e),null;case 13:return YQ(t,e,r);case 4:return Ax(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Id(e,null,n,r):Dr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pi(n,i),r9(t,e,n,i,r);case 7:return Dr(t,e,e.pendingProps,r),e.child;case 8:return Dr(t,e,e.pendingProps.children,r),e.child;case 12:return Dr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Je(nS,n._currentValue),n._currentValue=o,a!==null)if(bi(a.value,o)){if(a.children===i.children&&!Jr.current){e=Aa(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var d=s.firstContext;d!==null;){if(d.context===n){if(a.tag===1){d=Ma(-1,r&-r),d.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?d.next=d:(d.next=m.next,m.next=d),c.pending=d}}a.lanes|=r,d=a.alternate,d!==null&&(d.lanes|=r),Vw(a.return,r,e),s.lanes|=r;break}d=d.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(J(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Vw(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Dr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,hd(e,r),i=Hn(i),n=n(i),e.flags|=1,Dr(t,e,n,r),e.child;case 14:return n=e.type,i=pi(n,e.pendingProps),i=pi(n.type,i),n9(t,e,n,i,r);case 15:return HQ(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pi(n,i),Fb(t,e),e.tag=1,en(n)?(t=!0,eS(e)):t=!1,hd(e,r),SQ(e,n,i),Gw(e,n,i,r),Yw(null,e,n,!0,t,r);case 19:return QQ(t,e,r);case 22:return GQ(t,e,r)}throw Error(J(156,e.tag))};function fX(t,e){return B9(t,e)}function g2e(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(t,e,r,n){return new g2e(t,e,r,n)}function Gx(t){return t=t.prototype,!(!t||!t.isReactComponent)}function h2e(t){if(typeof t=="function")return Gx(t)?1:0;if(t!=null){if(t=t.$$typeof,t===cx)return 11;if(t===fx)return 14}return 2}function Lo(t,e){var r=t.alternate;return r===null?(r=jn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function jb(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")Gx(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case td:return Zs(r.children,i,a,e);case dx:o=8,i|=8;break;case hw:return t=jn(12,r,e,i|2),t.elementType=hw,t.lanes=a,t;case yw:return t=jn(13,r,e,i),t.elementType=yw,t.lanes=a,t;case vw:return t=jn(19,r,e,i),t.elementType=vw,t.lanes=a,t;case I9:return ES(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case b9:o=10;break e;case S9:o=9;break e;case cx:o=11;break e;case fx:o=14;break e;case Io:o=16,n=null;break e}throw Error(J(130,t==null?t:typeof t,""))}return e=jn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Zs(t,e,r,n){return t=jn(7,t,n,e),t.lanes=r,t}function ES(t,e,r,n){return t=jn(22,t,n,e),t.elementType=I9,t.lanes=r,t.stateNode={isHidden:!1},t}function mw(t,e,r){return t=jn(6,t,null,e),t.lanes=r,t}function pw(t,e,r){return e=jn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function y2e(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=XC(0),this.expirationTimes=XC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=XC(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Wx(t,e,r,n,i,a,o,s,d){return t=new y2e(t,e,r,s,d),e===1?(e=1,a===!0&&(e|=8)):e=0,a=jn(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},xx(a),t}function v2e(t,e,r){var n=3{"use strict";u();l();function yX(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yX)}catch(t){console.error(t)}}yX(),vX.exports=hX()});var IX=_(Xx=>{"use strict";u();l();var SX=bX();Xx.createRoot=SX.createRoot,Xx.hydrateRoot=SX.hydrateRoot;var zTt});u();l();var Vgr=Se(U$()),Hgr=Se(F$()),oh=Se(Ie()),Sre=Se(IX());u();l();u();l();u();l();function Md(){return typeof __RX_PLAYER_DEBUG_MODE__=="boolean"&&__RX_PLAYER_DEBUG_MODE__}u();l();u();l();u();l();function w(t){return t==null}var Me=class{constructor(){this._listeners={}}addEventListener(e,r,n){let i=this._listeners[e];Array.isArray(i)?i.push(r):this._listeners[e]=[r],n!==void 0&&n.register(()=>{this.removeEventListener(e,r)})}removeEventListener(e,r){if(w(e)){this._listeners={};return}let n=this._listeners[e];if(!Array.isArray(n))return;if(w(r)){delete this._listeners[e];return}let i=n.indexOf(r);i!==-1&&n.splice(i,1),n.length===0&&delete this._listeners[e]}trigger(e,r){let n=this._listeners[e];Array.isArray(n)&&n.slice().forEach(i=>{try{i(r)}catch(a){if(g.CURRENT_ENV===g.DEV)throw a instanceof Error?a:new Error("EventEmitter: listener error");console.error("RxPlayer: EventEmitter error",a instanceof Error?a:null)}})}};u();l();u();l();u();l();var Fo=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope;var k2e=typeof window=="undefined"&&!Fo,Ko=k2e;var wS;Fo?wS=self:Ko?wS=global:wS=window;var Ae=wS;u();l();var Oa=typeof queueMicrotask=="function"?queueMicrotask:function(e){Promise.resolve().then(e,()=>e())};function Zx(){if(!Ko&&!w(Ae.WebKitSourceBuffer)&&Ae.WebKitSourceBuffer.prototype.addEventListener===void 0){let e=Ae.WebKitSourceBuffer.prototype;for(let r in Me.prototype)Me.prototype.hasOwnProperty(r)&&(e[r]=Me.prototype[r]);e._listeners=[],e._emitUpdate=function(r,n){Oa(()=>{this.trigger(r,n),this.updating=!1,this.trigger("updateend")})},e.appendBuffer=function(r){if(this.updating)throw new Error("updating");this.trigger("updatestart"),this.updating=!0;try{this.append(r)}catch(n){this._emitUpdate("error",n);return}this._emitUpdate("update")}}}u();l();u();l();u();l();var E2e={dashParsers:{wasm:null,native:null,fastJs:null},codecSupportProber:null,createDebugElement:null,directfile:null,decrypt:null,htmlTextDisplayer:null,htmlTextTracksParsers:{},mainThreadMediaSourceInit:null,multithread:null,nativeTextDisplayer:null,nativeTextTracksParsers:{},transports:{}},Bm=E2e;function xS(t){for(let e=0;e=this._levels.ERROR?console.error.bind(console):ye,this.warn=n>=this._levels.WARNING?console.warn.bind(console):ye,this.info=n>=this._levels.INFO?console.info.bind(console):ye,this.debug=n>=this._levels.DEBUG?console.log.bind(console):ye):(this.error=n>=this._levels.ERROR?(...a)=>r("ERROR",a):ye,this.warn=n>=this._levels.WARNING?(...a)=>r("WARNING",a):ye,this.info=n>=this._levels.INFO?(...a)=>r("INFO",a):ye,this.debug=n>=this._levels.DEBUG?(...a)=>r("DEBUG",a):ye),this.trigger("onLogLevelChange",this._currentLevel)}getLevel(){return this._currentLevel}hasLevel(e){return this._levels[e]>=this._levels[this._currentLevel]}};var R2e=new Um,k=R2e;u();l();u();l();u();l();u();l();var Fm=!1,ou=!1,Cd=!1,Km=!1,Jx=!1,su=!1,eA=!1,zm=!1,jm=!1,M2e=!1,C2e=!1,tA=!1,rA=!1,uu=!1,w2e=!1;(function(){var e,r,n;Ko||(typeof Ae.MSInputMethodContext!="undefined"&&typeof document.documentMode!="undefined"?(ou=!0,Cd=!0):navigator.appName==="Microsoft Internet Explorer"||navigator.appName==="Netscape"&&/(Trident|Edge)\//.test(navigator.userAgent)?Cd=!0:navigator.userAgent.toLowerCase().indexOf("edg/")!==-1?Fm=!0:navigator.userAgent.toLowerCase().indexOf("firefox")!==-1?Km=!0:typeof navigator.platform=="string"&&/iPad|iPhone|iPod/.test(navigator.platform)?su=!0:(Object.prototype.toString.call(Ae.HTMLElement).indexOf("Constructor")>=0||((r=(e=Ae.safari)==null?void 0:e.pushNotification)==null?void 0:r.toString())==="[object SafariRemoteNotification]"||/Safari\/(\d+)/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((n=navigator.vendor)==null?void 0:n.indexOf("Apple"))!==-1&&!/Chrome\/(\d+)/.test(navigator.userAgent)&&!/Chromium\/(\d+)/.test(navigator.userAgent))&&(Jx=!0),/SamsungBrowser/.test(navigator.userAgent)&&(eA=!0),navigator.userAgent.indexOf("PlayStation 4")!==-1?rA=!0:navigator.userAgent.indexOf("PlayStation 5")!==-1?uu=!0:/Tizen/.test(navigator.userAgent)?zm=!0:/[Ww]eb[O0]S/.test(navigator.userAgent)?(jm=!0,/[Ww]eb[O0]S.TV-2022/.test(navigator.userAgent)||/[Cc]hr[o0]me\/87/.test(navigator.userAgent)?C2e=!0:(/[Ww]eb[O0]S.TV-2021/.test(navigator.userAgent)||/[Cc]hr[o0]me\/79/.test(navigator.userAgent))&&(M2e=!0)):/[Pp]anasonic/.test(navigator.userAgent)?tA=!0:navigator.userAgent.indexOf("Xbox")!==-1&&(w2e=!0))})();u();l();function TX(){if(!Km)return k.warn("Compat: Can't access Firefox version on no firefox browser."),null;let t=navigator.userAgent,e=/Firefox\/([0-9]+)\./.exec(t);if(e===null)return-1;let r=parseInt(e[1],10);return isNaN(r)?-1:r}function nA(){if(!Km)return!0;let t=TX();if(t===null||t<67)return!0;let e=HTMLVideoElement==null?void 0:HTMLVideoElement.prototype;return(e==null?void 0:e.requirePictureInPicture)!==void 0}u();l();u();l();u();l();var x2e={DEFAULT_REQUEST_TIMEOUT:3e4,DEFAULT_CONNECTION_TIMEOUT:15e3,DEFAULT_TEXT_TRACK_MODE:"native",DEFAULT_ENABLE_FAST_SWITCHING:!0,DELTA_POSITION_AFTER_RELOAD:{bitrateSwitch:-.1,trackSwitch:{audio:0,video:0,other:0}},DEFAULT_CODEC_SWITCHING_BEHAVIOR:"continue",DEFAULT_AUTO_PLAY:!1,DEFAULT_WANTED_BUFFER_AHEAD:30,DEFAULT_MAX_BUFFER_AHEAD:1/0,DEFAULT_MAX_BUFFER_BEHIND:1/0,DEFAULT_MAX_VIDEO_BUFFER_SIZE:1/0,MAXIMUM_MAX_BUFFER_AHEAD:{text:18e3},MINIMUM_MAX_BUFFER_AHEAD:{text:120},MAXIMUM_MAX_BUFFER_BEHIND:{text:18e3},DEFAULT_BASE_BANDWIDTH:0,INACTIVITY_DELAY:6e4,DEFAULT_THROTTLE_VIDEO_BITRATE_WHEN_HIDDEN:!1,DEFAULT_VIDEO_RESOLUTION_LIMIT:"none",DEFAULT_LIVE_GAP:{DEFAULT:10,LOW_LATENCY:3.5},BUFFER_DISCONTINUITY_THRESHOLD:.2,BITRATE_REBUFFERING_RATIO:1.5,DEFAULT_MAX_MANIFEST_REQUEST_RETRY:4,DEFAULT_CDN_DOWNGRADE_TIME:60,DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR:4,INITIAL_BACKOFF_DELAY_BASE:{REGULAR:200,LOW_LATENCY:50},MAX_BACKOFF_DELAY_BASE:{REGULAR:3e3,LOW_LATENCY:1e3},SAMPLING_INTERVAL_MEDIASOURCE:1e3,SAMPLING_INTERVAL_LOW_LATENCY:500,SAMPLING_INTERVAL_NO_MEDIASOURCE:500,ABR_ENTER_BUFFER_BASED_ALGO:10,ABR_EXIT_BUFFER_BASED_ALGO:5,ABR_MINIMUM_TOTAL_BYTES:15e4,ABR_MINIMUM_CHUNK_SIZE:16e3,ABR_STARVATION_FACTOR:{DEFAULT:.72,LOW_LATENCY:.72},ABR_REGULAR_FACTOR:{DEFAULT:.72,LOW_LATENCY:.72},ABR_STARVATION_GAP:{DEFAULT:5,LOW_LATENCY:5},OUT_OF_STARVATION_GAP:{DEFAULT:7,LOW_LATENCY:7},ABR_STARVATION_DURATION_DELTA:.1,ABR_FAST_EMA:2,ABR_SLOW_EMA:10,RESUME_GAP_AFTER_SEEKING:{DEFAULT:1.5,LOW_LATENCY:.5},RESUME_GAP_AFTER_NOT_ENOUGH_DATA:{DEFAULT:.5,LOW_LATENCY:.5},RESUME_GAP_AFTER_BUFFERING:{DEFAULT:5,LOW_LATENCY:.5},REBUFFERING_GAP:{DEFAULT:.5,LOW_LATENCY:.2},MINIMUM_BUFFER_AMOUNT_BEFORE_FREEZING:2,UNFREEZING_SEEK_DELAY:6e3,FREEZING_STALLED_DELAY:600,UNFREEZING_DELTA_POSITION:.001,SEGMENT_SYNCHRONIZATION_DELAY:1500,MISSING_DATA_TRIGGER_SYNC_DELAY:.1,MAX_TIME_MISSING_FROM_COMPLETE_SEGMENT:.15,MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:.4,MAX_MANIFEST_BUFFERED_DURATION_DIFFERENCE:.3,MINIMUM_SEGMENT_SIZE:.001,APPEND_WINDOW_SECURITIES:{START:.2,END:.1},MAXIMUM_HTML_TEXT_TRACK_UPDATE_INTERVAL:50,TEXT_TRACK_SIZE_CHECKS_INTERVAL:250,BUFFER_PADDING:{audio:1,video:3,other:1},SEGMENT_PRIORITIES_STEPS:[2,4,8,12,18,25],MAX_HIGH_PRIORITY_LEVEL:1,MIN_CANCELABLE_PRIORITY:3,EME_DEFAULT_VIDEO_CODECS:['video/mp4;codecs="avc1.4d401e"','video/mp4;codecs="avc1.42e01e"','video/webm;codecs="vp8"'],EME_DEFAULT_AUDIO_CODECS:['audio/mp4;codecs="mp4a.40.2"',"audio/webm;codecs=opus"],EME_DEFAULT_WIDEVINE_ROBUSTNESSES:["HW_SECURE_ALL","HW_SECURE_DECODE","HW_SECURE_CRYPTO","SW_SECURE_DECODE","SW_SECURE_CRYPTO"],EME_DEFAULT_PLAYREADY_RECOMMENDATION_ROBUSTNESSES:["3000","2000"],EME_KEY_SYSTEMS:{clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.microsoft.playready.recommendation","com.microsoft.playready","com.chromecast.playready","com.youtube.playready"],fairplay:["com.apple.fps.1_0"]},MAX_CONSECUTIVE_MANIFEST_PARSING_IN_UNSAFE_MODE:10,MIN_MANIFEST_PARSING_TIME_TO_ENTER_UNSAFE_MODE:200,MIN_DASH_S_ELEMENTS_TO_PARSE_UNSAFELY:300,OUT_OF_SYNC_MANIFEST_REFRESH_DELAY:3e3,FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY:3e3,DASH_FALLBACK_LIFETIME_WHEN_MINIMUM_UPDATE_PERIOD_EQUAL_0:3,EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS:15,EME_MAX_STORED_PERSISTENT_SESSION_INFORMATION:1e3,EME_WAITING_DELAY_LOADED_SESSION_EMPTY_KEYSTATUSES:100,FORCED_ENDED_THRESHOLD:8e-4,ADAP_REP_SWITCH_BUFFER_PADDINGS:{video:{before:5,after:5},audio:{before:2,after:2.5},text:{before:0,after:0}},SOURCE_BUFFER_FLUSHING_INTERVAL:500,CONTENT_REPLACEMENT_PADDING:1.2,CACHE_LOAD_DURATION_THRESHOLDS:{video:50,audio:10},STREAM_EVENT_EMITTER_POLL_INTERVAL:250,DEFAULT_MAXIMUM_TIME_ROUNDING_ERROR:.001,BUFFERED_HISTORY_RETENTION_TIME:6e4,BUFFERED_HISTORY_MAXIMUM_ENTRIES:200,MIN_BUFFER_AHEAD:5,UPTO_CURRENT_POSITION_CLEANUP:5,DEFAULT_VIDEO_REPRESENTATIONS_SWITCHING_MODE:"seamless",DEFAULT_AUDIO_REPRESENTATIONS_SWITCHING_MODE:"seamless",DEFAULT_VIDEO_TRACK_SWITCHING_MODE:"reload",DEFAULT_AUDIO_TRACK_SWITCHING_MODE:"seamless"},kX=x2e;u();l();u();l();function A2e(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");let r=Object(t);for(let n=0;n0}u();l();u();l();function et(t,e,r){if(typeof Array.prototype.findIndex=="function")return t.findIndex(e,r);let n=t.length>>>0;for(let i=0;ithis.finish()))}getValue(){return this._value}setValue(e){if(this._isFinished){g.CURRENT_ENV===g.DEV&&console.error("Finished shared references cannot be updated");return}if(this._value=e,this._listeners.length===0)return;let r=this._listeners.slice();for(let n of r)try{n.hasBeenCleared||n.trigger(e,n.complete)}catch(i){}}setValueIfChanged(e){e!==this._value&&this.setValue(e)}onUpdate(e,r){let n=()=>{if((r==null?void 0:r.clearSignal)!==void 0&&r.clearSignal.deregister(n),i.hasBeenCleared)return;i.hasBeenCleared=!0;let a=this._listeners.indexOf(i);a>=0&&this._listeners.splice(a,1)},i={trigger:e,complete:n,hasBeenCleared:!1};if(this._listeners.push(i),(r==null?void 0:r.emitCurrentValue)===!0&&e(this._value,n),this._isFinished||i.hasBeenCleared){n();return}(r==null?void 0:r.clearSignal)!==void 0&&r.clearSignal.register(n)}waitUntilDefined(e,r){this.onUpdate((n,i)=>{n!==void 0&&(i(),e(this._value))},{clearSignal:r==null?void 0:r.clearSignal,emitCurrentValue:!0})}_onFinished(e,r){if(r.isCancelled())return ye;let n=()=>{let o=et(this._onFinishCbs,s=>s.trigger===i);o>=0&&(this._onFinishCbs[o].hasBeenCleared=!0,this._onFinishCbs.splice(o,1))},i=()=>{n(),e()},a=r.register(n);return this._onFinishCbs.push({trigger:i,hasBeenCleared:!1}),a}finish(){this._deregisterCancellation!==void 0&&this._deregisterCancellation(),this._isFinished=!0;let e=this._listeners.slice();for(let r of e)try{r.hasBeenCleared||(r.complete(),r.hasBeenCleared=!0)}catch(n){}if(this._listeners.length=0,this._onFinishCbs.length>0){let r=this._onFinishCbs.slice();for(let n of r)try{n.hasBeenCleared||(n.trigger(),n.hasBeenCleared=!0)}catch(i){}this._onFinishCbs.length=0}}};function lu(t,e,r){let n=new AS(e(t.getValue()),r);return t.onUpdate(function(a){n.setValue(e(a))},{clearSignal:r}),t._onFinished(()=>{n.finish()},r),n}var oe=AS;var O2e=["","webkit","moz","ms"];function L2e(t,e){let r=document.createElement(t.tagName),n="on"+e;return n in r?!0:(r.setAttribute(n,"return;"),typeof r[n]=="function")}function N2e(t,e){return e.filter(r=>L2e(t,r))[0]}function D2e(t,e){return t.reduce((r,n)=>r.concat((e===void 0?O2e:e).map(i=>i+n)),[])}function gt(t,e){let r,n=D2e(t,e);return(i,a,o)=>{if(!o.isCancelled()){if(typeof HTMLElement!="undefined"&&i instanceof HTMLElement)if(typeof r=="undefined"&&(r=N2e(i,n)),G(r))i.addEventListener(r,a),o.register(()=>{r!==void 0&&i.removeEventListener(r,a)});else{g.CURRENT_ENV===g.DEV&&k.warn(`compat: element ${i.tagName} does not support any of these events: `+n.join(", "));return}n.forEach(s=>{let d=!1;typeof i.addEventListener=="function"?i.addEventListener(s,a):(d=!0,i["on"+s]=a),o.register(()=>{typeof i.removeEventListener=="function"&&i.removeEventListener(s,a),d&&delete i["on"+s]})})}}}function q2e(t){let e,r=document;w(r.hidden)?w(r.mozHidden)?w(r.msHidden)?w(r.webkitHidden)||(e="webkit"):e="ms":e="moz":e="";let n=G(e)?e+"Hidden":"hidden",i=G(e)?e+"visibilitychange":"visibilitychange",a=document[n],o=new oe(!a,t);return du(document,i,()=>{let s=!document[n];o.setValueIfChanged(s)},t),o}function EX(t,e){let r=t;if(r.webkitSupportsPresentationMode===!0&&typeof r.webkitSetPresentationMode=="function"){let a=r.webkitPresentationMode==="picture-in-picture",o=new oe({isEnabled:a,pipWindow:null},e);return du(r,"webkitpresentationmodechanged",()=>{let s=r.webkitPresentationMode==="picture-in-picture";o.setValue({isEnabled:s,pipWindow:null})},e),o}let n=document.pictureInPictureElement===r,i=new oe({isEnabled:n,pipWindow:null},e);return du(r,"enterpictureinpicture",a=>{var o;i.setValue({isEnabled:!0,pipWindow:(o=a.pictureInPictureWindow)!=null?o:null})},e),du(r,"leavepictureinpicture",()=>{i.setValue({isEnabled:!1,pipWindow:null})},e),i}function _X(t,e){let r=q2e(e),n,i=new oe(!0,e);return e.register(()=>{clearTimeout(n),n=void 0}),r.onUpdate(a,{clearSignal:e}),t.onUpdate(a,{clearSignal:e}),a(),i;function a(){if(clearTimeout(n),n=void 0,t.getValue().isEnabled||r.getValue())i.setValueIfChanged(!0);else{let{INACTIVITY_DELAY:o}=Q.getCurrent();n=setTimeout(()=>{i.setValueIfChanged(!1)},o)}}}function RX(t){var a,o;let e=w(Ae.devicePixelRatio)||Ae.devicePixelRatio===0?1:Ae.devicePixelRatio,r=new oe({width:(a=Ae.screen)==null?void 0:a.width,height:(o=Ae.screen)==null?void 0:o.height,pixelRatio:e},t),n=setInterval(i,2e4);return t.register(function(){clearInterval(n)}),r;function i(){let s=r.getValue();(s.width!==screen.width||s.height!==screen.height||s.pixelRatio!==e)&&r.setValue({width:screen.width,height:screen.height,pixelRatio:e})}}function MX(t,e,r){let n=w(Ae.devicePixelRatio)||Ae.devicePixelRatio===0?1:Ae.devicePixelRatio,i=new oe({width:t.clientWidth,height:t.clientHeight,pixelRatio:n},r),a=ye;e.onUpdate(s,{clearSignal:r}),du(Ae,"resize",s,r),du(t,"enterpictureinpicture",s,r),du(t,"leavepictureinpicture",s,r);let o=setInterval(s,2e4);return s(),r.register(function(){a(),clearInterval(o)}),i;function s(){a();let d=e.getValue(),{pipWindow:c}=d;if(d.isEnabled)if(w(c)){let f=i.getValue();(f.width!==void 0||f.height!==void 0||f.pixelRatio!==n)&&i.setValue({width:void 0,height:void 0,pixelRatio:n})}else{let f=()=>{m()};c.addEventListener("resize",f),a=()=>{c.removeEventListener("resize",f),a=ye},m()}else{let f=i.getValue();(f.width!==t.clientWidth||f.height!==t.clientHeight||f.pixelRatio!==n)&&i.setValue({width:t.clientWidth,height:t.clientHeight,pixelRatio:n})}function m(){let f=i.getValue();(f.width!==(c==null?void 0:c.width)||f.height!==(c==null?void 0:c.height)||f.pixelRatio!==n)&&i.setValue({width:c==null?void 0:c.width,height:c==null?void 0:c.height,pixelRatio:n})}}}var VEt=gt(["loadedmetadata"]),HEt=gt(["timeupdate"]),GEt=gt(["addtrack"]),WEt=gt(["removetrack"]),wd=gt(["sourceopen","webkitsourceopen"]),PS=gt(["sourceclose","webkitsourceclose"]),OS=gt(["sourceended","webkitsourceended"]),CX=gt(["update"]),wX=gt(["removesourcebuffer"]),LS=gt(["keymessage","message"]),xX=gt(["keyadded","ready"]),NS=gt(["keyerror","error"]),AX=gt(["keystatuseschange"]),PX=gt(["seeking"]),OX=gt(["seeked"]),LX=gt(["ended"]);function du(t,e,r,n){t.addEventListener(e,r),n.register(()=>{t.removeEventListener(e,r)})}u();l();function Hm(t){let e=t;if(typeof e.getStartDate=="function"){let r=e.getStartDate();if(typeof r=="object"&&r!==null){let n=+r;if(!isNaN(n))return n/1e3}else if(typeof r=="number"&&!isNaN(r))return r}}u();l();var U2e=typeof MediaSource=="function"&&MediaSource.canConstructInDedicatedWorker===!0,DS=U2e;u();l();function oA(){return rA&&typeof Worker=="object"||typeof Worker=="function"}u();l();u();l();var Wn=class t extends Error{constructor(e,r,n){super(e),Object.setPrototypeOf(this,t.prototype),this.name="CustomLoaderError",this.canRetry=r,this.xhr=n}};u();l();u();l();u();l();u();l();u();l();var NX=new oe(0);var F2e=typeof performance!="undefined"?()=>performance.now()+NX.getValue():()=>Date.now()+NX.getValue(),re=F2e;u();l();var ht=class t extends Error{constructor(e,r,n){let i;switch(n){case"TIMEOUT":i="The request timed out";break;case"ERROR_EVENT":i="An error prevented the request to be performed successfully";break;case"PARSE_ERROR":i="An error happened while formatting the response data";break;case"ERROR_HTTP_CODE":i="An HTTP status code indicating failure was received: "+String(r);break}super(i),Object.setPrototypeOf(this,t.prototype),this.name="RequestError",this.url=e,this.status=r,this.type=n}serialize(){return{url:this.url,status:this.status,type:this.type}}},Sr={TIMEOUT:"TIMEOUT",ERROR_EVENT:"ERROR_EVENT",ERROR_HTTP_CODE:"ERROR_HTTP_CODE",PARSE_ERROR:"PARSE_ERROR"};var sA=typeof Headers=="function"?Headers:null,uA=typeof AbortController=="function"?AbortController:null;function qS(t){var p,y;let e;if(!w(t.headers))if(w(sA))e=t.headers;else{e=new sA;let v=Object.keys(t.headers);for(let b=0;b{n=!0,c!==void 0&&clearTimeout(c),s()},t.timeout));let c;t.connectionTimeout!==void 0&&(c=setTimeout(()=>{i=!0,d!==void 0&&clearTimeout(d),s()},t.connectionTimeout));let m=t.cancelSignal.register(function(b){r=b,s()}),f={method:"GET"};if(e!==void 0&&(f.headers=e),f.signal=w(o)?null:o.signal,k.hasLevel("DEBUG")){let v="FETCH: Sending GET "+t.url;t.timeout!==void 0&&(v+=" to="+String(t.timeout/1e3)),t.connectionTimeout!==void 0&&(v+=" cto="+String(t.connectionTimeout/1e3)),((p=t.headers)==null?void 0:p.Range)!==void 0&&(v+=" Range="+((y=t.headers)==null?void 0:y.Range)),k.debug(v)}return fetch(t.url,f).then(v=>{if(c!==void 0&&clearTimeout(c),v.status>=300)throw k.warn("Fetch: Request HTTP Error",v.status,v.url),new ht(v.url,v.status,Sr.ERROR_HTTP_CODE);if(w(v.body))throw new ht(v.url,v.status,Sr.PARSE_ERROR);let b=v.headers.get("Content-Length"),T=!w(b)&&!isNaN(+b)?+b:void 0,S=v.body.getReader(),I=0;return E();async function E(){let R=await S.read();if(!R.done&&!w(R.value)){I+=R.value.byteLength;let M=re(),C={url:v.url,currentTime:M,duration:M-a,sendingTime:a,chunkSize:R.value.byteLength,chunk:R.value.buffer,size:I,totalSize:T};return t.onData(C),E()}else if(R.done){d!==void 0&&clearTimeout(d),m();let M=re();return{requestDuration:M-a,receivedTime:M,sendingTime:a,size:I,status:v.status,url:v.url}}return E()}}).catch(v=>{throw r!==null?r:(m(),n?(k.warn("Fetch: Request timed out."),new ht(t.url,0,Sr.TIMEOUT)):i?(k.warn("Fetch: Request connection timed out."),new ht(t.url,0,Sr.TIMEOUT)):v instanceof ht?v:(k.warn("Fetch: Request Error",v instanceof Error?v.toString():""),new ht(t.url,0,Sr.ERROR_EVENT)))})}function Gm(){return typeof Ae.fetch=="function"&&!w(uA)&&!w(sA)}u();l();var K2e="json";function lA(t){let e={url:t.url,headers:t.headers,responseType:w(t.responseType)?K2e:t.responseType,timeout:t.timeout,connectionTimeout:t.connectionTimeout};return new Promise((r,n)=>{let{onProgress:i,cancelSignal:a}=t,{url:o,headers:s,responseType:d,timeout:c,connectionTimeout:m}=e,f=new XMLHttpRequest;f.open("GET",o,!0);let p;c!==void 0&&(f.timeout=c,p=setTimeout(()=>{T(),n(new ht(o,f.status,Sr.TIMEOUT))},c+3e3));let y;if(m!==void 0&&(y=setTimeout(()=>{T(),f.readyState!==XMLHttpRequest.DONE&&f.abort(),n(new ht(o,f.status,Sr.TIMEOUT))},m)),f.responseType=d,f.responseType==="document"&&f.overrideMimeType("text/xml"),!w(s)){let S=s;for(let I in S)S.hasOwnProperty(I)&&f.setRequestHeader(I,S[I])}let v=re(),b=null;if(a!==void 0&&(b=a.register(function(I){T(),f.readyState!==XMLHttpRequest.DONE&&f.abort(),n(I)}),a.isCancelled()))return;if(f.onerror=function(){T(),n(new ht(o,f.status,Sr.ERROR_EVENT))},f.ontimeout=function(){T(),n(new ht(o,f.status,Sr.TIMEOUT))},m!==void 0&&(f.onreadystatechange=function(){f.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&clearTimeout(y)}),i!==void 0&&(f.onprogress=function(I){let E=re();i({url:o,duration:E-v,sendingTime:v,currentTime:E,size:I.loaded,totalSize:I.total})}),f.onload=function(I){if(f.readyState===XMLHttpRequest.DONE)if(T(),f.status>=200&&f.status<300){let E=re(),R=f.response instanceof ArrayBuffer?f.response.byteLength:I.total,M=f.status,C=f.responseType,A=G(f.responseURL)?f.responseURL:o,x;if(C==="json"?x=typeof f.response=="object"?f.response:z2e(f.responseText):x=f.response,w(x)){n(new ht(o,f.status,Sr.PARSE_ERROR));return}r({status:M,url:A,responseType:C,sendingTime:v,receivedTime:E,requestDuration:E-v,size:R,responseData:x})}else n(new ht(o,f.status,Sr.ERROR_HTTP_CODE))},k.hasLevel("DEBUG")){let S="XHR: Sending GET "+o;t.responseType!==void 0&&(S+=" type="+t.responseType),c!==void 0&&(S+=" to="+String(c/1e3)),m!==void 0&&(S+=" cto="+String(m/1e3)),(s==null?void 0:s.Range)!==void 0&&(S+=" Range="+(s==null?void 0:s.Range)),k.debug(S)}f.send();function T(){p!==void 0&&clearTimeout(p),y!==void 0&&clearTimeout(y),b!==null&&b()}})}function z2e(t){try{return JSON.parse(t)}catch(e){return null}}var st=lA;var cu=Sr,kn={NETWORK_ERROR:"NETWORK_ERROR",MEDIA_ERROR:"MEDIA_ERROR",ENCRYPTED_MEDIA_ERROR:"ENCRYPTED_MEDIA_ERROR",OTHER_ERROR:"OTHER_ERROR"},dA={PIPELINE_LOAD_ERROR:"PIPELINE_LOAD_ERROR",PIPELINE_PARSE_ERROR:"PIPELINE_PARSE_ERROR",INTEGRITY_ERROR:"INTEGRITY_ERROR",MANIFEST_PARSE_ERROR:"MANIFEST_PARSE_ERROR",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"MANIFEST_INCOMPATIBLE_CODECS_ERROR",MANIFEST_UPDATE_ERROR:"MANIFEST_UPDATE_ERROR",MANIFEST_UNSUPPORTED_ADAPTATION_TYPE:"MANIFEST_UNSUPPORTED_ADAPTATION_TYPE",MEDIA_STARTING_TIME_NOT_FOUND:"MEDIA_STARTING_TIME_NOT_FOUND",MEDIA_TIME_BEFORE_MANIFEST:"MEDIA_TIME_BEFORE_MANIFEST",MEDIA_TIME_AFTER_MANIFEST:"MEDIA_TIME_AFTER_MANIFEST",MEDIA_TIME_NOT_FOUND:"MEDIA_TIME_NOT_FOUND",NO_PLAYABLE_REPRESENTATION:"NO_PLAYABLE_REPRESENTATION",MEDIA_IS_ENCRYPTED_ERROR:"MEDIA_IS_ENCRYPTED_ERROR",CREATE_MEDIA_KEYS_ERROR:"CREATE_MEDIA_KEYS_ERROR",MEDIA_KEYS_ATTACHMENT_ERROR:"MEDIA_KEYS_ATTACHMENT_ERROR",KEY_ERROR:"KEY_ERROR",KEY_STATUS_CHANGE_ERROR:"KEY_STATUS_CHANGE_ERROR",KEY_UPDATE_ERROR:"KEY_UPDATE_ERROR",KEY_LOAD_ERROR:"KEY_LOAD_ERROR",KEY_LOAD_TIMEOUT:"KEY_LOAD_TIMEOUT",KEY_GENERATE_REQUEST_ERROR:"KEY_GENERATE_REQUEST_ERROR",INCOMPATIBLE_KEYSYSTEMS:"INCOMPATIBLE_KEYSYSTEMS",INVALID_ENCRYPTED_EVENT:"INVALID_ENCRYPTED_EVENT",INVALID_KEY_SYSTEM:"INVALID_KEY_SYSTEM",LICENSE_SERVER_CERTIFICATE_ERROR:"LICENSE_SERVER_CERTIFICATE_ERROR",MULTIPLE_SESSIONS_SAME_INIT_DATA:"MULTIPLE_SESSIONS_SAME_INIT_DATA",BUFFER_APPEND_ERROR:"BUFFER_APPEND_ERROR",BUFFER_FULL_ERROR:"BUFFER_FULL_ERROR",BUFFER_TYPE_UNKNOWN:"BUFFER_TYPE_UNKNOWN",MEDIA_ERR_BLOCKED_AUTOPLAY:"MEDIA_ERR_BLOCKED_AUTOPLAY",MEDIA_ERR_PLAY_NOT_ALLOWED:"MEDIA_ERR_PLAY_NOT_ALLOWED",MEDIA_ERR_NOT_LOADED_METADATA:"MEDIA_ERR_NOT_LOADED_METADATA",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_UNKNOWN:"MEDIA_ERR_UNKNOWN",MEDIA_SOURCE_NOT_SUPPORTED:"MEDIA_SOURCE_NOT_SUPPORTED",MEDIA_KEYS_NOT_SUPPORTED:"MEDIA_KEYS_NOT_SUPPORTED",DISCONTINUITY_ENCOUNTERED:"DISCONTINUITY_ENCOUNTERED",NONE:"NONE"};u();l();function En(t,e){return`${t}: ${e}`}var ze=class t extends Error{constructor(e,r,n){super(En(e,r)),Object.setPrototypeOf(this,t.prototype),this.name="EncryptedMediaError",this.type=kn.ENCRYPTED_MEDIA_ERROR,this.code=e,this._originalMessage=r,this.fatal=!1,typeof(n==null?void 0:n.keyStatuses)=="string"&&(this.keyStatuses=n.keyStatuses)}serialize(){return{name:this.name,code:this.code,reason:this._originalMessage,keyStatuses:this.keyStatuses}}};u();l();u();l();u();l();var he=class t extends Error{constructor(e,r,n){super(En(e,r)),Object.setPrototypeOf(this,t.prototype),this.name="MediaError",this.type=kn.MEDIA_ERROR,this._originalMessage=r,this.code=e,this.fatal=!1,(n==null?void 0:n.tracks)!==void 0&&(n==null?void 0:n.tracks.length)>0&&(this.tracksInfo=n.tracks)}serialize(){return{name:this.name,code:this.code,reason:this._originalMessage,tracks:this.tracksInfo}}};u();l();var rn=class t extends Error{constructor(e,r){super(En(e,r.message)),Object.setPrototypeOf(this,t.prototype),this.name="NetworkError",this.type=kn.NETWORK_ERROR,this.url=r.url,this.status=r.status,this.errorType=r.type,this._baseError=r,this.code=e,this.fatal=!1}isHttpError(e){return this.errorType===cu.ERROR_HTTP_CODE&&this.status===e}serialize(){return{name:this.name,code:this.code,baseError:this._baseError.serialize()}}};u();l();var Jt=class t extends Error{constructor(e,r){super(En(e,r)),Object.setPrototypeOf(this,t.prototype),this.name="OtherError",this.type=kn.OTHER_ERROR,this.code=e,this.fatal=!1,this._originalMessage=r}serialize(){return{name:this.name,code:this.code,reason:this._originalMessage}}};function zo(t){return(t instanceof ze||t instanceof he||t instanceof Jt||t instanceof rn)&&Object.keys(kn).indexOf(t.type)>=0}function er(t,{defaultCode:e,defaultReason:r}){if(zo(t))return t;let n=t instanceof Error?t.toString():r;return new Jt(e,n)}u();l();var Ir=class t extends Error{constructor(e,r,n){super(r),Object.setPrototypeOf(this,t.prototype),this.name="SourceBufferError",this.errorName=e,this.isBufferFull=n}serialize(){return{errorName:this.name,message:this.message,isBufferFull:this.isBufferFull}}toString(){return`${this.errorName}: ${this.message}`}};u();l();var fu=class t extends Error{constructor(e,r){super(En(e,r)),Object.setPrototypeOf(this,t.prototype),this.name="WorkerInitializationError",this.type="WORKER_INITIALIZATION_ERROR",this.code=e}};u();l();u();l();u();l();u();l();function ce(t,e,r){if(typeof Array.prototype.find=="function")return t.find(e,r);let n=t.length>>>0;for(let i=0;i=0;r--)if(t[r]!==e[r])return!1;return!0}u();l();function Dt(){let t="",e=-1;return function(){return e++,e>=Number.MAX_SAFE_INTEGER&&(t+="0",e=0),t+String(e)}}var W2e=Dt(),cA=class{constructor(e,r){var n,i,a,o,s;if(this.id=e.id,this.uniqueId=W2e(),this.bitrate=e.bitrate,this.codecs=[],e.isSpatialAudio!==void 0&&(this.isSpatialAudio=e.isSpatialAudio),e.height!==void 0&&(this.height=e.height),e.width!==void 0&&(this.width=e.width),e.mimeType!==void 0&&(this.mimeType=e.mimeType),e.contentProtections!==void 0&&(this.contentProtections=e.contentProtections),e.frameRate!==void 0&&(this.frameRate=e.frameRate),e.hdrInfo!==void 0&&(this.hdrInfo=e.hdrInfo),this.cdnMetadata=e.cdnMetadata,this.index=e.index,r==="audio"||r==="video")if(Ee.codecSupportProber!==null){if(e.supplementalCodecs!==void 0){let d=Ee.codecSupportProber.isSupported((n=this.mimeType)!=null?n:"",(i=e.supplementalCodecs)!=null?i:"");d!==!1&&(this.codecs=[e.supplementalCodecs],d===!0&&(this.isSupported=!0))}this.isSupported!==!0&&(this.codecs.length>0?this.codecs.push((a=e.codecs)!=null?a:""):(this.codecs=e.codecs===void 0?[]:[e.codecs],this.isSupported=Ee.codecSupportProber.isSupported((o=this.mimeType)!=null?o:"",(s=e.codecs)!=null?s:"")))}else e.supplementalCodecs!==void 0&&this.codecs.push(e.supplementalCodecs),e.codecs!==void 0&&this.codecs.push(e.codecs);else e.codecs!==void 0&&this.codecs.push(e.codecs),this.isSupported=!0}refreshCodecSupport(e){var i;let r=(i=this.mimeType)!=null?i:"",n=this.codecs;n.length===0&&(n=[""]);for(let a=0;af.keyId);n.push({type:d.type,keyIds:m,values:[d.values[c]]}),s=!0}}return n}getAllEncryptionData(){var r,n;if(this.contentProtections===void 0||this.contentProtections.initData.length===0)return[];let e=(n=(r=this.contentProtections)==null?void 0:r.keyIds)==null?void 0:n.map(i=>i.keyId);return this.contentProtections.initData.map(i=>({type:i.type,keyIds:e,values:i.values}))}addProtectionData(e,r,n){let i=!1;if(this.contentProtections===void 0)return this.contentProtections={keyIds:r!==void 0?[{keyId:r}]:[],initData:[{type:e,values:n}]},!0;if(r!==void 0){let o=this.contentProtections.keyIds;if(o===void 0)this.contentProtections.keyIds=[{keyId:r}];else{let s=!1;for(let d of o)Ue(d.keyId,r)&&(s=!0);s||(k.warn("Manifest: found unanounced key id."),o.push({keyId:r}))}}let a=this.contentProtections.initData;for(let o=0;o0&&(this.trickModeTracks=n.map(c=>new t(c)));let o=e.representations,s=[],d;for(let c=0;cv);p.contentProtections.keyIds=y}f=i(p,{trackType:this.type,language:this.language,normalizedLanguage:this.normalizedLanguage,isClosedCaption:this.isClosedCaption,isDub:this.isDub,isAudioDescription:this.isAudioDescription,isSignInterpreted:this.isSignInterpreted})}f?(s.push(m),d===void 0&&(m.isSupported===!0?d=!0:m.isSupported===!1&&(d=!1))):k.debug("Filtering Representation due to representationFilter",this.type,`Adaptation: ${this.id}`,`Representation: ${m.id}`,`(${m.bitrate})`)}s.sort((c,m)=>c.bitrate-m.bitrate),this.representations=s,this.isSupported=d,this.manuallyAdded=a===!0}refreshCodecSupport(e){for(let r of this.representations)r.isSupported===void 0&&(r.refreshCodecSupport(e),this.isSupported!==!0&&r.isSupported===!0?this.isSupported=!0:this.isSupported===void 0&&r.isSupported===!1&&(this.isSupported=!1))}getRepresentation(e){return ce(this.representations,({id:r})=>e===r)}getMetadataSnapshot(){let e=[],r=this.representations;for(let n of r)e.push(n.getMetadataSnapshot());return{id:this.id,type:this.type,isSupported:this.isSupported,language:this.language,isForcedSubtitles:this.isForcedSubtitles,isClosedCaption:this.isClosedCaption,isAudioDescription:this.isAudioDescription,isSignInterpreted:this.isSignInterpreted,normalizedLanguage:this.normalizedLanguage,representations:e,label:this.label,isDub:this.isDub}}};u();l();u();l();u();l();function ve(t,e,r){if(typeof Array.prototype.includes=="function")return t.includes(e,r);let n=t.length>>>0;if(n===0)return!1;let i=r|0,a=i>=0?Math.min(i,n-1):Math.max(n+i,0),o=(s,d)=>s===d||typeof s=="number"&&typeof d=="number"&&isNaN(s)&&isNaN(d);for(;at[e])}var Ad=typeof Object.values=="function"?Object.values:xd;var Yi=["audio","video","text"];function mu(t){var a,o;let e=t.timeBounds;if(e.timeshiftDepth===null)return(a=e.minimumSafePosition)!=null?a:0;let{maximumTimeData:r}=e,n;if(!e.maximumTimeData.isLinear)n=r.maximumSafePosition;else{let s=re()-r.time;n=r.maximumSafePosition+s/1e3}let i=n-e.timeshiftDepth;return Math.max((o=e.minimumSafePosition)!=null?o:0,i)}function pu(t){let{maximumTimeData:e}=t.timeBounds;if(!t.isLive||e.livePosition===void 0)return;if(!e.isLinear)return e.livePosition;let r=re()-e.time;return e.livePosition+r/1e3}function Qi(t){let{maximumTimeData:e}=t.timeBounds;if(!e.isLinear)return e.maximumSafePosition;let r=re()-e.time;return e.maximumSafePosition+r/1e3}function Si(t,e){if(e===void 0)return mA(t).filter(n=>n.isSupported===!0);let r=t.adaptations[e];return r===void 0?[]:r.filter(n=>n.isSupported===!0)}function BS(t,e){let r=null;for(let n=t.periods.length-1;n>=0;n--){let i=t.periods[n];if(fA(i,e,r))return i;r=i}}function US(t,e){let r=e.end;if(r===void 0)return null;let n=ce(t.periods,i=>i.end===void 0||r=t.start&&(t.end===void 0||et.end)}function mA(t){let e=t.adaptations;return xd(e).reduce((r,n)=>w(n)?r:r.concat(n),[])}function FS(t,e){var n,i;let r={language:(n=t.language)!=null?n:"",normalized:(i=t.normalizedLanguage)!=null?i:"",audioDescription:t.isAudioDescription===!0,id:t.id,representations:(e?t.representations.filter(a=>a.isSupported===!0&&a.decipherable!==!1):t.representations).map($2e),label:t.label};return t.isDub===!0&&(r.dub=!0),r}function KS(t){var e,r;return{language:(e=t.language)!=null?e:"",normalized:(r=t.normalizedLanguage)!=null?r:"",closedCaption:t.isClosedCaption===!0,id:t.id,label:t.label,forced:t.isForcedSubtitles}}function zS(t,e){let r=t.trickModeTracks!==void 0?t.trickModeTracks.map(i=>{let a=(e?i.representations.filter(s=>s.isSupported===!0&&s.decipherable!==!1):i.representations).map(KX),o={id:i.id,representations:a,isTrickModeTrack:!0};return i.isSignInterpreted===!0&&(o.signInterpreted=!0),o}):void 0,n={id:t.id,representations:(e?t.representations.filter(i=>i.isSupported===!0&&i.decipherable!==!1):t.representations).map(KX),label:t.label};return t.isSignInterpreted===!0&&(n.signInterpreted=!0),t.isTrickModeTrack===!0&&(n.isTrickModeTrack=!0),r!==void 0&&(n.trickModeTracks=r),n}function $2e(t){let{id:e,bitrate:r,codecs:n,isSpatialAudio:i,isSupported:a,decipherable:o}=t;return{id:e,bitrate:r,codec:n==null?void 0:n[0],isSpatialAudio:i,isCodecSupported:a,decipherable:o}}function KX(t){let{id:e,bitrate:r,frameRate:n,width:i,height:a,codecs:o,hdrInfo:s,isSupported:d,decipherable:c}=t;return{id:e,bitrate:r,frameRate:n,width:i,height:a,codec:o==null?void 0:o[0],hdrInfo:s,isCodecSupported:d,decipherable:c}}function jo(t){switch(t.type){case"audio":return{type:"audio",track:FS(t,!1)};case"video":return{type:"video",track:zS(t,!1)};case"text":return{type:"text",track:KS(t)}}}function zX(t,e){let{whitelistedKeyIds:r,blacklistedKeyIds:n,delistedKeyIds:i}=e;return VX(t,a=>{if(a.contentProtections===void 0)return a.decipherable;let o=a.contentProtections.keyIds;if(o!==void 0)for(let s of o){for(let d of n)if(Ue(d,s.keyId))return!1;for(let d of r)if(Ue(d,s.keyId))return!0;for(let d of i)if(Ue(d,s.keyId))return}return a.decipherable})}function jX(t,e){return VX(t,r=>{var i,a;if(r.decipherable===!1)return!1;let n=(a=(i=r.contentProtections)==null?void 0:i.initData)!=null?a:[];for(let o of n)if((e.type===void 0||o.type===e.type)&&e.values.getFormattedValues().every(d=>o.values.some(c=>(d.systemId===void 0||c.systemId===d.systemId)&&Ue(c.data,d.data))))return!1;return r.decipherable})}function VX(t,e){let r=[];for(let n of t.periods){let i=n.adaptations,a=xd(i).reduce((o,s)=>w(s)?o:o.concat(s),[]);for(let o of a)for(let s of o.representations){let d=e(s);d!==s.decipherable&&(r.push({manifest:t,period:n,adaptation:o,representation:s}),s.decipherable=d)}}return r}function HX(t,e,r){var n,i;for(let a of Object.keys(e))a!=="periods"&&(t[a]=e[a]);for(let a of r.removedPeriods)for(let o=0;oa.start){t.periods.splice(o,0,a);break}t.periods.push(a)}}function GX(t){return new Function(`return (${t}(arguments[0], arguments[1]))`)}u();l();var Ym=class{constructor(e,r,n){if(this.id=e.id,this.adaptations=Object.keys(e.adaptations).reduce((i,a)=>{let o=e.adaptations[a];if(w(o))return i;let s=o.map(d=>{let c=new $m(d,{representationFilter:n});return c.representations.length>0&&c.isSupported===!1&&r.push(c),c}).filter(d=>d.representations.length>0);if(s.every(d=>d.isSupported===!1)&&o.length>0&&(a==="video"||a==="audio"))throw new he("MANIFEST_INCOMPATIBLE_CODECS_ERROR","No supported "+a+" adaptations",{tracks:void 0});return s.length>0&&(i[a]=s),i},{}),!Array.isArray(this.adaptations.video)&&!Array.isArray(this.adaptations.audio))throw new he("MANIFEST_PARSE_ERROR","No supported audio and video tracks.");this.duration=e.duration,this.start=e.start,!w(this.duration)&&!w(this.start)&&(this.end=this.start+this.duration),this.streamEvents=e.streamEvents===void 0?[]:e.streamEvents}refreshCodecSupport(e,r){Object.keys(this.adaptations).forEach(n=>{let i=this.adaptations[n];if(i===void 0)return;let a=!1;for(let o of i){let s=o.isSupported;o.refreshCodecSupport(e),s!==!1&&o.isSupported===!1&&r.push(o),a===!1?a=o.isSupported:a===void 0&&o.isSupported===!0&&(a=!0)}if((n==="video"||n==="audio")&&a===!1)throw new he("MANIFEST_INCOMPATIBLE_CODECS_ERROR","No supported "+n+" adaptations",{tracks:void 0})},{})}getAdaptations(){return mA(this)}getAdaptationsForType(e){let r=this.adaptations[e];return r!=null?r:[]}getAdaptation(e){return ce(this.getAdaptations(),({id:r})=>e===r)}getSupportedAdaptations(e){return Si(this,e)}containsTime(e,r){return fA(this,e,r)}getMetadataSnapshot(){let e={},r=this.getAdaptations();for(let n of r){let i=e[n.type];i===void 0&&(i=[],e[n.type]=i),i.push(n.getMetadataSnapshot())}return{start:this.start,end:this.end,id:this.id,streamEvents:this.streamEvents,adaptations:e}}};u();l();u();l();function Qm(t,e,r){let n={updatedAdaptations:[],removedAdaptations:[],addedAdaptations:[]};t.start=e.start,t.end=e.end,t.duration=e.duration,t.streamEvents=e.streamEvents;let i=t.getAdaptations(),a=e.getAdaptations();for(let o=0;oc.id===s.id);if(d===-1){k.warn('Manifest: Adaptation "'+i[o].id+'" not found when merging.');let[c]=i.splice(o,1);o--,n.removedAdaptations.push({id:c.id,trackType:c.type})}else{let[c]=a.splice(d,1),m=[],f=[],p=[];n.updatedAdaptations.push({adaptation:s.id,trackType:s.type,updatedRepresentations:m,addedRepresentations:f,removedRepresentations:p});let y=s.representations,v=c.representations.slice();for(let b=0;bI.id===T.id);if(S===-1){k.warn(`Manifest: Representation "${y[b].id}" not found when merging.`);let[I]=y.splice(b,1);b--,p.push(I.id)}else{let[I]=v.splice(S,1);m.push(T.getMetadataSnapshot()),T.cdnMetadata=I.cdnMetadata,r===0?T.index._replace(I.index):T.index._update(I.index)}}v.length>0&&(k.warn(`Manifest: ${v.length} new Representations found when merging.`),s.representations.push(...v),f.push(...v.map(b=>b.getMetadataSnapshot())))}}if(a.length>0){k.warn(`Manifest: ${a.length} new Adaptations found when merging.`);for(let o of a){let s=t.adaptations[o.type];s===void 0?t.adaptations[o.type]=[o]:s.push(o),n.addedAdaptations.push(o.getMetadataSnapshot())}}return n}function WX(t,e){let r={updatedPeriods:[],addedPeriods:[],removedPeriods:[]},n=0;for(let a=0;a({id:y.id,start:y.start,end:y.end}))),r.addedPeriods.push(...m.map(y=>y.getMetadataSnapshot())),n=a+1}}if(n>t.length)return k.error("Manifest: error when updating Periods"),r;if(n({id:o.id,start:o.start,end:o.end})))}let i=e.slice(n,e.length);return i.length>0&&(t.push(...i),r.addedPeriods.push(...i.map(a=>a.getMetadataSnapshot()))),r}function $X(t,e){let r={updatedPeriods:[],addedPeriods:[],removedPeriods:[]};if(t.length===0)return t.splice(0,0,...e),r.addedPeriods.push(...e.map(s=>s.getMetadataSnapshot())),r;if(e.length===0)return r;let n=t[t.length-1];if(n.starts.getMetadataSnapshot())),r}let i=et(t,({id:s})=>s===e[0].id);if(i<0)throw new he("MANIFEST_UPDATE_ERROR","Cannot perform partial update: incoherent data");let a=Qm(t[i],e[0],1);r.updatedPeriods.push({period:le(t[i].getMetadataSnapshot(),{adaptations:void 0}),result:a});let o=i+1;for(let s=1;s({id:y.id,start:y.start,end:y.end})))}else{if(c>o){k.warn("Manifest: old Periods not found in new when updating, removing");let f=t.splice(o,c-o);r.removedPeriods.push(...f.map(p=>({id:p.id,start:p.start,end:p.end}))),c=o}let m=Qm(t[c],d,0);r.updatedPeriods.push({period:le(t[c].getMetadataSnapshot(),{adaptations:void 0}),result:m})}o++}if(o({id:d.id,start:d.start,end:d.end})))}return r}var Y2e=Dt(),Xm=class extends Me{constructor(e,r,n){var s;super();let{representationFilter:i,manifestUpdateUrl:a}=r;this.manifestFormat=0,this.id=Y2e(),this.expired=(s=e.expired)!=null?s:null,this.transport=e.transportType,this.clockOffset=e.clockOffset;let o=[];if(this.periods=e.periods.map(d=>new Ym(d,o,i)).sort((d,c)=>d.start-c.start),o.length>0){let d=new he("MANIFEST_INCOMPATIBLE_CODECS_ERROR","An Adaptation contains only incompatible codecs.",{tracks:o.map(jo)});n.push(d)}this.adaptations=this.periods[0]===void 0?{}:this.periods[0].adaptations,this.timeBounds=e.timeBounds,this.isDynamic=e.isDynamic,this.isLive=e.isLive,this.isLastPeriodKnown=e.isLastPeriodKnown,this.uris=e.uris===void 0?[]:e.uris,this.updateUrl=a,this.lifetime=e.lifetime,this.clockOffset=e.clockOffset,this.suggestedPresentationDelay=e.suggestedPresentationDelay,this.availabilityStartTime=e.availabilityStartTime,this.publishTime=e.publishTime}refreshCodecSupport(e){let r=[];for(let n of this.periods)n.refreshCodecSupport(e,r);return r.length>0?new he("MANIFEST_INCOMPATIBLE_CODECS_ERROR","An Adaptation contains only incompatible codecs.",{tracks:r.map(jo)}):null}getPeriod(e){return ce(this.periods,r=>e===r.id)}getPeriodForTime(e){return BS(this,e)}getNextPeriod(e){return ce(this.periods,r=>r.start>e)}getPeriodAfter(e){return US(this,e)}getUrls(){return this.uris}replace(e){this._performUpdate(e,0)}update(e){this._performUpdate(e,1)}getMinimumSafePosition(){return mu(this)}getLivePosition(){return pu(this)}getMaximumSafePosition(){return Qi(this)}updateRepresentationsDeciperability(e){let r=Q2e(this,e);r.length>0&&this.trigger("decipherabilityUpdate",r)}getAdaptations(){La("manifest.getAdaptations() is deprecated. Please use manifest.period[].getAdaptations() instead");let e=this.periods[0];if(e===void 0)return[];let r=e.adaptations,n=[];for(let i in r)if(r.hasOwnProperty(i)){let a=r[i];n.push(...a)}return n}getAdaptationsForType(e){La("manifest.getAdaptationsForType(type) is deprecated. Please use manifest.period[].getAdaptationsForType(type) instead");let r=this.periods[0];if(r===void 0)return[];let n=r.adaptations[e];return n===void 0?[]:n}getAdaptation(e){return La("manifest.getAdaptation(id) is deprecated. Please use manifest.period[].getAdaptation(id) instead"),ce(this.getAdaptations(),({id:r})=>e===r)}getMetadataSnapshot(){let e=[];for(let r of this.periods)e.push(r.getMetadataSnapshot());return{manifestFormat:1,id:this.id,periods:e,isDynamic:this.isDynamic,isLive:this.isLive,isLastPeriodKnown:this.isLastPeriodKnown,suggestedPresentationDelay:this.suggestedPresentationDelay,clockOffset:this.clockOffset,uris:this.uris,availabilityStartTime:this.availabilityStartTime,timeBounds:this.timeBounds}}_performUpdate(e,r){this.availabilityStartTime=e.availabilityStartTime,this.expired=e.expired,this.isDynamic=e.isDynamic,this.isLive=e.isLive,this.isLastPeriodKnown=e.isLastPeriodKnown,this.lifetime=e.lifetime,this.clockOffset=e.clockOffset,this.suggestedPresentationDelay=e.suggestedPresentationDelay,this.transport=e.transport,this.publishTime=e.publishTime;let n;if(r===0)this.timeBounds=e.timeBounds,this.uris=e.uris,n=WX(this.periods,e.periods);else{this.timeBounds.maximumTimeData=e.timeBounds.maximumTimeData,this.updateUrl=e.uris[0],n=$X(this.periods,e.periods);let i=this.getMinimumSafePosition();for(;this.periods.length>0;){let a=this.periods[0];if(a.end===void 0||a.end>i)break;this.periods.shift()}}this.adaptations=this.periods[0]===void 0?{}:this.periods[0].adaptations,this.trigger("manifestUpdate",n)}};function Q2e(t,e){let r=[];for(let n of t.periods)for(let i of n.getAdaptations())for(let a of i.representations){let o={manifest:t,period:n,adaptation:i,representation:a},s=e(o);s!==a.decipherable&&(r.push(o),a.decipherable=s,k.debug(`Decipherability changed for "${a.id}"`,`(${a.bitrate})`,String(a.decipherable)))}return r}u();l();u();l();var gu=class{constructor(e){this._url=e.media}getInitSegment(){return null}getSegments(){return[{id:"0",isInit:!1,number:0,url:this._url,time:0,end:Number.MAX_VALUE,duration:Number.MAX_VALUE,complete:!0,privateInfos:{},timescale:1}]}getFirstAvailablePosition(){}getLastAvailablePosition(){}getEnd(){}awaitSegmentBetween(){return!1}shouldRefresh(){return!1}checkDiscontinuity(){return null}isSegmentStillAvailable(){return!0}canBeOutOfSyncError(){return!1}isStillAwaitingFutureSegments(){return!1}isInitialized(){return!0}initialize(){k.error("A `StaticRepresentationIndex` does not need to be initialized")}addPredictedSegments(){k.warn("Cannot add predicted segments to a `StaticRepresentationIndex`")}_replace(){k.warn("Tried to replace a static RepresentationIndex")}_update(){k.warn("Tried to update a static RepresentationIndex")}};u();l();function Na(t,e){return t.segment.id===e.segment.id&&t.representation.uniqueId===e.representation.uniqueId}function hu(t){if(w(t))return"";let{period:e,adaptation:r,representation:n,segment:i}=t,a;return i.isInit?a="init":i.complete?a=`${i.time}-${i.duration}`:a=`${i.time}`,`${r.type} P: ${e.id} A: ${r.id} R: ${n.id} S: ${a}`}var Xi=Xm;u();l();u();l();var X2e=zm,pA=X2e;u();l();var Z2e=.016666666666666666;function YX(t,e){return Math.abs(t-e)=0;r--){let n=t.start(r);if(e>=n){let i=t.end(r);if(e=0;r--){let n=t[r].start;if(e>=n){let i=t[r].end;if(e=o?n.push({start:a,end:o}):r={start:a,end:o}}return{outerRanges:n,innerRange:r}}function rZ(t,e){let r=hA(t,e);return r!==null?r.end-e:1/0}function jS(t,e){let r=tze(t,e);return r!==null?r.end-e:1/0}function Vo(t,e){if(e.start===e.end)return t;let r=e,n=0;for(;n0)for(let o=0;o0)for(let s=0;ss&&r.push({start:s,end:a[d].start}),s=a[d].end;s{this.cancel()});return this.signal.register(r),r}cancel(e){if(this._isUsed)return;this._isUsed=!0;let r=e!=null?e:new yt;this._trigger(r)}static isCancellationError(e){return e instanceof yt}},Zm=class{constructor(e){this._isCancelled=!1,this.cancellationError=null,this._listeners=[],e(r=>{for(this.cancellationError=r,this._isCancelled=!0;this._listeners.length>0;)try{let n=this._listeners.pop();n==null||n(r)}catch(n){k.error("Error while calling clean up listener",n instanceof Error?n.toString():"Unknown error")}})}isCancelled(){return this._isCancelled}register(e){return this._isCancelled?(be(this.cancellationError!==null),e(this.cancellationError),ye):(this._listeners.push(e),()=>this.deregister(e))}deregister(e){for(let r=this._listeners.length-1;r>=0;r--)this._listeners[r]===e&&this._listeners.splice(r,1)}},yt=class t extends Error{constructor(){let e="This task was cancelled.";super(e),Object.setPrototypeOf(this,t.prototype),this.name="CancellationError"}};function rze(){let t=ye;return[function(r){t(r)},function(r){t=r}]}u();l();function GS(t,e,r){let n=e(t.getReference(),r);return{getCurrentTime(){return t.getCurrentTime()},getReadyState(){return t.getReadyState()},getPlaybackRate(){return t.getPlaybackRate()},getIsPaused(){return t.getIsPaused()},getReference(){return n},listen(i,a){var o;r.isCancelled()||((o=a==null?void 0:a.clearSignal)==null?void 0:o.isCancelled())===!0||n.onUpdate(i,{clearSignal:a==null?void 0:a.clearSignal,emitCurrentValue:a==null?void 0:a.includeLastObservation})},deriveReadOnlyObserver(i){return GS(this,i,r)}}}u();l();var Pd=class{constructor(e,r){this._last=e,this._wanted=r}serialize(){return[this._last,this._wanted]}getPolled(){return this._last}getWanted(){var e;return(e=this._wanted)!=null?e:this._last}forceWantedPosition(e){this._wanted=e}isAwaitingFuturePosition(){return this._wanted!==null}};var nze=["canplay","ended","play","pause","seeking","seeked","loadedmetadata","ratechange"],Jm=class{constructor(e,r){this._internalSeeksIncoming=[],this._mediaElement=e,this._withMediaSource=r.withMediaSource,this._lowLatencyMode=r.lowLatencyMode,this._canceller=new X,this._observationRef=this._createSharedReference(),this._expectedSeekingPosition=null,this._pendingSeek=null;let n=()=>{if(this._pendingSeek!==null){let i=this._pendingSeek;this._pendingSeek=null,this._actuallySetCurrentTime(i)}};e.addEventListener("loadedmetadata",n),this._canceller.signal.register(()=>{e.removeEventListener("loadedmetadata",n)})}stop(){this._canceller.cancel()}getCurrentTime(){return this._mediaElement.currentTime}getPlaybackRate(){return this._mediaElement.playbackRate}getIsPaused(){return this._mediaElement.paused}setCurrentTime(e){this._mediaElement.readyState>=1?this._actuallySetCurrentTime(e):(this._internalSeeksIncoming=[],this._pendingSeek=e,this._generateObservationForEvent("manual"))}setPlaybackRate(e){this._mediaElement.playbackRate=e}getReadyState(){return this._mediaElement.readyState}getReference(){return this._observationRef}listen(e,r){var n;if(this._canceller.isUsed()||((n=r==null?void 0:r.clearSignal)==null?void 0:n.isCancelled())===!0)return ye;this._observationRef.onUpdate(e,{clearSignal:r==null?void 0:r.clearSignal,emitCurrentValue:r==null?void 0:r.includeLastObservation})}deriveReadOnlyObserver(e){return GS(this,e,this._canceller.signal)}_actuallySetCurrentTime(e){k.info("API: Seeking internally",e),this._internalSeeksIncoming.push(e),this._mediaElement.currentTime=e}_createSharedReference(){if(this._observationRef!==void 0)return this._observationRef;let{SAMPLING_INTERVAL_MEDIASOURCE:e,SAMPLING_INTERVAL_LOW_LATENCY:r,SAMPLING_INTERVAL_NO_MEDIASOURCE:n}=Q.getCurrent(),i=new oe(this._getCurrentObservation("init"),this._canceller.signal),a;this._lowLatencyMode?a=r:this._withMediaSource?a=e:a=n;let o=()=>{this._generateObservationForEvent("timeupdate")},s=setInterval(o,a),d=nze.map(m=>{let f=()=>{c(),this._generateObservationForEvent(m)};return this._mediaElement.addEventListener(m,f),()=>{this._mediaElement.removeEventListener(m,f)}});return this._canceller.signal.register(()=>{clearInterval(s),d.forEach(m=>m()),i.finish()}),i;function c(){clearInterval(s),s=setInterval(o,a)}}_getCurrentObservation(e){var I,E;let r=e,n=this._observationRef===void 0?uze(this._mediaElement):this._observationRef.getValue(),i=!1,a=this._pendingSeek,o=sZ(this._mediaElement),{buffered:s,readyState:d,position:c,seeking:m}=o;if(r==="seeking")if(this._internalSeeksIncoming.length>0){i=!0,r="internal-seeking";let R=this._internalSeeksIncoming.shift();this._expectedSeekingPosition=pA?Math.max(c,R!=null?R:0):c}else this._expectedSeekingPosition=c;else m?this._expectedSeekingPosition=Math.max(c,(I=this._expectedSeekingPosition)!=null?I:0):pA&&this._expectedSeekingPosition!==null&&c=3?(p=void 0,y=void 0):(p=hA(s,f),y=p!==null?p.end-f:1/0);let v=aze({previousObservation:n,currentObservation:o,basePosition:f,observationEvent:r,lowLatencyMode:this._lowLatencyMode,withMediaSource:this._withMediaSource,bufferGap:y,currentRange:p}),b=oze(n,o,r,y),T;i?T=1:m?T=2:T=0;let S=le({},o,{position:new Pd(o.position,a),event:r,seeking:T,rebuffering:v,freezing:b,bufferGap:y,currentRange:p});return k.hasLevel("DEBUG")&&k.debug("API: current media element state tick","event",S.event,"position",S.position.getPolled(),"seeking",S.seeking,"internalSeek",i,"rebuffering",S.rebuffering!==null,"freezing",S.freezing!==null,"ended",S.ended,"paused",S.paused,"playbackRate",S.playbackRate,"readyState",S.readyState,"pendingPosition",a),S}_generateObservationForEvent(e){let r=this._getCurrentObservation(e);k.hasLevel("DEBUG")&&k.debug(`API: current playback timeline: +`+sze(r.buffered,r.position.getPolled()),` +${e}`),this._observationRef.setValue(r)}};function oZ(t,e){if(t===null)return 0;let r=e?"LOW_LATENCY":"DEFAULT",{RESUME_GAP_AFTER_SEEKING:n,RESUME_GAP_AFTER_NOT_ENOUGH_DATA:i,RESUME_GAP_AFTER_BUFFERING:a}=Q.getCurrent();switch(t.reason){case"seeking":return n[r];case"not-ready":return i[r];case"buffering":return a[r]}}function ize(t,e,r,n,i){let{REBUFFERING_GAP:a}=Q.getCurrent(),o=i?"LOW_LATENCY":"DEFAULT";return e===void 0?r&&Math.abs(n-t)<=a[o]:e!==null&&n-e.end<=a[o]}function sZ(t){let{buffered:e,currentTime:r,duration:n,ended:i,paused:a,playbackRate:o,readyState:s,seeking:d}=t;return{buffered:e,position:r,duration:n,ended:i,paused:a,playbackRate:o,readyState:s,seeking:d}}function aze({previousObservation:t,currentObservation:e,basePosition:r,observationEvent:n,withMediaSource:i,lowLatencyMode:a,bufferGap:o,currentRange:s}){let{REBUFFERING_GAP:d}=Q.getCurrent(),{position:c,duration:m,paused:f,readyState:p,ended:y}=e,{rebuffering:v,event:b,position:T}=t,S=ize(r,s,y,m,a),I=p>=1&&n!=="loadedmetadata"&&v===null&&!(S||y),E=null,R,M,C=a?d.LOW_LATENCY:d.DEFAULT;if(i){if(I)o===1/0?(R=!0,E=r):o===void 0?p<3&&(R=!0,E=void 0):o<=C&&(R=!0,E=r+o);else if(v!==null){let A=oZ(v,a);R!==!0&&v!==null&&p>1&&(S||y||o!==void 0&&isFinite(o)&&o>A)||o===void 0&&p>=3?M=!0:o===void 0?E=void 0:o===1/0?E=r:o<=A&&(E=r+o)}}else I&&(!f&&n==="timeupdate"&&b==="timeupdate"&&c===T.getPolled()||n==="seeking"&&(o===1/0||o===void 0&&p<3))?R=!0:v!==null&&(n!=="seeking"&&c!==T.getPolled()||n==="canplay"||o===void 0&&p>=3||o!==void 0&&o<1/0&&(o>oZ(v,a)||S||y))&&(M=!0);if(M===!0)return null;if(R===!0||v!==null){let A;return n==="seeking"||v!==null&&v.reason==="seeking"||e.seeking?A="seeking":p===1?A="not-ready":A="buffering",v!==null&&v.reason===A?{reason:v.reason,timestamp:v.timestamp,position:E}:{reason:A,timestamp:re(),position:E}}return null}function oze(t,e,r,n){let{MINIMUM_BUFFER_AMOUNT_BEFORE_FREEZING:i}=Q.getCurrent();return t.freezing?e.ended||e.paused||e.readyState===0||e.playbackRate===0||t.position.getPolled()!==e.position?null:t.freezing:r==="timeupdate"&&n!==void 0&&n>i&&!e.ended&&!e.paused&&e.readyState>=1&&e.playbackRate!==0&&e.position===t.position.getPolled()?{timestamp:re()}:null}function sze(t,e){let r="",n="";for(let i=0;ie){let f=r.length-Math.floor(m.length/2);n=" ".repeat(f)+`^${e}`}if(i{setTimeout(e,t)})}u();l();function vA(){return jm}function ep(t,e,r){let n=t.setMediaKeys(e,r).then(()=>{k.info("Compat: MediaKeys updated with success")}).catch(i=>{if(r===null){k.error("Compat: Could not reset MediaKeys",i instanceof Error?i:"Unknown Error");return}throw k.error("Compat: Could not update MediaKeys",i instanceof Error?i:"Unknown Error"),i});return vA()?n:Promise.race([n,yu(1e3)])}u();l();var bA=new WeakMap,Tr={setState(t,e){bA.set(t,e)},getState(t){let e=bA.get(t);return e===void 0?null:e},clearState(t){bA.set(t,null)}};async function Od(t){let e=Tr.getState(t);if(e===null)return;k.info("DRM: Disposing of the current MediaKeys");let{loadedSessionsStore:r}=e;return Tr.clearState(t),await r.closeAllSessions(),ep(e.emeImplementation,t,null)}function WS(t){if(k.info("DRM: Clearing-up DRM session."),yA())return k.info("DRM: disposing current MediaKeys."),Od(t);let e=Tr.getState(t);return e!==null&&e.keySystemOptions.closeSessionsOnStop===!0?(k.info("DRM: closing all current sessions."),e.loadedSessionsStore.closeAllSessions()):(k.info("DRM: Nothing to clear. Returning right away. No state =",e===null),Promise.resolve())}u();l();u();l();u();l();u();l();u();l();function nn(t,e){let r;return new Promise((n,i)=>{if(t.cancellationError!==null)return i(t.cancellationError);let a=!1;r=e(function(d){t.deregister(o),a=!0,n(d)},function(d){t.deregister(o),a=!0,i(d)}),a||t.register(o);function o(s){r!==void 0&&r(),i(s)}})}function Ho(t,e){return nn(e,r=>{let n=setTimeout(()=>r(),t);return()=>clearTimeout(n)})}function $S(t){let e=new X;return Promise.race([t.close().then(()=>{e.cancel()}),t.closed.then(()=>{e.cancel()}),r()]);async function r(){try{await Ho(1e3,e.signal),await n()}catch(i){if(i instanceof yt)return;let a=i instanceof Error?i.message:"Unknown error made it impossible to close the session";k.error(`DRM: ${a}`)}}async function n(){try{await t.update(new Uint8Array(1))}catch(i){if(e.isUsed()||i instanceof Error&&i.message==="The session is already closed.")return;await Ho(1e3,e.signal)}if(!e.isUsed())throw new Error("Compat: Couldn't know if session is closed")}}u();l();u();l();u();l();var Ti,{WebKitMediaKeys:YS}=Ae;YS!==void 0&&typeof YS.isTypeSupported=="function"&&typeof YS.prototype.createSession=="function"&&typeof HTMLMediaElement.prototype.webkitSetMediaKeys=="function"&&(Ti=YS);function SA(){return(Jx||su)&&Ti!==void 0}u();l();var tp=class{constructor(e,r,n){this._keyType=e;this._mediaKeys=r;this._configuration=n}get keySystem(){return this._keyType}createMediaKeys(){return new Promise(e=>e(this._mediaKeys))}getConfiguration(){return this._configuration}};u();l();u();l();function Da(t){try{let e=t();return typeof e=="object"&&e!==null&&typeof e.then=="function"?e:Promise.resolve(e)}catch(e){return Promise.reject(e)}}u();l();var qa,{MSMediaKeys:rp}=Ae;rp!==void 0&&rp.prototype!==void 0&&typeof rp.isTypeSupported=="function"&&typeof rp.prototype.createSession=="function"&&(qa=rp);var IA=class extends Me{constructor(e){super(),this.expiration=NaN,this.keyStatuses=new Map,this._mk=e,this._sessionClosingCanceller=new X,this.closed=new Promise(r=>{this._sessionClosingCanceller.signal.register(()=>r())}),this.update=r=>new Promise((n,i)=>{if(this._ss===void 0)return i("MediaKeySession not set.");try{n(this._ss.update(r,""))}catch(a){i(a)}})}generateRequest(e,r){return new Promise(n=>{let i;r instanceof Uint8Array?i=r:r instanceof ArrayBuffer?i=new Uint8Array(r):i=new Uint8Array(r.buffer),this._ss=this._mk.createSession("video/mp4",i),LS(this._ss,a=>{var o;this.trigger((o=a.type)!=null?o:"message",a)},this._sessionClosingCanceller.signal),xX(this._ss,a=>{var o;this.trigger((o=a.type)!=null?o:"keyadded",a)},this._sessionClosingCanceller.signal),NS(this._ss,a=>{var o;this.trigger((o=a.type)!=null?o:"keyerror",a)},this._sessionClosingCanceller.signal),n()})}close(){return new Promise(e=>{w(this._ss)||(this._ss.close(),this._ss=void 0),this._sessionClosingCanceller.cancel(),e()})}load(){return Promise.resolve(!1)}remove(){return Promise.resolve()}get sessionId(){var e,r;return(r=(e=this._ss)==null?void 0:e.sessionId)!=null?r:""}},QS=class{constructor(e){if(qa===void 0)throw new Error("No MSMediaKeys API.");this._mediaKeys=new qa(e)}_setVideo(e){return Da(()=>{this._videoElement=e,this._videoElement.msSetMediaKeys!==void 0&&this._videoElement.msSetMediaKeys(this._mediaKeys)})}createSession(){if(this._videoElement===void 0||this._mediaKeys===void 0)throw new Error("Video not attached to the MediaKeys");return new IA(this._mediaKeys)}setServerCertificate(){throw new Error("Server certificate is not implemented in your browser")}};function TA(){return{isTypeSupported:(n,i)=>{if(qa===void 0)throw new Error("No MSMediaKeys API.");return i!==void 0?qa.isTypeSupported(n,i):qa.isTypeSupported(n)},createCustomMediaKeys:n=>new QS(n),setMediaKeys:(n,i)=>{if(i===null)return Promise.resolve(void 0);if(!(i instanceof QS))throw new Error("Custom setMediaKeys is supposed to be called with IE11 custom MediaKeys.");return i._setVideo(n)}}}u();l();var Go,{MozMediaKeys:np}=Ae;np!==void 0&&np.prototype!==void 0&&typeof np.isTypeSupported=="function"&&typeof np.prototype.createSession=="function"&&(Go=np);function kA(){return{isTypeSupported:(n,i)=>{if(Go===void 0)throw new Error("No MozMediaKeys API.");return i!==void 0?Go.isTypeSupported(n,i):Go.isTypeSupported(n)},createCustomMediaKeys:n=>{if(Go===void 0)throw new Error("No MozMediaKeys API.");return new Go(n)},setMediaKeys:(n,i)=>Da(()=>{let a=n;if(a.mozSetMediaKeys===void 0||typeof a.mozSetMediaKeys!="function")throw new Error("Can't set video on MozMediaKeys.");return a.mozSetMediaKeys(i)})}}u();l();u();l();var Ba=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],uZ=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function XS(t){if(t>=uZ.length)throw new Error("Unable to parse base64 string.");let e=uZ[t];if(e===255)throw new Error("Unable to parse base64 string.");return e}function ZS(t){let e="",r,n=t.length;for(r=2;r>2],e+=Ba[(t[r-2]&3)<<4|t[r-1]>>4],e+=Ba[(t[r-1]&15)<<2|t[r]>>6],e+=Ba[t[r]&63];return r===n+1&&(e+=Ba[t[r-2]>>2],e+=Ba[(t[r-2]&3)<<4],e+="=="),r===n&&(e+=Ba[t[r-2]>>2],e+=Ba[(t[r-2]&3)<<4|t[r-1]>>4],e+=Ba[(t[r-1]&15)<<2],e+="="),e}function ki(t){let e=t.length%4,r=t;e!==0&&(k.warn("base64ToBytes: base64 given miss padding"),r+=e===3?"=":e===2?"==":"===");let n=r.indexOf("=");if(n!==-1&&n>16,o[c+1]=s>>8&255,o[c+2]=s&255;return o.subarray(0,o.length-i)}u();l();var dZ=typeof Ae=="object"&&typeof Ae.TextDecoder=="function",lze=typeof Ae=="object"&&typeof Ae.TextEncoder=="function";function JS(t){let e=new ArrayBuffer(t.length*2),r=new Uint8Array(e);for(let n=0;n>8&255}return r}function eI(t){if(dZ)try{return new TextDecoder("utf-16le").decode(t)}catch(r){let n=r instanceof Error?r:"";k.warn("Utils: could not use TextDecoder to parse UTF-16LE, fallbacking to another implementation",n)}let e="";for(let r=0;r=e?r:new Array(e-r.length+1).join("0")+r}function lr(t){if(dZ)try{return new TextDecoder().decode(t)}catch(i){let a=i instanceof Error?i:"";k.warn("Utils: could not use TextDecoder to parse UTF-8, fallbacking to another implementation",a)}let e=t;e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3));let r=dze(e),n;if(typeof escape=="function")n=escape(r);else{let i=/[A-Za-z0-9*_\+-\.\/]/;n="";for(let a=0;a=256?"%u"+lZ(o,4):"%"+lZ(o,2)}}return decodeURIComponent(n)}function an(t){let e=t.length,r=new Uint8Array(e/2);for(let n=0,i=0;n>>4).toString(16),r+=(t[n]&15).toString(16),e.length>0&&n{this.trigger(i.type,i)};this.closed=new Promise(i=>{this._closeSession=()=>{["keymessage","message","keyadded","ready","keyerror","error"].forEach(a=>{e.removeEventListener(a,n),e.removeEventListener(`webkit${a}`,n)}),i()}}),["keymessage","message","keyadded","ready","keyerror","error"].forEach(i=>{e.addEventListener(i,n),e.addEventListener(`webkit${i}`,n)})}update(e){return new Promise((r,n)=>{try{if(this._key.indexOf("clearkey")>=0){let i=e instanceof ArrayBuffer?new Uint8Array(e):e,a=JSON.parse(lr(i)),o=ki(a.keys[0].k),s=ki(a.keys[0].kid);r(this._vid.webkitAddKey(this._key,o,s,""))}else r(this._vid.webkitAddKey(this._key,e,null,""))}catch(i){n(i)}})}generateRequest(e,r){return new Promise(n=>{this._vid.webkitGenerateKeyRequest(this._key,r),n()})}close(){return new Promise(e=>{this._closeSession(),e()})}load(){return Promise.resolve(!1)}remove(){return Promise.resolve()}},rI=class{constructor(e){this._keySystem=e}_setVideo(e){return Da(()=>{if(!RA(e))throw new Error("Video not attached to the MediaKeys");this._videoElement=e})}createSession(){if(w(this._videoElement))throw new Error("Video not attached to the MediaKeys");return new _A(this._videoElement,this._keySystem)}setServerCertificate(){throw new Error("Server certificate is not implemented in your browser")}};function MA(){return{isTypeSupported:function(n){let i=document.querySelector("video");return w(i)&&(i=document.createElement("video")),!w(i)&&typeof i.canPlayType=="function"?!!i.canPlayType("video/mp4",n):!1},createCustomMediaKeys:n=>new rI(n),setMediaKeys:(n,i)=>{if(i===null)return Promise.resolve(void 0);if(!(i instanceof rI))throw new Error("Custom setMediaKeys is supposed to be called with old webkit custom MediaKeys.");return i._setVideo(n)}}}u();l();u();l();function on(t,e,r){if(typeof String.prototype.startsWith=="function")return t.startsWith(e,r);let n=typeof r=="number"?Math.max(r,0):0;return t.substring(n,n+e.length)===e}u();l();u();l();function _e(...t){let e=t.length,r=-1,n=0,i;for(;++r0&&(a.set(i,o),o+=i.length);return a}function nI(t,e){return(t[e+0]<<8)+(t[e+1]<<0)}function CA(t,e){return t[e+0]*65536+t[e+1]*256+t[e+2]}function Te(t,e){return t[e+0]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]}function kr(t,e){return(t[e+0]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3])*4294967296+t[e+4]*16777216+t[e+5]*65536+t[e+6]*256+t[e+7]}function He(t){return new Uint8Array([t>>>8&255,t&255])}function ut(t){return new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,t&255])}function Wo(t){let e=t%4294967296,r=(t-e)/4294967296;return new Uint8Array([r>>>24&255,r>>>16&255,r>>>8&255,r&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255])}function cZ(t,e){return(t[e+0]<<0)+(t[e+1]<<8)}function fZ(t,e){return t[e+0]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216}function mZ(t){return new Uint8Array([t&255,t>>>8&255])}function ip(t){return new Uint8Array([t&255,t>>>8&255,t>>>16&255,t>>>24&255])}function wA(t,e){let r=t instanceof Uint8Array?t:new Uint8Array(t),n=e instanceof Uint8Array?e:new Uint8Array(e);if(fZ(r,0)+4!==r.length)throw new Error("Unsupported WebKit initData.");let a=eI(r),o=a.indexOf("skd://"),s=o>-1?a.substring(o+6):a,d=JS(s),c=0,m=new Uint8Array(r.byteLength+4+d.byteLength+4+n.byteLength);return m.set(r),c+=r.length,m.set(ip(d.byteLength),c),c+=4,m.set(d,c),c+=d.byteLength,m.set(ip(n.byteLength),c),c+=4,m.set(n,c),m}function cze(t){return on(t,"com.apple.fps")}function pZ(t,e){let r=t;return Da(()=>{if(r.webkitSetMediaKeys===void 0)throw new Error("No webKitMediaKeys API.");r.webkitSetMediaKeys(e)})}var xA=class extends Me{constructor(e,r,n){super(),this._serverCertificate=n,this._videoElement=e,this._keyType=r,this._unbindSession=ye,this._closeSession=ye,this.closed=new Promise(i=>{this._closeSession=i}),this.keyStatuses=new Map,this.expiration=NaN}update(e){return new Promise((r,n)=>{if(this._nativeSession===void 0||this._nativeSession.update===void 0||typeof this._nativeSession.update!="function")return n("Unavailable WebKit key session.");try{let i;e instanceof ArrayBuffer?i=new Uint8Array(e):e instanceof Uint8Array?i=e:i=new Uint8Array(e.buffer),r(this._nativeSession.update(i))}catch(i){n(i)}})}generateRequest(e,r){return new Promise(n=>{var s;let i=this._videoElement;if(((s=i.webkitKeys)==null?void 0:s.createSession)===void 0)throw new Error("No WebKitMediaKeys API.");let a;if(cze(this._keyType)){if(this._serverCertificate===void 0)throw new Error("A server certificate is needed for creating fairplay session.");a=wA(r,this._serverCertificate)}else a=r;let o=i.webkitKeys.createSession("video/mp4",a);if(o==null)throw new Error("Impossible to get the key sessions");this._listenEvent(o),this._nativeSession=o,n()})}close(){return new Promise((e,r)=>{if(this._unbindSession(),this._closeSession(),this._nativeSession===void 0){r("No session to close.");return}this._nativeSession.close(),e()})}load(){return Promise.resolve(!1)}remove(){return Promise.resolve()}get sessionId(){var e,r;return(r=(e=this._nativeSession)==null?void 0:e.sessionId)!=null?r:""}_listenEvent(e){this._unbindSession();let r=n=>{this.trigger(n.type,n)};["keymessage","message","keyadded","ready","keyerror","error"].forEach(n=>{e.addEventListener(n,r),e.addEventListener(`webkit${n}`,r)}),this._unbindSession=()=>{["keymessage","message","keyadded","ready","keyerror","error"].forEach(n=>{e.removeEventListener(n,r),e.removeEventListener(`webkit${n}`,r)})}}},iI=class{constructor(e){if(Ti===void 0)throw new Error("No WebKitMediaKeys API.");this._keyType=e,this._mediaKeys=new Ti(e)}_setVideo(e){if(this._videoElement=e,this._videoElement===void 0)throw new Error("Video not attached to the MediaKeys");return pZ(this._videoElement,this._mediaKeys)}createSession(){if(this._videoElement===void 0||this._mediaKeys===void 0)throw new Error("Video not attached to the MediaKeys");return new xA(this._videoElement,this._keyType,this._serverCertificate)}setServerCertificate(e){return this._serverCertificate=e,Promise.resolve()}};function aI(){if(Ti===void 0)throw new Error("No WebKitMediaKeys API.");return{isTypeSupported:Ti.isTypeSupported,createCustomMediaKeys:n=>new iI(n),setMediaKeys:(n,i)=>{if(i===null)return pZ(n,i);if(!(i instanceof iI))throw new Error("Custom setMediaKeys is supposed to be called with webkit custom MediaKeys.");return i._setVideo(n)}}}var fze=mze("auto"),gZ=fze;function mze(t){var a;let e,r,n=pze,i;if((t==="standard"||t==="auto"&&!SA())&&(Ko||!w(navigator.requestMediaKeySystemAccess)))e=(...o)=>navigator.requestMediaKeySystemAccess(...o),r=gt(["encrypted"]),i="standard";else{let o,s;if(t==="webkit"&&Ti!==void 0){r=gt(["needkey"]);let d=aI();o=d.isTypeSupported,s=d.createCustomMediaKeys,n=d.setMediaKeys,i="webkit"}else if(RA((a=Ae.HTMLVideoElement)==null?void 0:a.prototype)){r=gt(["needkey"]);let d=MA();o=d.isTypeSupported,s=d.createCustomMediaKeys,n=d.setMediaKeys,i="older-webkit"}else if(Ti!==void 0){r=gt(["needkey"]);let d=aI();o=d.isTypeSupported,s=d.createCustomMediaKeys,n=d.setMediaKeys,i="webkit"}else if(ou&&qa!==void 0){r=gt(["encrypted","needkey"]);let d=TA();o=d.isTypeSupported,s=d.createCustomMediaKeys,n=d.setMediaKeys,i="ms"}else if(Go!==void 0){r=gt(["encrypted","needkey"]);let d=kA();o=d.isTypeSupported,s=d.createCustomMediaKeys,n=d.setMediaKeys,i="moz"}else{r=gt(["encrypted","needkey"]);let d=Ae.MediaKeys,c=()=>{if(d===void 0)throw new he("MEDIA_KEYS_NOT_SUPPORTED","No `MediaKeys` implementation found in the current browser.");if(typeof d.isTypeSupported=="undefined"){let m="This browser seems to be unable to play encrypted contents currently.Note: Some browsers do not allow decryption in some situations, like when not using HTTPS.";throw new Error(m)}};o=m=>(c(),be(typeof d.isTypeSupported=="function"),d.isTypeSupported(m)),s=m=>(c(),new d(m)),i="unknown"}e=function(d,c){if(!o(d))return Promise.reject(new Error("Unsupported key type"));for(let m=0;mS==="cenc")),T=T&&b!=="required",T){let S={initDataTypes:["cenc"],distinctiveIdentifier:"not-allowed",persistentState:"required",sessionTypes:["temporary","persistent-license"]};p!==void 0&&(S.videoCapabilities=p),y!==void 0&&(S.audioCapabilities=y);let I=s(d);return Promise.resolve(new tp(d,I,S))}}return Promise.reject(new Error("Unsupported configuration"))}}return{requestMediaKeySystemAccess:e,onEncrypted:r,setMediaKeys:n,implementation:i}}function pze(t,e){try{let r,n=t;return typeof n.setMediaKeys=="function"?r=n.setMediaKeys(e):typeof n.webkitSetMediaKeys=="function"?r=n.webkitSetMediaKeys(e):typeof n.mozSetMediaKeys=="function"?r=n.mozSetMediaKeys(e):typeof n.msSetMediaKeys=="function"&&e!==null&&(r=n.msSetMediaKeys(e)),typeof r=="object"&&r!==null&&typeof r.then=="function"?r:Promise.resolve(r)}catch(r){return Promise.reject(r)}}u();l();u();l();u();l();u();l();function Zi(t,e){let r=t.length,n=0;for(;n+8<=r;){let i=Te(t,n);if(i===0)i=r-n;else if(i===1){if(n+16>r)return-1;i=kr(t,n+8)}if(isNaN(i)||i<=0)return-1;if(Te(t,n+4)===e)return n+i<=r?n:-1;n+=i}return-1}function oI(t){let e=0,r=[],n=null;for(;e<=t.length;){if(e===t.length){n=null;break}n=t.subarray(e,1/0);let i=Zi(n,1836019558);if(i<0)break;let a=Te(t,i+e),o=e+i+a;if(o>t.length)break;let s=Zi(n,1835295092);if(s<0)break;let d=Te(t,s+e),c=e+s+d;if(c>t.length)break;let m=Math.max(o,c),f=t.subarray(e,m);r.push(f),e=m}return r.length===0?[null,n]:[r,n]}u();l();u();l();function gze(t,e,r){return new Uint8Array(Array.prototype.slice.call(t,e,r))}function hze(t,e,r){return t.slice(e,r)}var AA=typeof Uint8Array.prototype.slice=="function"?hze:gze;u();l();function PA(t,e){let r=t;for(let n of e){let i=Mt(r,n);if(i===null)return null;r=i}return r}function Mt(t,e){let r=Er(t,e);return r!==null?t.subarray(r[1],r[2]):null}function hZ(t,e){let r=[],n=t;for(;;){let i=Er(n,e);if(i===null)return r;be(i[2]!==0&&n.length!==0),r.push(n.subarray(i[1],i[2])),n=n.subarray(i[2])}}function OA(t,e){let r=Er(t,e);return r!==null?t.subarray(r[0],r[2]):null}function Er(t,e){let r=t.length,n=0,i,a=0,o;for(;n+8<=r;){if(o=n,a=Te(t,o),o+=4,i=Te(t,o),o+=4,a===0)a=r-n;else if(a===1){if(o+8>r)return null;a=kr(t,o),o+=8}if(a<0)throw new Error("ISOBMFF: Size out of range");if(i===e)return e===1970628964&&(o+=16),[n,o,n+a];n+=a}return null}function vu(t,e,r,n,i){let a=t.length,o;for(let s=0;sa)return;o=kr(t,d),d+=8}if(c===1970628964&&d+16<=a&&Te(t,d)===e&&Te(t,d+4)===r&&Te(t,d+8)===n&&Te(t,d+12)===i)return d+=16,t.subarray(d,s+o)}}function LA(t){let e=t.length;if(e<8)return k.warn("ISOBMFF: box inferior to 8 bytes, cannot find offsets"),null;let r=0,n=Te(t,r);r+=4;let i=Te(t,r);if(r+=4,n===0)n=e;else if(n===1){if(r+8>e)return k.warn("ISOBMFF: box too short, cannot find offsets"),null;n=kr(t,r),r+=8}if(n<0)throw new Error("ISOBMFF: Size out of range");return i===1970628964&&(r+=16),[0,r,n]}function sI(t){let e=0,r=Mt(t,1836019574);if(r===null)return[];let n=[];for(;e1){k.warn("ISOBMFF: un-handled PSSH version");return}let r=e+4;if(r+16>t.length)return;let n=AA(t,r,r+16);return dr(n)}u();l();u();l();var ap=Math.pow(2,32)-1;var NA={};function yZ(t){if(NA[t]!==void 0)return NA[t];let e=Rt(t);return NA[t]=e,e}function Oe(t,e){let r=e.length+8;return r<=ap?_e(ut(r),yZ(t),e):_e(ut(1),yZ(t),Wo(r+8),e)}function Kt(t,e){return Oe(t,_e(...e))}u();l();function op(t){let e=Mt(t,1836019558);return e===null?null:Mt(e,1953653094)}function vZ(t){return hZ(t,1836019558).reduce((r,n)=>{let i=Mt(n,1953653094);return i!==null&&r.push(i),r},[])}function sp(t){return Mt(t,1835295092)}function DA(t){let e=Mt(t,1836019574);if(e===null)return null;let r=Mt(e,1953653099);return r===null?null:Mt(r,1835297121)}function bZ(t,e=0){return Mt(t.subarray(e),1701671783)}u();l();u();l();u();l();function up(t){let e=cZ(t,8),r=eI(t.subarray(10,e+10)),i=new DOMParser().parseFromString(r,"application/xml").querySelector("KID");if(i===null)throw new Error("Cannot parse PlayReady private data: invalid XML");let a=i.textContent===null?"":i.textContent,o=tI(ki(a));return dr(o).toLowerCase()}function lp(t,e){let r=Er(t,1936286840);if(r===null)return null;let n=e,i=r[2]-r[0],a=r[1],o=t[a];a+=8;let s=Te(t,a);a+=4;let d;if(o===0)d=Te(t,a),a+=4,n+=Te(t,a)+i,a+=4;else if(o===1)d=kr(t,a),a+=8,n+=kr(t,a)+i,a+=8;else return null;let c=[];a+=2;let m=nI(t,a);for(a+=2;--m>=0;){let f=Te(t,a);a+=4;let p=(f&2147483648)>>>31,y=f&2147483647;if(p===1)throw new Error("sidx with reference_type `1` not yet implemented");let v=Te(t,a);a+=4,a+=4,c.push({time:d,duration:v,timescale:s,range:[n,n+y-1]}),d+=v,n+=y}return c}function qA(t){let e=op(t);if(e===null)return;let r=Mt(e,1952867444);if(r===null)return;let n=r[0];if(n===1)return kr(r,4);if(n===0)return Te(r,4)}function yze(t){let e=Mt(t,1952868452);if(e===null)return;let r=1,n=CA(e,r);r+=3;let i=(n&1)>0,a=(n&2)>0;return(n&8)>0?(r+=4,i&&(r+=8),a&&(r+=4),Te(e,r)):void 0}function dp(t){let e=vZ(t);if(e.length===0)return;let r=0;for(let n of e){let i=Mt(n,1953658222);if(i===null)return;let a=0,o=i[a];if(a+=1,o>1)return;let s=CA(i,a);a+=3;let d=(s&256)>0,c=0;if(!d&&(c=yze(n),c===void 0))return;let m=(s&1)>0,f=(s&4)>0,p=(s&512)>0,y=(s&1024)>0,v=(s&2048)>0,b=Te(i,a);a+=4,m&&(a+=4),f&&(a+=4);let T=b,S=0;for(;T-- >0;)d?(S+=Te(i,a),a+=4):S+=c,p&&(a+=4),y&&(a+=4),v&&(a+=4);r+=S}return r}function cp(t){let e=DA(t);if(e===null)return;let r=Mt(e,1835296868);if(r===null)return;let n=0,i=r[n];if(n+=4,i===1)return Te(r,n+16);if(i===0)return Te(r,n+8)}function BA(t){let e=t.length;if(e<4)throw new Error("Cannot update box length: box too short");let r=Te(t,0);if(r===0)if(e>ap){let n=new Uint8Array(e+8);return n.set(ut(1),0),n.set(t.subarray(4,8),4),n.set(Wo(e+8),8),n.set(t.subarray(8,e),16),n}else return t.set(ut(e),0),t;else if(r===1){if(e<16)throw new Error("Cannot update box length: box too short");return t.set(Wo(e),8),t}else{if(e<=ap)return t.set(ut(e),0),t;{let n=new Uint8Array(e+8);return n.set(ut(1),0),n.set(t.subarray(4,8),4),n.set(Wo(e+8),8),n.set(t.subarray(8,e),16),n}}}function SZ(t){let e=[],r=0;for(;rs===0)?null:o}u();l();var lI=Te(Rt("pssh"),0);function vze(t){k.info("Compat: Trying to move CENC PSSH from init data at the end of it.");let e=!1,r=new Uint8Array,n=new Uint8Array,i=0;for(;it.length)throw k.warn("Compat: unrecognized initialization data. Cannot patch it."),new Error("Compat: unrecognized initialization data. Cannot patch it.");let o=t.subarray(i,i+a);if(t[i+12]===16&&t[i+13]===119&&t[i+14]===239&&t[i+15]===236&&t[i+16]===192&&t[i+17]===178&&t[i+18]===77&&t[i+19]===2&&t[i+20]===172&&t[i+21]===227&&t[i+22]===60&&t[i+23]===30&&t[i+24]===82&&t[i+25]===226&&t[i+26]===251&&t[i+27]===75){let s=LA(o),d=s===null?void 0:o[s[1]];k.info("Compat: CENC PSSH found with version",d),d===void 0?k.warn("Compat: could not read version of CENC PSSH"):e===(d===1)?r=_e(r,o):d===1?(k.warn("Compat: cenc version 1 encountered, removing every other cenc pssh box."),r=o,e=!0):k.warn("Compat: filtering out cenc pssh box with wrong version",d)}else n=_e(n,o);i+=a}if(i!==t.length)throw k.warn("Compat: unrecognized initialization data. Cannot patch it."),new Error("Compat: unrecognized initialization data. Cannot patch it.");return _e(n,r)}function fp(t,e,r){k.debug("Compat: Calling generateRequest on the MediaKeySession");let n;try{n=vze(r)}catch(a){n=r}let i=e!=null?e:"";return t.generateRequest(i,n).catch(a=>{if(i!==""||!(a instanceof TypeError))throw a;return k.warn('Compat: error while calling `generateRequest` with an empty initialization data type. Retrying with a default "cenc" value.',a),t.generateRequest("cenc",n)})}u();l();function bze(t){let e=[],r=0;for(;rt.length)return k.warn("Compat: Unrecognized initialization data. Use as is."),[{systemId:void 0,data:t}];let i=t.subarray(r,r+n),o={systemId:uI(i,8),data:i};Sze(e,o)?k.warn("Compat: Duplicated PSSH found in initialization data, removing it."):e.push(o),r+=n}return r!==t.length?(k.warn("Compat: Unrecognized initialization data. Use as is."),[{systemId:void 0,data:t}]):e}function Sze(t,e){for(let r=0;r0?r:new Promise(n=>{t.addEventListener("keystatuseschange",a);let i=setTimeout(a,Ize);function a(){o(),n(r)}function o(){clearTimeout(i),t.removeEventListener("keystatuseschange",a)}})}var Ji=gZ;u();l();function TZ(t){var r;let e=Tr.getState(t);return Tr.setState(t,null),ep((r=e==null?void 0:e.emeImplementation)!=null?r:Ji,t,null)}async function UA(t,{emeImplementation:e,keySystemOptions:r,loadedSessionsStore:n,mediaKeySystemAccess:i,mediaKeys:a},o){let s=Tr.getState(t);if(await(s!==null&&s.loadedSessionsStore!==n?s.loadedSessionsStore.closeAllSessions():Promise.resolve()),o.isCancelled())throw o.cancellationError;if(Tr.setState(t,{emeImplementation:e,keySystemOptions:r,mediaKeySystemAccess:i,mediaKeys:a,loadedSessionsStore:n}),t.mediaKeys!==a)return k.info("DRM: Attaching MediaKeys to the media element"),ep(e,t,a).then(()=>{k.info("DRM: MediaKeys attached with success")}).catch(c=>{let m=c instanceof Error?c.toString():"Unknown Error";throw new ze("MEDIA_KEYS_ATTACHMENT_ERROR","Could not attach the MediaKeys to the media element: "+m)})}u();l();u();l();u();l();function pp(t){if(t.sessionId==="")return!1;let e=t.keyStatuses,r=[];return e.forEach(n=>{r.push(n)}),r.length<=0?(k.debug("DRM: isSessionUsable: MediaKeySession given has an empty keyStatuses",t.sessionId),!1):ve(r,"expired")?(k.debug("DRM: isSessionUsable: MediaKeySession given has an expired key",t.sessionId),!1):ve(r,"internal-error")?(k.debug("DRM: isSessionUsable: MediaKeySession given has a key with an internal-error",t.sessionId),!1):(k.debug("DRM: isSessionUsable: MediaKeySession is usable",t.sessionId),!0)}function FA(t,e,r,n){let{loadedSessionsStore:i,persistentSessionsStore:a}=t;return r==="temporary"?kZ(i,e):a===null?(k.warn("DRM: Cannot create persistent MediaKeySession, PersistentSessionsStore not created."),kZ(i,e)):Tze(i,a,e,n)}function kZ(t,e){k.info("DRM: Creating a new temporary session");let r=t.createSession(e,"temporary");return Promise.resolve({type:"created-session",value:r})}async function Tze(t,e,r,n){if(n.cancellationError!==null)throw n.cancellationError;k.info("DRM: Creating persistent MediaKeySession");let i=t.createSession(r,"persistent-license"),a=e.getAndReuse(r);if(a===null)return{type:"created-session",value:i};try{let s=await t.loadPersistentSession(i.mediaKeySession,a.sessionId);if(!s){k.warn("DRM: No data stored for the loaded session"),e.delete(a.sessionId),t.removeSessionWithoutClosingIt(i.mediaKeySession);let d=t.createSession(r,"persistent-license");return{type:"created-session",value:d}}return s&&pp(i.mediaKeySession)?(e.add(r,r.keyIds,i.mediaKeySession),k.info("DRM: Succeeded to load persistent session."),{type:"loaded-persistent-session",value:i}):(k.warn("DRM: Previous persistent session not usable anymore."),o())}catch(s){return k.warn("DRM: Unable to load persistent session: "+(s instanceof Error?s.toString():"Unknown Error")),o()}async function o(){if(n.cancellationError!==null)throw n.cancellationError;k.info("DRM: Removing previous persistent session.");let s=e.get(r);s!==null&&e.delete(s.sessionId);try{await t.closeSession(i.mediaKeySession)}catch(c){if(i.mediaKeySession.sessionId!=="")throw c;t.removeSessionWithoutClosingIt(i.mediaKeySession)}if(n.cancellationError!==null)throw n.cancellationError;let d=t.createSession(r,"persistent-license");return{type:"created-session",value:d}}}u();l();async function KA(t,e){if(e<0||e>=t.getLength())return;k.info("DRM: LSS cache limit exceeded",e,t.getLength());let r=[],n=t.getAll().slice(),i=n.length-e;for(let a=0;a{let i=e(n);return Array.isArray(i)?(r.push(...i),r):(r.push(i),r)},[])}function Eze(t,e,r){let n=e.getConfiguration();if(VA()||w(n))return null;let i=t.filter(a=>!(a.type!==r.type||(!w(a.persistentLicenseConfig)||a.persistentState==="required")&&n.persistentState!=="required"||a.distinctiveIdentifier==="required"&&n.distinctiveIdentifier!=="required"))[0];return i!==void 0?{keySystemOptions:i,keySystemAccess:e}:null}function _ze(t){let{EME_KEY_SYSTEMS:e}=Q.getCurrent();for(let r of Object.keys(e))if(ve(e[r],t))return r}function Rze(t){let{keyName:e,keyType:r,keySystemOptions:n}=t,i=["temporary"],a="optional",o="optional";w(n.persistentLicenseConfig)||(a="required",i.push("persistent-license")),w(n.persistentState)||(a=n.persistentState),w(n.distinctiveIdentifier)||(o=n.distinctiveIdentifier);let{EME_DEFAULT_AUDIO_CODECS:s,EME_DEFAULT_VIDEO_CODECS:d,EME_DEFAULT_WIDEVINE_ROBUSTNESSES:c,EME_DEFAULT_PLAYREADY_RECOMMENDATION_ROBUSTNESSES:m}=Q.getCurrent(),f,p,{audioCapabilitiesConfig:y,videoCapabilitiesConfig:v}=n;if((y==null?void 0:y.type)==="full")f=y.value;else{let T;(y==null?void 0:y.type)==="robustness"?T=y.value:e==="widevine"?T=c:r==="com.microsoft.playready.recommendation"?T=m:T=[],T.length===0&&T.push(void 0);let S=(y==null?void 0:y.type)==="contentType"?y.value:s;f=Ld(T,I=>S.map(E=>I!==void 0?{contentType:E,robustness:I}:{contentType:E}))}if((v==null?void 0:v.type)==="full")p=v.value;else{let T;(v==null?void 0:v.type)==="robustness"?T=v.value:e==="widevine"?T=c:r==="com.microsoft.playready.recommendation"?T=m:T=[],T.length===0&&T.push(void 0);let S=(v==null?void 0:v.type)==="contentType"?v.value:d;p=Ld(T,I=>S.map(E=>I!==void 0?{contentType:E,robustness:I}:{contentType:E}))}let b={initDataTypes:["cenc"],videoCapabilities:p,audioCapabilities:f,distinctiveIdentifier:o,persistentState:a,sessionTypes:i};return[b,nt(je({},b),{audioCapabilities:void 0,videoCapabilities:void 0})]}function HA(t,e,r){k.info("DRM: Searching for compatible MediaKeySystemAccess");let n=Tr.getState(t);if(n!==null&&Ji.implementation===n.emeImplementation.implementation){let o=Eze(e,n.mediaKeySystemAccess,n.keySystemOptions);if(o!==null)return k.info("DRM: Found cached compatible keySystem"),Promise.resolve({type:"reuse-media-key-system-access",value:{mediaKeySystemAccess:o.keySystemAccess,options:o.keySystemOptions}})}let i=e.reduce((o,s)=>{let{EME_KEY_SYSTEMS:d}=Q.getCurrent(),c=d[s.type],m;if(!w(c))m=c.map(f=>({keyName:s.type,keyType:f,keySystemOptions:s}));else{let f=_ze(s.type),p=s.type;m=[{keyName:f,keyType:p,keySystemOptions:s}]}return o.concat(m)},[]);return a(0);async function a(o){if(o>=i.length)throw new ze("INCOMPATIBLE_KEYSYSTEMS","No key system compatible with your wanted configuration has been found in the current browser.");if(w(Ji.requestMediaKeySystemAccess))throw new Error("requestMediaKeySystemAccess is not implemented in your browser.");let s=i[o],{keyType:d,keySystemOptions:c}=s,m=Rze(s);k.debug(`DRM: Request keysystem access ${d},${o+1} of ${i.length}`);try{let f=await Mze(d,m);return k.info("DRM: Found compatible keysystem",d,o+1),{type:"create-media-key-system-access",value:{options:c,mediaKeySystemAccess:f}}}catch(f){if(k.debug("DRM: Rejected access to keysystem",d,o+1),r.cancellationError!==null)throw r.cancellationError;return a(o+1)}}}async function Mze(t,e){let r=await Ji.requestMediaKeySystemAccess(t,e);if(!EZ(t))try{let i=(await r.createMediaKeys()).createSession(),a=RZ(_Z);await i.generateRequest("cenc",a)}catch(n){throw k.debug("DRM: KeySystemAccess was granted but it is not usable"),n}return r}u();l();u();l();u();l();function Nd(t,e){for(let r of t)if(!e.some(i=>Ue(i,r)))return!1;return!0}function MZ(t,e){for(let r of t)if(e.some(i=>Ue(i,r)))return!0;return!1}var gp=class{constructor(e){this._initializationData=e,this._keyIds=null}associateKeyIds(e){this._keyIds===null&&(this._keyIds=[]);let r=Array.from(e);for(let n of r)this.isAssociatedWithKeyId(n)||this._keyIds.push(n)}isAssociatedWithKeyId(e){if(this._keyIds===null)return!1;for(let r of this._keyIds)if(Ue(r,e))return!0;return!1}getAssociatedKeyIds(){return this._keyIds===null?[]:this._keyIds}isCompatibleWith(e){let{keyIds:r}=e;if(r!==void 0&&r.length>0){if(this._keyIds!==null&&Nd(r,this._keyIds))return!0;if(this._initializationData.keyIds!==void 0)return Nd(r,this._initializationData.keyIds)}return this._checkInitializationDataCompatibility(e)}_checkInitializationDataCompatibility(e){return e.keyIds!==void 0&&e.keyIds.length>0&&this._initializationData.keyIds!==void 0?Nd(e.keyIds,this._initializationData.keyIds):this._initializationData.type!==e.type?!1:this._initializationData.values.isCompatibleWith(e.values)}};var hp=class{constructor(e){this._mediaKeys=e,this._storage=[]}createSession(e,r){let n=new gp(e);k.debug("DRM-LSS: calling `createSession`",r);let i=this._mediaKeys.createSession(r),a={mediaKeySession:i,sessionType:r,keySessionRecord:n,isGeneratingRequest:!1,isLoadingPersistentSession:!1,closingStatus:{type:"none"}};return w(i.closed)||i.closed.then(()=>{k.info("DRM-LSS: session was closed, removing it.",i.sessionId);let o=this.getIndex(n);o>=0&&this._storage[o].mediaKeySession===i&&this._storage.splice(o,1)}).catch(o=>{k.warn(`DRM-LSS: MediaKeySession.closed rejected: ${o}`)}),this._storage.push(je({},a)),k.debug("DRM-LSS: MediaKeySession added",a.sessionType,this._storage.length),a}reuse(e){for(let r=this._storage.length-1;r>=0;r--){let n=this._storage[r];if(n.keySessionRecord.isCompatibleWith(e))return this._storage.splice(r,1),this._storage.push(n),k.debug("DRM-LSS: Reusing session:",n.mediaKeySession.sessionId,n.sessionType),je({},n)}return null}getEntryForSession(e){for(let r=this._storage.length-1;r>=0;r--){let n=this._storage[r];if(n.mediaKeySession===e)return je({},n)}return null}async generateLicenseRequest(e,r,n){let i;for(let a of this._storage)if(a.mediaKeySession===e){i=a;break}if(i===void 0)return k.error("DRM-LSS: generateRequest error. No MediaKeySession found with the given initData and initDataType"),fp(e,r,n);if(i.isGeneratingRequest=!0,i.closingStatus.type!=="none")throw new Error("The `MediaKeySession` is being closed.");try{await fp(e,r,n)}catch(a){throw i===void 0||(i.isGeneratingRequest=!1,i.closingStatus.type==="awaiting"&&i.closingStatus.start()),a}i!==void 0&&(i.isGeneratingRequest=!1,i.closingStatus.type==="awaiting"&&i.closingStatus.start())}async loadPersistentSession(e,r){let n;for(let a of this._storage)if(a.mediaKeySession===e){n=a;break}if(n===void 0)return k.error("DRM-LSS: loadPersistentSession error. No MediaKeySession found with the given initData and initDataType"),mp(e,r);if(n.isLoadingPersistentSession=!0,n.closingStatus.type!=="none")throw new Error("The `MediaKeySession` is being closed.");let i;try{i=await mp(e,r)}catch(a){throw n===void 0||(n.isLoadingPersistentSession=!1,n.closingStatus.type==="awaiting"&&n.closingStatus.start()),a}return n===void 0||(n.isLoadingPersistentSession=!1,n.closingStatus.type==="awaiting"&&n.closingStatus.start()),i}async closeSession(e){let r;for(let n of this._storage)if(n.mediaKeySession===e){r=n;break}return r===void 0?(k.warn("DRM-LSS: No MediaKeySession found with the given initData and initDataType"),Promise.resolve(!1)):this._closeEntry(r)}getLength(){return this._storage.length}getAll(){return this._storage}async closeAllSessions(){let e=this._storage;k.debug("DRM-LSS: Closing all current MediaKeySessions",e.length),this._storage=[];let r=e.map(n=>this._closeEntry(n));await Promise.all(r)}removeSessionWithoutClosingIt(e){be(e.sessionId==="","Initialized `MediaKeySession`s should always be properly closed");for(let r=this._storage.length-1;r>=0;r--)if(this._storage[r].mediaKeySession===e)return k.debug("DRM-LSS: Removing session without closing it",e.sessionId),this._storage.splice(r,1),!0;return!1}getIndex(e){for(let r=0;r{e!==void 0&&(e.isLoadingPersistentSession||e.isGeneratingRequest)?e.closingStatus={type:"awaiting",start:a}:a();function a(){e!==void 0&&(e.closingStatus={type:"pending"}),Cze(r).then(()=>{e!==void 0&&(e.closingStatus={type:"done"}),n(!0)}).catch(o=>{e!==void 0&&(e.closingStatus={type:"failed"}),i(o)})}})}};async function Cze(t){k.debug("DRM: Trying to close a MediaKeySession",t.sessionId);try{await $S(t),k.debug("DRM: Succeeded to close MediaKeySession");return}catch(e){k.error("DRM: Could not close MediaKeySession: "+(e instanceof Error?e.toString():"Unknown error"));return}}u();l();u();l();function $o(t){let e=0,r;for(let n=0;n=0){let d=r===void 0?3:4,c=this._entries[a];if(((s=c.version)!=null?s:-1)>=d&&i===c.sessionId)return;k.info("DRM-PSS: Updating session info.",i),this._entries.splice(a,1)}else k.info("DRM-PSS: Add new session",i);let o=xze(e.values.getFormattedValues());r===void 0?this._entries.push({version:3,sessionId:i,values:o,initDataType:e.type}):this._entries.push({version:4,sessionId:i,keyIds:r.map(d=>new $n(d)),values:o,initDataType:e.type}),this._save()}delete(e){let r=-1;for(let i=0;i{let c=ZS(d);for(let m of a.keyIds)if(typeof m=="string"){if(c===m)return!0}else if(Ue(m.initData,d))return!0;return!1}))return i}else{let s=e.values.getFormattedValues();if(Dd(s,a.values))return i}break;case 3:let o=e.values.getFormattedValues();if(Dd(o,a.values))return i;break;case 2:{let{initData:s,initDataHash:d}=n();if(a.initDataHash===d)try{let c=typeof a.initData=="string"?$n.decode(a.initData):a.initData.initData;if(Ue(c,s))return i}catch(c){k.warn("DRM-PSS: Could not decode initialization data.",c instanceof Error?c:"")}break}case 1:{let{initData:s,initDataHash:d}=n();if(a.initDataHash===d){if(typeof a.initData.length=="undefined")return i;if(Ue(a.initData,s))return i}break}default:{let{initDataHash:s}=n();if(a.initData===s)return i}}}return-1}_save(){try{this._storage.save(this._entries)}catch(e){let r=e instanceof Error?e:void 0;k.warn("DRM-PSS: Could not save MediaKeySession information",r)}}};function xze(t){return t.map(({systemId:e,data:r,hash:n})=>({systemId:e,hash:n,data:new $n(r)}))}u();l();var cI=new WeakMap,bu={prepare(t){cI.set(t,null)},set(t,e){let r=e instanceof Uint8Array?e:new Uint8Array(e instanceof ArrayBuffer?e:e.buffer),n=$o(r);cI.set(t,{hash:n,serverCertificate:r})},hasOne(t){let e=cI.get(t);if(e===void 0)return!1;if(e!==null)return!0},has(t,e){let r=cI.get(t);if(r==null)return!1;let{hash:n,serverCertificate:i}=r,a=e instanceof Uint8Array?e:new Uint8Array(e instanceof ArrayBuffer?e:e.buffer);if($o(a)!==n||i.length!==a.length)return!1;for(let s=0;s=a)throw m;typeof s=="function"&&s(m,d);let f=Oze(n,d,i);return await yu(f),c()}}}function Oze(t,e,r){let n=t*Math.pow(2,e-1),i=vp(n);return Math.min(i,r)}u();l();u();l();function YA(t,e){return t.indexOf("playready")!==-1&&(Cd||Fm)?tI(e):e}var qd=class t extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,t.prototype),this.reason=e}},QA={EXPIRED:"expired",INTERNAL_ERROR:"internal-error",OUTPUT_RESTRICTED:"output-restricted"};function XA(t,e,r){let{onKeyInternalError:n,onKeyOutputRestricted:i,onKeyExpiration:a}=e,o=[],s=[],d=[];t.keyStatuses.forEach((m,f)=>{let[p,y]=typeof m=="string"?[m,f]:[f,m],v=YA(r,new Uint8Array(y)),b={keyId:v.buffer,keyStatus:p};switch(k.hasLevel("DEBUG")&&k.debug(`DRM: key status update (${dr(v)}): ${p}`),p){case QA.EXPIRED:{let T=new ze("KEY_STATUS_CHANGE_ERROR",`A decryption key expired (${dr(v)})`,{keyStatuses:[b,...d]});if(a==="error"||a===void 0)throw T;switch(a){case"close-session":throw new qd(T);case"fallback":o.push(v);break;default:a==="continue"||a===void 0?s.push(v):ur(a);break}d.push(b);break}case QA.INTERNAL_ERROR:{let T=new ze("KEY_STATUS_CHANGE_ERROR",`A "${p}" status has been encountered (${dr(v)})`,{keyStatuses:[b,...d]});switch(n){case void 0:case"error":throw T;case"close-session":throw new qd(T);case"fallback":o.push(v);break;case"continue":s.push(v);break;default:if(n!==void 0)ur(n);else throw T}d.push(b);break}case QA.OUTPUT_RESTRICTED:{let T=new ze("KEY_STATUS_CHANGE_ERROR",`A "${p}" status has been encountered (${dr(v)})`,{keyStatuses:[b,...d]});switch(i){case void 0:case"error":throw T;case"fallback":o.push(v);break;case"continue":s.push(v);break;default:if(i!==void 0)ur(i);else throw T}d.push(b);break}default:s.push(v);break}});let c;return d.length>0&&(c=new ze("KEY_STATUS_CHANGE_ERROR","One or several problematic key statuses have been encountered",{keyStatuses:d})),{warning:c,blacklistedKeyIds:o,whitelistedKeyIds:s}}function ZA(t,e,r,n,i){k.info("DRM: Binding session events",t.sessionId);let{getLicenseConfig:a={}}=e,o=new X;o.linkToSignal(i),w(t.closed)||t.closed.then(()=>o.cancel()).catch(m=>{i.isCancelled()||(o.cancel(),n.onError(m))}),NS(t,m=>{o.cancel(),n.onError(new ze("KEY_ERROR",m.type))},o.signal),AX(t,()=>{k.info("DRM: keystatuseschange event received",t.sessionId);try{s()}catch(m){if(i.isCancelled()||o.isUsed()&&m instanceof Zm)return;o.cancel(),n.onError(m)}},o.signal),LS(t,m=>{let f=m,p=new Uint8Array(f.message),y=G(f.messageType)?f.messageType:"license-request";k.info(`DRM: Received message event, type ${y}`,t.sessionId);let v=c(a.retry);$A(()=>d(p,y),v,o.signal).then(b=>{if(o.isUsed())return Promise.resolve();if(w(b))k.info("DRM: No license given, skipping session.update");else try{return Lze(t,b)}catch(T){o.cancel(),n.onError(T)}}).catch(b=>{if(o.isUsed())return;o.cancel();let T=wZ(b);if(!w(b)){let{fallbackOnLastTry:S}=b;if(S===!0){k.warn("DRM: Last `getLicense` attempt failed. Blacklisting the current session."),n.onError(new Bd(T));return}}n.onError(T)})},o.signal),k.info("DRM: transmitting current keystatuses",t.sessionId),s();return;function s(){if(o.isUsed()||t.keyStatuses.size===0)return;let{warning:m,blacklistedKeyIds:f,whitelistedKeyIds:p}=XA(t,e,r);m!==void 0&&(n.onWarning(m),o.isUsed())||n.onKeyUpdate({whitelistedKeyIds:p,blacklistedKeyIds:f})}function d(m,f){let p;return new Promise((y,v)=>{try{k.debug("DRM: Calling `getLicense`",f);let S=e.getLicense(m,f),I=w(a.timeout)?10*1e3:a.timeout;I>=0&&(p=setTimeout(()=>{v(new bp(`"getLicense" timeout exceeded (${I} ms)`))},I)),Promise.resolve(S).then(b,T)}catch(S){T(S)}function b(S){p!==void 0&&clearTimeout(p),y(S)}function T(S){p!==void 0&&clearTimeout(p),v(S)}})}function c(m){return{totalRetry:m!=null?m:2,baseDelay:200,maxDelay:3e3,shouldRetry:f=>f instanceof bp||w(f)||f.noRetry!==!0,onRetry:f=>n.onWarning(wZ(f))}}}function wZ(t){if(t instanceof bp)return new ze("KEY_LOAD_TIMEOUT","The license server took too much time to respond.");let e=new ze("KEY_LOAD_ERROR","An error occured when calling `getLicense`.");return!w(t)&&G(t.message)&&(e.message=t.message),e}async function Lze(t,e){k.info("DRM: Updating MediaKeySession with message");try{await t.update(e)}catch(r){let n=r instanceof Error?r.toString():"`session.update` failed";throw new ze("KEY_UPDATE_ERROR",n)}k.info("DRM: MediaKeySession update succeeded.")}var Bd=class t extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,t.prototype),this.sessionError=e}},bp=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Bd.prototype),this.message=e}};u();l();async function Nze(t,e){try{return await t.setServerCertificate(e)}catch(r){k.warn("DRM: mediaKeys.setServerCertificate returned an error",r instanceof Error?r:"");let n=r instanceof Error?r.toString():"`setServerCertificate` error";throw new ze("LICENSE_SERVER_CERTIFICATE_ERROR",n)}}async function JA(t,e){if(bu.hasOne(t)===!0)return k.info("DRM: The MediaKeys already has a server certificate, skipping..."),{type:"already-has-one"};if(typeof t.setServerCertificate!="function")return k.warn("DRM: Could not set the server certificate. mediaKeys.setServerCertificate is not a function"),{type:"method-not-implemented"};k.info("DRM: Setting server certificate on the MediaKeys"),bu.prepare(t);try{let r=await Nze(t,e);return bu.set(t,e),{type:"success",value:r}}catch(r){return{type:"error",value:zo(r)?r:new ze("LICENSE_SERVER_CERTIFICATE_ERROR","Unknown error when setting the server certificate.")}}}u();l();function eP(t,e){if(isNaN(e)||e<0||e>=t.getLength())return;let r=t.getLength(),n=r-e;k.info("DRM: Too many stored persistent sessions, removing some.",r,n),t.deleteOldSessions(n)}u();l();function tP(t){if(on(t,"com.microsoft.playready")||t==="com.chromecast.playready"||t==="com.youtube.playready")return"9a04f07998404286ab92e65be0885f95";if(t==="com.widevine.alpha")return"edef8ba979d64acea3c827dcd51d21ed";if(on(t,"com.apple.fps"))return"94ce86fb07ff4f43adb893d2fa968ca2";if(on(t,"com.nagra."))return"adb41c242dbf4a6d958b4457c0d27b95"}u();l();var Sp=class t{constructor(e){this._innerValues=e,this._lazyFormattedValues=null}constructRequestData(){return _e(...this._innerValues.map(e=>e.data))}isCompatibleWith(e){let r=e instanceof t?e.getFormattedValues():e;return Dd(this.getFormattedValues(),r)}getFormattedValues(){return this._lazyFormattedValues===null&&(this._lazyFormattedValues=Dze(this._innerValues)),this._lazyFormattedValues}};function Dze(t){return t.slice().sort((e,r)=>e.systemId===r.systemId?0:e.systemId===void 0?1:r.systemId===void 0||e.systemId({systemId:e,data:r,hash:$o(r)}))}var Ip=class extends Me{static hasEmeApis(){return!w(Ji.requestMediaKeySystemAccess)}constructor(e,r){super(),k.debug("DRM: Starting ContentDecryptor logic.");let n=new X;this._currentSessions=[],this._canceller=n,this._initDataQueue=[],this._stateData={state:0,isMediaKeysAttached:0,isInitDataQueueLocked:!0,data:null},this.error=null,Ji.onEncrypted(e,i=>{k.debug("DRM: Encrypted event received from media element.");let a=dI(i);a!==null&&this.onInitializationData(a)},n.signal),WA(e,r,n.signal).then(i=>{let{options:a,mediaKeySystemAccess:o}=i,s;(w(a.persistentLicenseConfig)||a.persistentLicenseConfig.disableRetroCompatibility===!0)&&(s=tP(o.keySystem)),this.systemId=s,this._stateData.state===0&&(this._stateData={state:1,isInitDataQueueLocked:!0,isMediaKeysAttached:0,data:{mediaKeysInfo:i,mediaElement:e}},this.trigger("stateChange",this._stateData.state))}).catch(i=>{this._onFatalError(i)})}getState(){return this._stateData.state}attach(){if(this._stateData.state!==1)throw new Error("`attach` should only be called when in the WaitingForAttachment state");if(this._stateData.isMediaKeysAttached!==0){k.warn("DRM: ContentDecryptor's `attach` method called more than once.");return}let{mediaElement:e,mediaKeysInfo:r}=this._stateData.data,{options:n,mediaKeys:i,mediaKeySystemAccess:a,stores:o}=r;if(n.disableMediaKeysAttachmentLock===!0&&(this._stateData={state:2,isInitDataQueueLocked:!0,isMediaKeysAttached:1,data:{mediaKeysInfo:r,mediaElement:e}},this.trigger("stateChange",this._stateData.state),this._isStopped()))return;this._stateData.isMediaKeysAttached=1;let d={emeImplementation:Ji,loadedSessionsStore:o.loadedSessionsStore,mediaKeySystemAccess:a,mediaKeys:i,keySystemOptions:n};k.debug("DRM: Attaching current MediaKeys"),UA(e,d,this._canceller.signal).then(async()=>{this._stateData.isMediaKeysAttached=2;let{serverCertificate:c}=n;if(!w(c)){let f=await JA(i,c);f.type==="error"&&this.trigger("warning",f.value)}if(this._isStopped())return;let m=this._stateData.state;this._stateData={state:2,isMediaKeysAttached:2,isInitDataQueueLocked:!1,data:{mediaKeysData:r}},m!==2&&this.trigger("stateChange",2),this._isStopped()||this._processCurrentInitDataQueue()}).catch(c=>{this._onFatalError(c)})}dispose(){this.removeEventListener(),this._stateData={state:4,isMediaKeysAttached:void 0,isInitDataQueueLocked:void 0,data:null},this._canceller.cancel(),this.trigger("stateChange",this._stateData.state)}onInitializationData(e){if(this._stateData.isInitDataQueueLocked!==!1){if(this._isStopped())throw new Error("ContentDecryptor either disposed or stopped.");this._initDataQueue.push(e);return}let{mediaKeysData:r}=this._stateData.data,n=nt(je({},e),{values:new Sp(e.values)});this._processInitializationData(n,r).catch(i=>{this._onFatalError(i)})}async _processInitializationData(e,r){var b,T,S;k.hasLevel("DEBUG")&&k.debug("DRM: processing init data",(b=e.content)==null?void 0:b.adaptation.type,(T=e.content)==null?void 0:T.representation.bitrate,((S=e.keyIds)!=null?S:[]).map(I=>dr(I)).join(", "));let{mediaKeySystemAccess:n,stores:i,options:a}=r;if(this._tryToUseAlreadyCreatedSession(e,r)||this._isStopped())return;if(a.singleLicensePer==="content"){let I=ce(this._currentSessions,E=>E.source==="created-session");if(I!==void 0){let E=e.keyIds;if(E===void 0){e.content===void 0?k.warn("DRM: Unable to fallback from a non-decipherable quality."):(k.debug("DRM: Blacklisting new init data (due to singleLicensePer content policy)"),this.trigger("blackListProtectionData",e));return}if(I.record.associateKeyIds(E),e.content===void 0)k.warn("DRM: Unable to fallback from a non-decipherable quality.");else{if(k.hasLevel("DEBUG")){let R=E.reduce((M,C)=>`${M}, ${dr(C)}`,"");k.debug("DRM: Blacklisting new key ids",R)}this.trigger("keyIdsCompatibilityUpdate",{whitelistedKeyIds:[],blacklistedKeyIds:E,delistedKeyIds:[]})}return}}else if(a.singleLicensePer==="periods"&&e.content!==void 0){let{period:I}=e.content,E=this._currentSessions.filter(M=>M.source==="created-session"),R=new Set;nP(R,I);for(let M of E){let C=Array.from(R);for(let A of C)if(M.record.isAssociatedWithKeyId(A)){M.record.associateKeyIds(R.values());for(let x of C)!M.keyStatuses.whitelisted.some(O=>Ue(O,x))&&!M.keyStatuses.blacklisted.some(O=>Ue(O,x))&&M.keyStatuses.blacklisted.push(x);k.hasLevel("DEBUG")&&k.debug("DRM: Session already created for",dr(A),'under singleLicensePer "periods" policy'),this.trigger("keyIdsCompatibilityUpdate",{whitelistedKeyIds:M.keyStatuses.whitelisted,blacklistedKeyIds:M.keyStatuses.blacklisted,delistedKeyIds:[]});return}}}this._lockInitDataQueue();let o;w(a.persistentLicenseConfig)?o="temporary":qze(n)?o="persistent-license":(k.warn('DRM: Cannot create "persistent-license" session: not supported'),o="temporary");let{EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS:s,EME_MAX_STORED_PERSISTENT_SESSION_INFORMATION:d}=Q.getCurrent(),c=typeof a.maxSessionCacheSize=="number"?a.maxSessionCacheSize:s,m=await zA(e,i,o,c,this._canceller.signal);if(this._isStopped())return;let f={record:m.value.keySessionRecord,source:m.type,keyStatuses:{whitelisted:[],blacklisted:[]},blacklistedSessionError:null};this._currentSessions.push(f);let{mediaKeySession:p,sessionType:y}=m.value,v=!1;if(ZA(p,a,n.keySystem,{onKeyUpdate:I=>{let E=Fze(e,f.record,a.singleLicensePer,f.source==="created-session",I.whitelistedKeyIds,I.blacklistedKeyIds);if(f.record.associateKeyIds(E.whitelisted),f.record.associateKeyIds(E.blacklisted),f.keyStatuses={whitelisted:E.whitelisted,blacklisted:E.blacklisted},f.record.getAssociatedKeyIds().length!==0&&y==="persistent-license"&&i.persistentSessionsStore!==null&&!v){let{persistentSessionsStore:R}=i;eP(R,d-1),R.add(e,f.record.getAssociatedKeyIds(),p),v=!0}e.content!==void 0&&this.trigger("keyIdsCompatibilityUpdate",{whitelistedKeyIds:E.whitelisted,blacklistedKeyIds:E.blacklisted,delistedKeyIds:[]}),this._unlockInitDataQueue()},onWarning:I=>{this.trigger("warning",I)},onError:I=>{var E;if(I instanceof qd){k.warn("DRM: A session's closing condition has been triggered"),this._lockInitDataQueue();let R=this._currentSessions.indexOf(f);R>=0&&this._currentSessions.splice(R),e.content!==void 0&&this.trigger("keyIdsCompatibilityUpdate",{whitelistedKeyIds:[],blacklistedKeyIds:[],delistedKeyIds:f.record.getAssociatedKeyIds()}),(E=i.persistentSessionsStore)==null||E.delete(p.sessionId),i.loadedSessionsStore.closeSession(p).catch(M=>{let C=M instanceof Error?M:"unknown error";k.warn("DRM: failed to close expired session",C)}).then(()=>this._unlockInitDataQueue()).catch(M=>this._onFatalError(M)),this._isStopped()||this.trigger("warning",I.reason);return}if(!(I instanceof Bd)){this._onFatalError(I);return}f.blacklistedSessionError=I,e.content!==void 0&&(k.info("DRM: blacklisting Representations based on protection data."),this.trigger("blackListProtectionData",e)),this._unlockInitDataQueue()}},this._canceller.signal),(a.singleLicensePer===void 0||a.singleLicensePer==="init-data")&&this._unlockInitDataQueue(),m.type==="created-session"){let I=e.values.constructRequestData();try{await i.loadedSessionsStore.generateLicenseRequest(p,e.type,I)}catch(E){let R=i.loadedSessionsStore.getEntryForSession(p);if(R===null||R.closingStatus.type!=="none"){let M=this._currentSessions.indexOf(f);return M>=0&&this._currentSessions.splice(M,1),Promise.resolve()}throw new ze("KEY_GENERATE_REQUEST_ERROR",E instanceof Error?E.toString():"Unknown error")}}return Promise.resolve()}_tryToUseAlreadyCreatedSession(e,r){let{stores:n,options:i}=r,a=ce(this._currentSessions,c=>c.record.isCompatibleWith(e));if(a===void 0)return!1;let o=a.blacklistedSessionError;if(!w(o))return e.type===void 0||e.content===void 0?(k.error("DRM: This initialization data has already been blacklisted but the current content is not known."),!0):(k.info("DRM: This initialization data has already been blacklisted. Blacklisting the related content."),this.trigger("blackListProtectionData",e),!0);if(e.keyIds!==void 0){let c;if(i.singleLicensePer===void 0||i.singleLicensePer==="init-data"){let{blacklisted:m}=a.keyStatuses;c=MZ(e.keyIds,m)}else{let{whitelisted:m}=a.keyStatuses;c=!Nd(e.keyIds,m)}if(c)return e.content===void 0?(k.error("DRM: Cannot forbid key id, the content is unknown."),!0):(k.info("DRM: Current initialization data is linked to blacklisted keys. Marking Representations as not decipherable"),this.trigger("keyIdsCompatibilityUpdate",{whitelistedKeyIds:[],blacklistedKeyIds:e.keyIds,delistedKeyIds:[]}),!0)}if(n.loadedSessionsStore.reuse(e)!==null)return k.debug("DRM: Init data already processed. Skipping it."),!0;let d=this._currentSessions.indexOf(a);return d===-1?k.error("DRM: Unable to remove processed init data: not found."):(k.debug("DRM: A session from a processed init data is not available anymore. Re-processing it."),this._currentSessions.splice(d,1)),!1}_onFatalError(e){if(this._canceller.isUsed())return;let r=e instanceof Error?e:new Jt("NONE","Unknown decryption error");this.error=r,this._initDataQueue.length=0,this._stateData={state:3,isMediaKeysAttached:void 0,isInitDataQueueLocked:void 0,data:null},this._canceller.cancel(),this.trigger("error",r),this._stateData.state===3&&this.trigger("stateChange",this._stateData.state)}_isStopped(){return this._stateData.state===4||this._stateData.state===3}_processCurrentInitDataQueue(){for(;this._stateData.isInitDataQueueLocked===!1;){let e=this._initDataQueue.shift();if(e===void 0)return;this.onInitializationData(e)}}_lockInitDataQueue(){this._stateData.isInitDataQueueLocked===!1&&(this._stateData.isInitDataQueueLocked=!0)}_unlockInitDataQueue(){if(this._stateData.isMediaKeysAttached!==2){k.error("DRM: Trying to unlock in the wrong state");return}this._stateData.isInitDataQueueLocked=!1,this._processCurrentInitDataQueue()}};function qze(t){let{sessionTypes:e}=t.getConfiguration();return e!==void 0&&ve(e,"persistent-license")}function xZ(t,e){return t.filter(r=>!e.some(n=>Ue(n,r)))}function Bze(t,e){let r=t.getAssociatedKeyIds(),n=xZ(r,e);return n.length>0&&k.hasLevel("DEBUG")&&k.debug("DRM: KeySessionRecord's keys missing in the license, blacklisting them",n.map(i=>dr(i)).join(", ")),n}function Uze(t,e){let r=[],{keyIds:n}=t;return n!==void 0&&(r=xZ(n,e)),r.length>0&&k.hasLevel("DEBUG")&&k.debug("DRM: init data keys missing in the license, blacklisting them",r.map(i=>dr(i)).join(", ")),r}function Fze(t,e,r,n,i,a){var c;let o=[...i,...a],s=Bze(e,o),d=o.concat(s);if(r!==void 0&&r!=="init-data"){let m=Uze(t,d);d.push(...m);let{content:f}=t;if(n&&f!==void 0){if(r==="content"){let p=new Set,{manifest:y}=f;for(let v of y.periods)nP(p,v);rP(p,d)}else if(r==="periods"){let{manifest:p}=f;for(let y of p.periods){let v=new Set;if(nP(v,y),((c=t.content)==null?void 0:c.period.id)===y.id)rP(v,d);else{let b=Array.from(v);for(let T of b)if(d.some(I=>Ue(I,T))){rP(v,d);break}}}}}}return{whitelisted:i,blacklisted:d.slice(i.length)}}function rP(t,e){let r=Array.from(t.values());for(let n of r)e.some(a=>Ue(a,n))||e.push(n)}function nP(t,e){let r=e.adaptations,n=xd(r).reduce((i,a)=>w(a)?i:i.concat(a),[]);for(let i of n)for(let a of i.representations)if(a.contentProtections!==void 0&&a.contentProtections.keyIds!==void 0)for(let o of a.contentProtections.keyIds)t.add(o.keyId)}u();l();function Yo(t){let e=Tr.getState(t);return e===null?null:[e.mediaKeySystemAccess.keySystem,e.mediaKeySystemAccess.getConfiguration()]}var AZ=Ip;u();l();u();l();u();l();var Tp=class extends Me{constructor(e){super(),this._canceller=new X,this._adaptationRef=e,this._updateToken=!1,this.refresh=ye}start(e){if(this._updateToken=!0,e===null){this._lastEmitted=null,this._updateToken=!1,this._adaptationRef.setValue(null);return}let r=this._constructLockedRepresentationsReference(e);this._updateToken&&(this._lastEmitted={adaptation:e.adaptation,switchingMode:e.switchingMode,lockedRepresentations:null},this._updateToken=!1,this._adaptationRef.setValue({adaptationId:e.adaptation.id,switchingMode:e.switchingMode,representations:r,relativeResumingPosition:void 0}))}updateTrack(e){if(this._updateToken=!0,e===null){if(this._lastEmitted===null)return;this._updateToken=!1,this._canceller.cancel(),this._canceller=new X,this._lastEmitted=null,this._adaptationRef.setValue(null);return}let{adaptation:r,switchingMode:n,relativeResumingPosition:i}=e;this._canceller.cancel(),this._canceller=new X;let a=this._constructLockedRepresentationsReference(e);this._updateToken&&(this._lastEmitted={adaptation:r,switchingMode:n,lockedRepresentations:null},this._updateToken=!1,this._adaptationRef.setValue({adaptationId:r.id,switchingMode:n,representations:a,relativeResumingPosition:i}))}_constructLockedRepresentationsReference(e){let r=new oe({representationIds:[],switchingMode:"lazy"}),n=this;return this.refresh=i,this._canceller.signal.register(a),e.lockedRepresentations.onUpdate(i,{clearSignal:this._canceller.signal,emitCurrentValue:!1}),i(),r;function i(){let o=e.lockedRepresentations.getValue(),s,d;if(o===null)d=e.adaptation.representations.filter(f=>f.isSupported===!0&&f.decipherable!==!1),s="lazy";else{let{representationIds:f}=o;if(s=o.switchingMode,d=e.adaptation.representations.filter(y=>ve(f,y.id)).filter(y=>y.isSupported===!0&&y.decipherable!==!1),d.length===0){n.trigger("noPlayableLockedRepresentation",null);return}}if(d.length<=0){e.adaptation.isSupported=!1,n.trigger("noPlayableRepresentation",null);return}let c=r.getValue(),m=d.map(f=>f.id).slice().sort();if(m.length!==c.representationIds.length){r.setValue({representationIds:m,switchingMode:s});return}for(let f=0;f(r.isPeriodAdvertised&&e.push(Ua(r.period)),e),[])}onManifestUpdate(e){var o,s,d,c,m,f;let{DEFAULT_VIDEO_TRACK_SWITCHING_MODE:r}=Q.getCurrent(),{periods:n}=e;if(g.CURRENT_ENV===g.DEV)for(let p=1;p=p;b--)this._storedPeriodInfo[b].inManifest=!1,iP(this._storedPeriodInfo[b])&&this._removePeriodObject(b);else if(y===v){a++;let b=this._storedPeriodInfo[p].text.storedSettings;if(b!==null&&!Si(v,"text").some(R=>R.id===b.adaptation.id)){k.warn("TS: Chosen text Adaptation not available anymore");let R=this._storedPeriodInfo[p];if(R.text.storedSettings=null,this.trigger("trackUpdate",{period:Ua(v),trackType:"text",reason:"missing"}),this._isDisposed)return;let M=Yn(this._storedPeriodInfo,R.period.id);M!==void 0&&M.text.storedSettings===null&&((o=M.text.dispatcher)==null||o.updateTrack(null))}let T=this._storedPeriodInfo[p].video.storedSettings;if(T!==null){let I=Si(v,"video");if(!I.some(R=>R.id===T.adaptation.id)){k.warn("TS: Chosen video Adaptation not available anymore");let R=this._storedPeriodInfo[p],M;if(I.length===0)M=null;else{let A=I[0],x=fI(A,this._isTrickModeTrackEnabled),O=new oe(null);M={adaptationBase:A,adaptation:x,switchingMode:r,lockedRepresentations:O}}if(R.video.storedSettings=M,this.trigger("trackUpdate",{period:Ua(v),trackType:"video",reason:"missing"}),this._isDisposed)return;let C=Yn(this._storedPeriodInfo,R.period.id);C!==void 0&&C.video.storedSettings===M&&((s=C.video.dispatcher)==null||s.updateTrack(M))}}let S=this._storedPeriodInfo[p].audio.storedSettings;if(S!==null){let I=Si(v,"audio");if(!I.some(R=>R.id===S.adaptation.id)){k.warn("TS: Chosen audio Adaptation not available anymore");let R=this._storedPeriodInfo[p],M=I.length===0?null:{adaptation:I[0],switchingMode:this._defaultAudioTrackSwitchingMode,lockedRepresentations:new oe(null)};if(R.audio.storedSettings=M,this.trigger("trackUpdate",{period:Ua(v),trackType:"audio",reason:"missing"}),this._isDisposed)return;let C=Yn(this._storedPeriodInfo,R.period.id);C!==void 0&&C.audio.storedSettings===M&&((d=C.audio.dispatcher)==null||d.updateTrack(M))}}}else if(y.start<=v.start)this._storedPeriodInfo[p].inManifest=!1,iP(this._storedPeriodInfo[p])&&(this._removePeriodObject(p),p--);else{let b=aP(v,!0,this._isTrickModeTrackEnabled,this._defaultAudioTrackSwitchingMode);this._storedPeriodInfo.splice(p,0,b),i.push(b),a++}}if(aaP(y,!0,this._isTrickModeTrackEnabled,this._defaultAudioTrackSwitchingMode));this._storedPeriodInfo.push(...p),i.push(...p)}for(let p of this._storedPeriodInfo)(c=p.audio.dispatcher)==null||c.refresh(),(m=p.video.dispatcher)==null||m.refresh(),(f=p.text.dispatcher)==null||f.refresh()}onDecipherabilityUpdates(){var e,r,n;for(let i of this._storedPeriodInfo)(e=i.audio.dispatcher)==null||e.refresh(),(r=i.video.dispatcher)==null||r.refresh(),(n=i.text.dispatcher)==null||n.refresh()}addTrackReference(e,r,n){let i=Yn(this._storedPeriodInfo,r.id);if(i===void 0){i=aP(r,!1,this._isTrickModeTrackEnabled,this._defaultAudioTrackSwitchingMode);let s=!1;for(let d=0;dr.start&&(this._storedPeriodInfo.splice(d,0,i),s=!0);s||this._storedPeriodInfo.push(i)}if(!i.isPeriodAdvertised&&(i.isPeriodAdvertised=!0,this.trigger("newAvailablePeriods",[{id:r.id,start:r.start,end:r.end}]),this._isDisposed))return;if(i[e].dispatcher!==null){k.error(`TS: Subject already added for ${e} and Period ${r.start}`);return}let a=i[e].storedSettings,o=new Tp(n);i[e].dispatcher=o,o.addEventListener("noPlayableRepresentation",()=>{var f,p,y,v;let s=ce((f=r.adaptations[e])!=null?f:[],b=>b.isSupported===!1?!1:b.representations.filter(S=>S.isSupported===!0&&S.decipherable!==!1).length>0);if(s===void 0){let b=new he("NO_PLAYABLE_REPRESENTATION",`No ${e} Representation can be played`,{tracks:void 0});this.trigger("error",b),this.dispose();return}let d=(p=Yn(this._storedPeriodInfo,r.id))==null?void 0:p[e];if(w(d))return;let c=e==="audio"?this._defaultAudioTrackSwitchingMode:"reload",m={adaptation:s,switchingMode:c,lockedRepresentations:new oe(null)};d.storedSettings=m,this.trigger("trackUpdate",{period:Ua(r),trackType:e,reason:"no-playable-representation"}),!this._isDisposed&&(d=(y=Yn(this._storedPeriodInfo,r.id))==null?void 0:y[e],!(w(d)||d.storedSettings!==m)&&((v=d.dispatcher)==null||v.updateTrack(m)))}),o.addEventListener("noPlayableLockedRepresentation",()=>{a==null||a.lockedRepresentations.setValue(null),this.trigger("brokenRepresentationsLock",{period:{id:r.id,start:r.start,end:r.end},trackType:e})}),o.start(a)}removeTrackReference(e,r){let n=Kze(this._storedPeriodInfo,r);if(n===void 0){k.warn(`TS: ${e} not found for period`,r.start);return}let i=this._storedPeriodInfo[n],a=i[e];if((a==null?void 0:a.dispatcher)===null){k.warn(`TS: TrackDispatcher already removed for ${e} and Period ${r.start}`);return}a.dispatcher.dispose(),a.dispatcher=null,iP(i)&&this._removePeriodObject(n)}getPeriodObjectFromPeriod(e){let r=Yn(this._storedPeriodInfo,e.id);return r===void 0&&e!==void 0?this._cachedPeriodInfo.get(e):r}getPeriodObjectFromId(e){return Yn(this._storedPeriodInfo,e)}disableVideoTrickModeTracks(){this._isTrickModeTrackEnabled&&(this._isTrickModeTrackEnabled=!1,this._resetVideoTrackChoices("trickmode-disabled"))}enableVideoTrickModeTracks(){this._isTrickModeTrackEnabled||(this._isTrickModeTrackEnabled=!0,this._resetVideoTrackChoices("trickmode-enabled"))}resetPeriodObjects(){var e,r,n;for(let i=this._storedPeriodInfo.length-1;i>=0;i--){let a=this._storedPeriodInfo[i];(e=a.audio.dispatcher)==null||e.dispose(),a.audio.dispatcher=null,(r=a.video.dispatcher)==null||r.dispose(),a.video.dispatcher=null,(n=a.text.dispatcher)==null||n.dispose(),a.text.dispatcher=null,a.inManifest||this._removePeriodObject(i)}}isTrickModeEnabled(){return this._isTrickModeTrackEnabled}setAudioTrack(e){let{periodRef:r,trackId:n,switchingMode:i,lockedRepresentations:a,relativeResumingPosition:o}=e;return this._setAudioOrTextTrack({bufferType:"audio",periodRef:r,trackId:n,switchingMode:i!=null?i:this._defaultAudioTrackSwitchingMode,lockedRepresentations:a,relativeResumingPosition:o})}setTextTrack(e,r){return this._setAudioOrTextTrack({bufferType:"text",periodRef:e,trackId:r,switchingMode:"direct",lockedRepresentations:null,relativeResumingPosition:void 0})}_setAudioOrTextTrack({bufferType:e,periodRef:r,trackId:n,switchingMode:i,lockedRepresentations:a,relativeResumingPosition:o}){var y,v;let s=r.period,d=ce((y=s.adaptations[e])!=null?y:[],({id:b,isSupported:T})=>T===!0&&b===n);if(d===void 0)throw new Error(`Wanted ${e} track not found.`);let c=r[e],m;if(a===null)m=new oe(null);else{let b=this._getRepresentationsToLock(d,a),T=e==="audio"?this._defaultAudioTrackSwitchingMode:"direct";m=new oe({representationIds:b,switchingMode:T})}let f={adaptation:d,switchingMode:i,lockedRepresentations:m,relativeResumingPosition:o};if(c.storedSettings=f,this.trigger("trackUpdate",{period:Ua(s),trackType:e,reason:"manual"}),this._isDisposed)return;let p=Yn(this._storedPeriodInfo,s.id);p!==void 0&&p[e].storedSettings===f&&((v=p[e].dispatcher)==null||v.updateTrack(f))}setVideoTrack(e){var b,T;let{periodRef:r,trackId:n,switchingMode:i,lockedRepresentations:a,relativeResumingPosition:o}=e,s=r.period,d=ce((b=s.adaptations.video)!=null?b:[],({id:S,isSupported:I})=>I===!0&&S===n);if(d===void 0)throw new Error("Wanted video track not found.");let{DEFAULT_VIDEO_TRACK_SWITCHING_MODE:c}=Q.getCurrent(),m=r.video,f=fI(d,this._isTrickModeTrackEnabled),p;if(a===null)p=new oe(null);else{let S=this._getRepresentationsToLock(d,a),I=c;p=new oe({representationIds:S,switchingMode:I})}let y={adaptationBase:d,switchingMode:i!=null?i:c,adaptation:f,relativeResumingPosition:o,lockedRepresentations:p};if(m.storedSettings=y,this.trigger("trackUpdate",{period:Ua(s),trackType:"video",reason:"manual"}),this._isDisposed)return;let v=Yn(this._storedPeriodInfo,s.id);v!==void 0&&v.video.storedSettings===y&&((T=v.video.dispatcher)==null||T.updateTrack(y))}disableTrack(e,r){var a,o;let n=e[r];if(n.storedSettings===null||(r!=="text"&&((a=e[r].storedSettings)==null||a.lockedRepresentations.finish()),n.storedSettings=null,this.trigger("trackUpdate",{period:Ua(e.period),trackType:r,reason:"manual"}),this._isDisposed))return;let i=Yn(this._storedPeriodInfo,e.period.id);i!==void 0&&i[r].storedSettings===null&&((o=i[r].dispatcher)==null||o.updateTrack(null))}getChosenAudioTrack(e){return e.audio.storedSettings===null?null:FS(e.audio.storedSettings.adaptation,!0)}getChosenTextTrack(e){return e.text.storedSettings===null?null:KS(e.text.storedSettings.adaptation)}getChosenVideoTrack(e){return e.video.storedSettings===null?null:zS(e.video.storedSettings.adaptation,!0)}getAvailableAudioTracks(e){let r=e.audio.storedSettings,n=r!==null?r.adaptation.id:null;return Si(e.period,"audio").map(a=>{let o=n===null?!1:n===a.id;return le(FS(a,!0),{active:o})})}getAvailableTextTracks(e){let r=e.text.storedSettings,n=r!==null?r.adaptation.id:null;return Si(e.period,"text").map(a=>{let o=n===null?!1:n===a.id;return le(KS(a),{active:o})})}getAvailableVideoTracks(e){let r=e.video.storedSettings,n=r===null?void 0:r.adaptation.id;return Si(e.period,"video").map(a=>{let o=n===null?!1:n===a.id,s=zS(a,!0),d=s.trickModeTracks!==void 0?s.trickModeTracks.map(m=>{let f=n===null?!1:n===m.id;return le(m,{active:f})}):[],c=le(s,{active:o});return d!==void 0&&(c.trickModeTracks=d),c})}getLockedAudioRepresentations(e){let{storedSettings:r}=e.audio;if(r===null)return null;let n=r.lockedRepresentations.getValue();return n===null?null:n.representationIds}getLockedVideoRepresentations(e){let{storedSettings:r}=e.video;if(r===null)return null;let n=r.lockedRepresentations.getValue();return n===null?null:n.representationIds}lockAudioRepresentations(e,r){var s;let{storedSettings:n}=e.audio;if(n===null)return;let{DEFAULT_AUDIO_REPRESENTATIONS_SWITCHING_MODE:i}=Q.getCurrent(),a=this._getRepresentationsToLock(n.adaptation,r.representations),o=(s=r.switchingMode)!=null?s:i;n.lockedRepresentations.setValue({representationIds:a,switchingMode:o})}lockVideoRepresentations(e,r){var s;let{storedSettings:n}=e.video;if(n===null)return;let{DEFAULT_VIDEO_REPRESENTATIONS_SWITCHING_MODE:i}=Q.getCurrent(),a=this._getRepresentationsToLock(n.adaptation,r.representations),o=(s=r.switchingMode)!=null?s:i;n.lockedRepresentations.setValue({representationIds:a,switchingMode:o})}unlockAudioRepresentations(e){let{storedSettings:r}=e.audio;r===null||r.lockedRepresentations.getValue()===null||r.lockedRepresentations.setValue(null)}unlockVideoRepresentations(e){let{storedSettings:r}=e.video;r===null||r.lockedRepresentations.getValue()===null||r.lockedRepresentations.setValue(null)}dispose(){for(this._isDisposed=!0;;){let e=this._storedPeriodInfo.pop();if(e===void 0)return;e.isRemoved=!0}}_resetVideoTrackChoices(e){var n;for(let i=0;i{let o=ce(e.representations,s=>s.id===a);return o===void 0?k.warn("API: Wanted locked Representation not found."):i.push(o.id),i},[]);if(n.length===0)throw new Error("Cannot lock Representations: None of the given Representation id are found");return n}};function Kze(t,e){for(let r=0;rb.isForcedSubtitles===!0);if(f.length>0){if(i!=null){let b=ce(f,T=>T.normalizedLanguage===i.normalizedLanguage);b!==void 0&&(m=b)}m===null&&(m=(v=ce(f,b=>b.normalizedLanguage===void 0))!=null?v:null)}let p=null;return m!==null&&(p={adaptation:m,switchingMode:"direct",lockedRepresentations:new oe(null)}),{period:t,inManifest:e,isPeriodAdvertised:!1,isRemoved:!1,audio:{storedSettings:d,dispatcher:null},video:{storedSettings:c,dispatcher:null},text:{storedSettings:p,dispatcher:null}}}function Ua(t){return{start:t.start,end:t.end,id:t.id}}var PZ=kp;u();l();function OZ(t){let e,r,n,i,a,o,{DEFAULT_BASE_BANDWIDTH:s,DEFAULT_VIDEO_RESOLUTION_LIMIT:d,DEFAULT_MAX_BUFFER_AHEAD:c,DEFAULT_MAX_BUFFER_BEHIND:m,DEFAULT_MAX_VIDEO_BUFFER_SIZE:f,DEFAULT_THROTTLE_VIDEO_BITRATE_WHEN_HIDDEN:p,DEFAULT_WANTED_BUFFER_AHEAD:y}=Q.getCurrent();if(w(t.maxBufferAhead))e=c;else if(e=Number(t.maxBufferAhead),isNaN(e))throw new Error("Invalid maxBufferAhead parameter. Should be a number.");if(w(t.maxBufferBehind))r=m;else if(r=Number(t.maxBufferBehind),isNaN(r))throw new Error("Invalid maxBufferBehind parameter. Should be a number.");if(w(t.wantedBufferAhead))n=y;else if(n=Number(t.wantedBufferAhead),isNaN(n))throw new Error("Invalid wantedBufferAhead parameter. Should be a number.");if(w(t.maxVideoBufferSize))i=f;else if(i=Number(t.maxVideoBufferSize),isNaN(i))throw new Error("Invalid maxVideoBufferSize parameter. Should be a number.");let v=w(t.videoResolutionLimit)?d:t.videoResolutionLimit,b=w(t.throttleVideoBitrateWhenHidden)?p:!!t.throttleVideoBitrateWhenHidden;if(w(t.videoElement))a=document.createElement("video");else if(t.videoElement instanceof HTMLMediaElement)a=t.videoElement;else throw new Error("Invalid videoElement parameter. Should be a HTMLMediaElement.");if(w(t.baseBandwidth))o=s;else if(o=Number(t.baseBandwidth),isNaN(o))throw new Error("Invalid baseBandwidth parameter. Should be a number.");return{maxBufferAhead:e,maxBufferBehind:r,videoResolutionLimit:v,videoElement:a,wantedBufferAhead:n,maxVideoBufferSize:i,throttleVideoBitrateWhenHidden:b,baseBandwidth:o}}function LZ(t){var e,r,n,i;if(t===null||typeof t!="object"&&t!==void 0)throw new Error("API: reload - Invalid options format.");if((t==null?void 0:t.reloadAt)===null||typeof(t==null?void 0:t.reloadAt)!="object"&&(t==null?void 0:t.reloadAt)!==void 0)throw new Error("API: reload - Invalid 'reloadAt' option format.");if(typeof((e=t==null?void 0:t.reloadAt)==null?void 0:e.position)!="number"&&((r=t==null?void 0:t.reloadAt)==null?void 0:r.position)!==void 0)throw new Error("API: reload - Invalid 'reloadAt.position' option format.");if(typeof((n=t==null?void 0:t.reloadAt)==null?void 0:n.relative)!="number"&&((i=t==null?void 0:t.reloadAt)==null?void 0:i.relative)!==void 0)throw new Error("API: reload - Invalid 'reloadAt.relative' option format.");if(!Array.isArray(t==null?void 0:t.keySystems)&&(t==null?void 0:t.keySystems)!==void 0)throw new Error("API: reload - Invalid 'keySystems' option format.");if((t==null?void 0:t.autoPlay)!==void 0&&typeof t.autoPlay!="boolean")throw new Error("API: reload - Invalid 'autoPlay' option format.")}function NZ(t){var R,M,C;let e,r,n,i,a,o,s,{DEFAULT_AUTO_PLAY:d,DEFAULT_CODEC_SWITCHING_BEHAVIOR:c,DEFAULT_ENABLE_FAST_SWITCHING:m,DEFAULT_TEXT_TRACK_MODE:f}=Q.getCurrent();if(w(t))throw new Error("No option set on loadVideo");if(!w(t.url))e=String(t.url);else if(w(t.initialManifest)&&w(t.manifestLoader))throw new Error("Unable to load a content: no url set on loadVideo.\nPlease provide at least either an `url` argument, a `initialManifest` option or a `manifestLoader` option so the RxPlayer can load the content.");if(w(t.transport))throw new Error("No transport set on loadVideo");r=String(t.transport);let p=w(t.autoPlay)?d:!!t.autoPlay;if(w(t.keySystems))n=[];else{n=Array.isArray(t.keySystems)?t.keySystems:[t.keySystems];for(let A of n)if(typeof A.type!="string"||typeof A.getLicense!="function")throw new Error("Invalid key system given: Missing type string or getLicense callback")}let y=t.lowLatencyMode===void 0?!1:!!t.lowLatencyMode,v=t.initialManifest,b=(R=t.minimumManifestUpdateInterval)!=null?R:0,T=(M=t.defaultAudioTrackSwitchingMode)!=null?M:void 0;T!==void 0&&!ve(["seamless","direct","reload"],T)&&(k.warn("The `defaultAudioTrackSwitchingMode` loadVideo option must match one of the following strategy name:\n- `seamless`\n- `direct`\n- `reload`"),T=void 0);let S=w(t.onCodecSwitch)?c:t.onCodecSwitch;if(ve(["continue","reload"],S)||(k.warn("The `onCodecSwitch` loadVideo option must match one of the following string:\n- `continue`\n- `reload`\nIf badly set, "+c+" will be used as default"),S=c),w(t.textTrackMode))i=f;else{if(t.textTrackMode!=="native"&&t.textTrackMode!=="html")throw new Error("Invalid textTrackMode.");i=t.textTrackMode}if(i==="html"){if(w(t.textTrackElement))throw new Error('You have to provide a textTrackElement in "html" textTrackMode.');if(t.textTrackElement instanceof HTMLElement)o=t.textTrackElement;else throw new Error("textTrackElement should be an HTMLElement.")}else w(t.textTrackElement)||k.warn('API: You have set a textTrackElement without being in an "html" textTrackMode. It will be ignored.');if(w(t.mode))a="auto";else{if(!ve(["auto","multithread","main"],t.mode))throw new Error("Invalid `mode` option.");a=t.mode}let I=w(t.enableFastSwitching)?m:t.enableFastSwitching;if(!w(t.startAt))if("wallClockTime"in t.startAt&&t.startAt.wallClockTime instanceof Date){let A=t.startAt.wallClockTime.getTime()/1e3;s=le({},t.startAt,{wallClockTime:A})}else s=t.startAt;let E=(C=t.requestConfig)!=null?C:{};return{__priv_patchLastSegmentInSidx:t.__priv_patchLastSegmentInSidx,__priv_manifestUpdateUrl:t.__priv_manifestUpdateUrl,checkMediaSegmentIntegrity:t.checkMediaSegmentIntegrity,autoPlay:p,defaultAudioTrackSwitchingMode:T,enableFastSwitching:I,initialManifest:v,keySystems:n,lowLatencyMode:y,manifestLoader:t.manifestLoader,minimumManifestUpdateInterval:b,requestConfig:E,onCodecSwitch:S,referenceDateTime:t.referenceDateTime,representationFilter:t.representationFilter,segmentLoader:t.segmentLoader,serverSyncInfos:t.serverSyncInfos,startAt:s,textTrackElement:o,textTrackMode:i,transport:r,mode:a,url:e}}u();l();function DZ(t,e,r,n,i){if(i.isCancelled()||t===null)return;let a=e.getReference().getValue().seeking===2;a&&(r(),i.isCancelled())||e.listen(o=>{o.event==="seeking"?(a=!0,r()):a&&o.event==="seeked"&&(a=!1,n())},{includeLastObservation:!0,clearSignal:i})}function qZ(t,e,r,n){n.isCancelled()||t===null||(t.addEventListener("play",e),t.addEventListener("pause",r),n.register(()=>{t.removeEventListener("play",e),t.removeEventListener("pause",r)}))}function BZ(t,e,r,n){let i=new oe("LOADING",n);t.addEventListener("loaded",()=>{if(i.getValue()==="LOADING"){if(i.setValue("LOADED"),!n.isCancelled()){let s=oP(e,null);s!=="PAUSED"&&i.setValue(s)}}else i.getValue()==="RELOADING"?i.setValue(oP(e,null)):o(null)},n),t.addEventListener("reloadingMediaSource",()=>{Ud(i.getValue())&&i.setValueIfChanged("RELOADING")},n);let a=null;return t.addEventListener("stalled",s=>{s!==a&&(o(s),a=s)},n),t.addEventListener("unstalled",()=>{a!==null&&(o(null),a=null)},n),r.listen(s=>{ve(["seeking","ended","play","pause"],s.event)&&o(a)},{clearSignal:n}),i;function o(s){if(!Ud(i.getValue()))return;let d=oP(e,s);i.getValue()==="LOADED"&&d==="PAUSED"||i.setValueIfChanged(d)}}function oP(t,e){let{FORCED_ENDED_THRESHOLD:r}=Q.getCurrent();if(t.ended)return"ENDED";if(e!==null){let n=Math.abs(t.duration-t.currentTime);return!w(r)&&n{this.trigger("volumeChange",{volume:s.volume,muted:s.muted})};s.addEventListener("volumechange",f),m.signal.register(()=>{s.removeEventListener("volumechange",f)})}attachWorker(e){return new Promise((r,n)=>{var a;if(!oA())return k.warn("API: Cannot rely on a WebWorker: Worker API unavailable"),n(new fu("INCOMPATIBLE_ERROR","Worker unavailable"));if(typeof e.workerUrl=="string")this._priv_worker=new Worker(e.workerUrl);else{let o=URL.createObjectURL(e.workerUrl);this._priv_worker=new Worker(o),URL.revokeObjectURL(o)}this._priv_worker.onerror=o=>{this._priv_worker!==null&&(this._priv_worker.terminate(),this._priv_worker=null),k.error("API: Unexpected worker error",o.error instanceof Error?o.error:void 0),n(new fu("UNKNOWN_ERROR",'Unexpected Worker "error" event'))};let i=o=>{let s=o.data;s.type==="init-error"?(k.warn("API: Processing InitError worker message: detaching worker"),this._priv_worker!==null&&(this._priv_worker.removeEventListener("message",i),this._priv_worker.terminate(),this._priv_worker=null),n(new fu("SETUP_ERROR","Worker parser initialization failed: "+s.value.errorMessage))):s.type==="init-success"&&(k.info("API: InitSuccess received from worker."),this._priv_worker!==null&&this._priv_worker.removeEventListener("message",i),r())};this._priv_worker.addEventListener("message",i),k.debug("---> Sending To Worker:","init"),this._priv_worker.postMessage({type:"init",value:{dashWasmUrl:e.dashWasmUrl,logLevel:k.getLevel(),sendBackLogs:Md(),date:Date.now(),timestamp:re(),hasVideo:((a=this.videoElement)==null?void 0:a.nodeName.toLowerCase())==="video",hasMseInWorker:DS}}),k.addEventListener("onLogLevelChange",o=>{this._priv_worker!==null&&(k.debug("---> Sending To Worker:","log-level-update"),this._priv_worker.postMessage({type:"log-level-update",value:{logLevel:o,sendBackLogs:Md()}}))},this._destroyCanceller.signal)})}getCurrentModeInformation(){return this._priv_contentInfos===null?null:{isDirectFile:this._priv_contentInfos.isDirectFile,useWorker:this._priv_contentInfos.useWorker}}addEventListener(e,r){return super.addEventListener(e,r)}stop(){this._priv_contentInfos!==null&&this._priv_contentInfos.currentContentCanceller.cancel(),this._priv_cleanUpCurrentContentState(),this.state!=="STOPPED"&&this._priv_setPlayerState("STOPPED")}dispose(){this.stop(),this.videoElement!==null&&(Fa._priv_deregisterVideoElement(this.videoElement),Od(this.videoElement).catch(e=>{let r=e instanceof Error?e.message:"Unknown error";k.error("API: Could not dispose decryption resources: "+r)})),this._destroyCanceller.cancel(),this._priv_reloadingMetadata={},this.videoElement=null,this._priv_worker!==null&&(this._priv_worker.terminate(),this._priv_worker=null)}loadVideo(e){let r=NZ(e);k.info("API: Calling loadvideo",r.url,r.transport),this._priv_reloadingMetadata={options:r},this._priv_initializeContentPlayback(r),this._priv_lastAutoPlay=r.autoPlay}reload(e){var m,f,p;let{options:r,manifest:n,reloadPosition:i,reloadInPause:a}=this._priv_reloadingMetadata;if(r===void 0)throw new Error("API: Can't reload without having previously loaded a content.");LZ(e);let o;if(((m=e==null?void 0:e.reloadAt)==null?void 0:m.position)!==void 0)o={position:e.reloadAt.position};else if(((f=e==null?void 0:e.reloadAt)==null?void 0:f.relative)!==void 0){if(i===void 0)throw new Error("Can't reload to a relative position when previous content was not loaded.");o={position:e.reloadAt.relative+i}}else i!==void 0&&(o={position:i});let s;(e==null?void 0:e.autoPlay)!==void 0?s=e.autoPlay:a!==void 0&&(s=!a);let d;(e==null?void 0:e.keySystems)!==void 0?d=e.keySystems:((p=this._priv_reloadingMetadata.options)==null?void 0:p.keySystems)!==void 0&&(d=this._priv_reloadingMetadata.options.keySystems);let c=nt(je({},r),{initialManifest:n});o!==void 0&&(c.startAt=o),s!==void 0&&(c.autoPlay=s),d!==void 0&&(c.keySystems=d),this._priv_initializeContentPlayback(c)}createDebugElement(e){if(Ee.createDebugElement===null)throw new Error("Feature `DEBUG_ELEMENT` not added to the RxPlayer");let r=new X;return Ee.createDebugElement(e,this,r.signal),{dispose(){r.cancel()}}}_priv_initializeContentPlayback(e){var U,j,Y,W,se,Z;let{autoPlay:r,defaultAudioTrackSwitchingMode:n,enableFastSwitching:i,initialManifest:a,keySystems:o,lowLatencyMode:s,minimumManifestUpdateInterval:d,requestConfig:c,onCodecSwitch:m,startAt:f,transport:p,checkMediaSegmentIntegrity:y,manifestLoader:v,referenceDateTime:b,segmentLoader:T,serverSyncInfos:S,mode:I,__priv_manifestUpdateUrl:E,__priv_patchLastSegmentInSidx:R,url:M}=e;if(this.videoElement===null)throw new Error("the attached video element is disposed");let C=p==="directfile",A=new X,x=this.videoElement,O,D=!1,F=null;if(C){if(Ee.directfile===null)throw this.stop(),this._priv_currentError=null,new Error("DirectFile feature not activated in your build.");if(w(M))throw new Error("No URL for a DirectFile content");if(k.info("API: Initializing DirectFile mode in the main thread"),F=this._priv_initializeMediaElementTracksStore(A.signal),A.isUsed())return;O=new Ee.directfile.initDirectFile({autoPlay:r,keySystems:o,speed:this._priv_speed,startAt:f,url:M})}else{let $={lowLatencyMode:s,maxRetry:(U=c.manifest)==null?void 0:U.maxRetry,requestTimeout:(j=c.manifest)==null?void 0:j.timeout,connectionTimeout:(Y=c.manifest)==null?void 0:Y.connectionTimeout,minimumManifestUpdateInterval:d,initialManifest:a},ue=nA(),Le={throttleBitrate:{},limitResolution:{}};this._priv_throttleVideoBitrateWhenHidden&&(ue?Le.throttleBitrate={video:lu(_X(this._priv_pictureInPictureRef,A.signal),Ot=>Ot?1/0:0,A.signal)}:k.warn("API: Can't apply throttleVideoBitrateWhenHidden because browser can't be trusted for visibility.")),this._priv_videoResolutionLimit==="videoElement"?ue?Le.limitResolution={video:MX(x,this._priv_pictureInPictureRef,A.signal)}:k.warn("API: Can't apply videoResolutionLimit because browser can't be trusted for video size."):this._priv_videoResolutionLimit==="screen"&&(Le.limitResolution={video:RX(A.signal)});let Re={initialBitrates:this._priv_bitrateInfos.lastBitrates,lowLatencyMode:s,throttlers:Le},ne=e.textTrackMode==="native"?{textTrackMode:"native"}:{textTrackMode:"html",textTrackElement:e.textTrackElement},de=le({enableFastSwitching:i,onCodecSwitch:m},this._priv_bufferOptions),Wt={lowLatencyMode:s,maxRetry:(W=c.segment)==null?void 0:W.maxRetry,requestTimeout:(se=c.segment)==null?void 0:se.timeout,connectionTimeout:(Z=c.segment)==null?void 0:Z.connectionTimeout},Pt=Ee.multithread!==null&&this._priv_worker!==null&&p==="dash"&&jze.every(Ot=>w(e[Ot]))&&typeof e.representationFilter!="function";if(I==="main"||I==="auto"&&!Pt){if(Ee.mainThreadMediaSourceInit===null)throw new Error("Cannot load video, neither in a WebWorker nor with the `MEDIA_SOURCE_MAIN` feature");let Ot=Ee.transports[p];if(typeof Ot!="function")throw this.stop(),this._priv_currentError=null,new Error(`transport "${p}" not supported`);let Rr=typeof e.representationFilter=="string"?GX(e.representationFilter):e.representationFilter;k.info("API: Initializing MediaSource mode in the main thread");let Mr=Ot({lowLatencyMode:s,checkMediaSegmentIntegrity:y,manifestLoader:v,referenceDateTime:b,representationFilter:Rr,segmentLoader:T,serverSyncInfos:S,__priv_manifestUpdateUrl:E,__priv_patchLastSegmentInSidx:R});O=new Ee.mainThreadMediaSourceInit({adaptiveOptions:Re,autoPlay:r,bufferOptions:de,keySystems:o,lowLatencyMode:s,transport:Mr,manifestRequestSettings:$,segmentRequestOptions:Wt,speed:this._priv_speed,startAt:f,textTrackOptions:ne,url:M})}else{if(Ee.multithread===null)throw new Error("Cannot load video in multithread mode: `MULTI_THREAD` feature not imported.");if(this._priv_worker===null)throw new Error("Cannot load video in multithread mode: `attachWorker` method not called.");be(typeof e.representationFilter!="function"),D=!0,k.info("API: Initializing MediaSource mode in a WebWorker");let Ot={lowLatencyMode:s,checkMediaSegmentIntegrity:y,referenceDateTime:b,serverSyncInfos:S,manifestLoader:void 0,segmentLoader:void 0,representationFilter:e.representationFilter,__priv_manifestUpdateUrl:E,__priv_patchLastSegmentInSidx:R};O=new Ee.multithread.init({adaptiveOptions:Re,autoPlay:r,bufferOptions:de,keySystems:o,lowLatencyMode:s,transportOptions:Ot,manifestRequestSettings:$,segmentRequestOptions:Wt,speed:this._priv_speed,startAt:f,textTrackOptions:ne,worker:this._priv_worker,url:M})}}let K={contentId:zze(),originalUrl:M,currentContentCanceller:A,defaultAudioTrackSwitchingMode:n,initializer:O,isDirectFile:C,manifest:null,currentPeriod:null,activeAdaptations:null,activeRepresentations:null,tracksStore:null,mediaElementTracksStore:F,useWorker:D};O.addEventListener("error",$=>{this._priv_onFatalError($,K)}),O.addEventListener("warning",$=>{let ue=er($,{defaultCode:"NONE",defaultReason:"An unknown error happened."});k.warn("API: Sending warning:",ue),this.trigger("warning",ue)}),O.addEventListener("reloadingMediaSource",$=>{K.tracksStore!==null&&K.tracksStore.resetPeriodObjects(),this._priv_segmentSinkMetricsCallback=null,this._priv_lastAutoPlay=$.autoPlay}),O.addEventListener("inbandEvents",$=>this.trigger("inbandEvents",$)),O.addEventListener("streamEvent",$=>this.trigger("streamEvent",$)),O.addEventListener("streamEventSkip",$=>this.trigger("streamEventSkip",$)),O.addEventListener("activePeriodChanged",$=>this._priv_onActivePeriodChanged(K,$)),O.addEventListener("periodStreamReady",$=>this._priv_onPeriodStreamReady(K,$)),O.addEventListener("periodStreamCleared",$=>this._priv_onPeriodStreamCleared(K,$)),O.addEventListener("representationChange",$=>this._priv_onRepresentationChange(K,$)),O.addEventListener("adaptationChange",$=>this._priv_onAdaptationChange(K,$)),O.addEventListener("bitrateEstimateChange",$=>this._priv_onBitrateEstimateChange($)),O.addEventListener("manifestReady",$=>this._priv_onManifestReady(K,$)),O.addEventListener("manifestUpdate",$=>this._priv_onManifestUpdate(K,$)),O.addEventListener("decipherabilityUpdate",$=>this._priv_onDecipherabilityUpdate(K,$)),O.addEventListener("loaded",$=>{this._priv_segmentSinkMetricsCallback=$.getSegmentSinkMetrics}),O.prepare(),this.stop();let P=new Jm(x,{withMediaSource:!C,lowLatencyMode:s});A.signal.register(()=>{P.stop()});let L=BZ(O,x,P,A.signal);A.signal.register(()=>{O.dispose()});let V=$=>{switch($){case"STOPPED":case"RELOADING":case"LOADING":break;case"ENDED":this._priv_reloadingMetadata.reloadInPause=!0,this._priv_reloadingMetadata.reloadPosition=P.getReference().getValue().position.getPolled();break;default:let ue=P.getReference().getValue();this._priv_reloadingMetadata.reloadInPause=ue.paused,this._priv_reloadingMetadata.reloadPosition=ue.position.getWanted();break}},z=null,N=$=>{z!==null&&(z.cancel(),z=null),L.onUpdate((ue,Le)=>{Ud(ue)&&(Le(),z!==null&&z.cancel(),z=new X,z.linkToSignal(A.signal),$!==!x.paused&&(x.paused?this.trigger("pause",null):this.trigger("play",null)),qZ(x,()=>this.trigger("play",null),()=>this.trigger("pause",null),A.signal))},{emitCurrentValue:!1,clearSignal:A.signal})};N(r),O.addEventListener("reloadingMediaSource",$=>{N($.autoPlay)}),this._priv_currentError=null,this._priv_contentInfos=K;let B=null;L.onUpdate($=>{V($),this._priv_setPlayerState($),!A.isUsed()&&(B!==null?Ud(this.state)||(B.cancel(),B=null):Ud(this.state)&&(B=new X,B.linkToSignal(A.signal),DZ(x,P,()=>this.trigger("seeking",null),()=>this.trigger("seeked",null),B.signal)))},{emitCurrentValue:!0,clearSignal:A.signal}),P.listen($=>{V(this.state),this._priv_triggerPositionUpdate(K,$)},{clearSignal:A.signal}),A.signal.register(()=>{O.removeEventListener()}),this._priv_contentLock.onUpdate(($,ue)=>{$||(ue(),O.start(x,P))},{emitCurrentValue:!0,clearSignal:A.signal})}getError(){return this._priv_currentError}getVideoElement(){return this.videoElement}getPlayerState(){return this.state}isContentLoaded(){return!ve(["LOADING","RELOADING","STOPPED"],this.state)}isBuffering(){return ve(["BUFFERING","SEEKING","LOADING","RELOADING"],this.state)}isPaused(){return this.videoElement?ve(["LOADING","RELOADING"],this.state)?!this._priv_lastAutoPlay:this.videoElement.paused:!0}isLive(){if(this._priv_contentInfos===null)return!1;let{isDirectFile:e,manifest:r}=this._priv_contentInfos;return e||r===null?!1:r.isLive}areTrickModeTracksEnabled(){return this._priv_preferTrickModeTracks}getContentUrls(){if(this._priv_contentInfos===null)return;let{isDirectFile:e,manifest:r,originalUrl:n}=this._priv_contentInfos;if(e)return n===void 0?void 0:[n];if(r!==null)return r.uris}updateContentUrls(e,r){if(this._priv_contentInfos===null)throw new Error("No content loaded");let n=(r==null?void 0:r.refresh)===!0;this._priv_contentInfos.initializer.updateContentUrls(e,n)}getMediaDuration(){if(this.videoElement===null)throw new Error("Disposed player");return this.videoElement.duration}getCurrentBufferGap(){if(this.videoElement===null)throw new Error("Disposed player");let e=this.videoElement,r=rZ(e.buffered,e.currentTime);return r===1/0?0:r}getWallClockTime(){if(this.videoElement===null)throw new Error("Disposed player");if(this._priv_contentInfos===null)return this.videoElement.currentTime;let{isDirectFile:e,manifest:r}=this._priv_contentInfos;if(e){let n=Hm(this.videoElement);return(n!=null?n:0)+this.videoElement.currentTime}if(r!==null){let n=this.videoElement.currentTime,i=r.availabilityStartTime!==void 0?r.availabilityStartTime:0;return n+i}return 0}getPosition(){if(this.videoElement===null)throw new Error("Disposed player");return this.videoElement.currentTime}getLastStoredContentPosition(){return this._priv_reloadingMetadata.reloadPosition}getPlaybackRate(){return this._priv_speed.getValue()}setPlaybackRate(e,r){var a;e!==this._priv_speed.getValue()&&this._priv_speed.setValue(e);let n=r==null?void 0:r.preferTrickModeTracks;if(typeof n!="boolean")return;this._priv_preferTrickModeTracks=n;let i=(a=this._priv_contentInfos)==null?void 0:a.tracksStore;w(i)||(n&&!i.isTrickModeEnabled()?i.enableVideoTrickModeTracks():!n&&i.isTrickModeEnabled()&&i.disableVideoTrickModeTracks())}getVideoRepresentation(){let e=this.__priv_getCurrentRepresentations();if(e!==null)return e.video}getAudioRepresentation(){let e=this.__priv_getCurrentRepresentations();if(e!==null)return e.audio}play(){if(this.videoElement===null)throw new Error("Disposed player");let e=this.videoElement.play();return w(e)||typeof e.catch!="function"?Promise.resolve():e.catch(r=>{if(r.name==="NotAllowedError"){let n=new he("MEDIA_ERR_PLAY_NOT_ALLOWED",r.toString());this.trigger("warning",n)}throw r})}pause(){if(this.videoElement===null)throw new Error("Disposed player");this.videoElement.pause()}seekTo(e){var a;if(this.videoElement===null)throw new Error("Disposed player");if(this._priv_contentInfos===null)throw new Error("player: no content loaded");let{isDirectFile:r,manifest:n}=this._priv_contentInfos;if(!r&&n===null)throw new Error("player: the content did not load yet");let i;if(typeof e=="number")i=e;else if(typeof e=="object"){let o=e,s=this.videoElement.currentTime;if(!w(o.relative))i=s+o.relative;else if(!w(o.position))i=o.position;else{if(w(o.wallClockTime))throw new Error('invalid time object. You must set one of the following properties: "relative", "position" or "wallClockTime"');if(n!==null)i=o.wallClockTime-((a=n.availabilityStartTime)!=null?a:0);else if(r&&this.videoElement!==null){let d=Hm(this.videoElement);d!==void 0&&(i=o.wallClockTime-d)}i===void 0&&(i=o.wallClockTime)}}if(i===void 0)throw new Error("invalid time given");return k.info("API: API Seek to",i),this.videoElement.currentTime=i,i}getVolume(){if(this.videoElement===null)throw new Error("Disposed player");return this.videoElement.volume}setVolume(e){if(this.videoElement===null)throw new Error("Disposed player");let r=this.videoElement;e!==r.volume&&(r.volume=e)}isMute(){var e;return((e=this.videoElement)==null?void 0:e.muted)===!0}mute(){if(this.videoElement===null)throw new Error("Disposed player");this.videoElement.muted||(this.videoElement.muted=!0)}unMute(){if(this.videoElement===null)throw new Error("Disposed player");this.videoElement.muted&&(this.videoElement.muted=!1)}setMaxBufferBehind(e){this._priv_bufferOptions.maxBufferBehind.setValue(e)}setMaxBufferAhead(e){this._priv_bufferOptions.maxBufferAhead.setValue(e)}setWantedBufferAhead(e){this._priv_bufferOptions.wantedBufferAhead.setValue(e)}setMaxVideoBufferSize(e){this._priv_bufferOptions.maxVideoBufferSize.setValue(e)}getMaxBufferBehind(){return this._priv_bufferOptions.maxBufferBehind.getValue()}getMaxBufferAhead(){return this._priv_bufferOptions.maxBufferAhead.getValue()}getWantedBufferAhead(){return this._priv_bufferOptions.wantedBufferAhead.getValue()}getMaxVideoBufferSize(){return this._priv_bufferOptions.maxVideoBufferSize.getValue()}getCurrentPeriod(){var r;let e=(r=this._priv_contentInfos)==null?void 0:r.currentPeriod;return w(e)?null:{id:e.id,start:e.start,end:e.end}}getKeySystemConfiguration(){if(this.videoElement===null)throw new Error("Disposed player");let e=Yo(this.videoElement);return e===null?null:{keySystem:e[0],configuration:e[1]}}getAvailablePeriods(){if(this._priv_contentInfos===null)return[];let{isDirectFile:e,tracksStore:r}=this._priv_contentInfos;return e?[]:r===null?[]:r.getAvailablePeriods().slice()}getAvailableAudioTracks(e){var i;if(this._priv_contentInfos===null)return[];let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r?(i=n==null?void 0:n.getAvailableAudioTracks())!=null?i:[]:this._priv_callTracksStoreGetterSetter(e,[],(a,o)=>{var s;return(s=a.getAvailableAudioTracks(o))!=null?s:[]})}getAvailableTextTracks(e){var i;if(this._priv_contentInfos===null)return[];let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r?(i=n==null?void 0:n.getAvailableTextTracks())!=null?i:[]:this._priv_callTracksStoreGetterSetter(e,[],(a,o)=>{var s;return(s=a.getAvailableTextTracks(o))!=null?s:[]})}getAvailableVideoTracks(e){var i;if(this._priv_contentInfos===null)return[];let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r?(i=n==null?void 0:n.getAvailableVideoTracks())!=null?i:[]:this._priv_callTracksStoreGetterSetter(e,[],(a,o)=>{var s;return(s=a.getAvailableVideoTracks(o))!=null?s:[]})}getAudioTrack(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r?n===null?void 0:n.getChosenAudioTrack():this._priv_callTracksStoreGetterSetter(e,void 0,(i,a)=>i.getChosenAudioTrack(a))}getTextTrack(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r?n===null?void 0:n.getChosenTextTrack():this._priv_callTracksStoreGetterSetter(e,void 0,(i,a)=>i.getChosenTextTrack(a))}getVideoTrack(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r?n===null?void 0:n.getChosenVideoTrack():this._priv_callTracksStoreGetterSetter(e,void 0,(i,a)=>i.getChosenVideoTrack(a))}setAudioTrack(e){var c;if(this._priv_contentInfos===null)throw new Error("No content loaded");let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;if(r)try{let m=typeof e=="string"?e:e.trackId;n==null||n.setAudioTrackById(m);return}catch(m){throw new Error("player: unknown audio track")}let i,a,o,s=null,d;return typeof e=="string"?a=e:(a=e.trackId,i=e.periodId,o=e.switchingMode,s=(c=e.lockedRepresentations)!=null?c:null,d=e.relativeResumingPosition),this._priv_callTracksStoreGetterSetter(i,void 0,(m,f)=>m.setAudioTrack({periodRef:f,trackId:a,switchingMode:o,lockedRepresentations:s,relativeResumingPosition:d}))}setTextTrack(e){if(this._priv_contentInfos===null)throw new Error("No content loaded");let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;if(r)try{let o=typeof e=="string"?e:e.trackId;n==null||n.setTextTrackById(o);return}catch(o){throw new Error("player: unknown text track")}let i,a;return typeof e=="string"?a=e:(a=e.trackId,i=e.periodId),this._priv_callTracksStoreGetterSetter(i,void 0,(o,s)=>o.setTextTrack(s,a))}disableTextTrack(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;if(r){n==null||n.disableTextTrack();return}return this._priv_callTracksStoreGetterSetter(e,void 0,(i,a)=>i.disableTrack(a,"text"))}setVideoTrack(e){var c;if(this._priv_contentInfos===null)throw new Error("No content loaded");let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;if(r)try{let m=typeof e=="string"?e:e.trackId;n==null||n.setVideoTrackById(m);return}catch(m){throw new Error("player: unknown video track")}let i,a,o,s=null,d;return typeof e=="string"?a=e:(a=e.trackId,i=e.periodId,o=e.switchingMode,s=(c=e.lockedRepresentations)!=null?c:null,d=e.relativeResumingPosition),this._priv_callTracksStoreGetterSetter(i,void 0,(m,f)=>m.setVideoTrack({periodRef:f,trackId:a,switchingMode:o,lockedRepresentations:s,relativeResumingPosition:d}))}disableVideoTrack(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r,mediaElementTracksStore:n}=this._priv_contentInfos;return r&&n!==null?n.disableVideoTrack():this._priv_callTracksStoreGetterSetter(e,void 0,(i,a)=>i.disableTrack(a,"video"))}lockVideoRepresentations(e){if(this._priv_contentInfos===null)throw new Error("No content loaded");let{isDirectFile:r}=this._priv_contentInfos;if(r)throw new Error("Cannot lock video Representations in directfile mode.");let n,i,a;return Array.isArray(e)?(n=e,i=void 0):(n=e.representations,i=e.periodId,a=e.switchingMode),this._priv_callTracksStoreGetterSetter(i,void 0,(o,s)=>o.lockVideoRepresentations(s,{representations:n,switchingMode:a}))}lockAudioRepresentations(e){if(this._priv_contentInfos===null)throw new Error("No content loaded");let{isDirectFile:r}=this._priv_contentInfos;if(r)throw new Error("Cannot lock audio Representations in directfile mode.");let n,i,a;return Array.isArray(e)?(n=e,i=void 0):(n=e.representations,i=e.periodId,a=e.switchingMode),this._priv_callTracksStoreGetterSetter(i,void 0,(o,s)=>o.lockAudioRepresentations(s,{representations:n,switchingMode:a}))}getLockedVideoRepresentations(e){if(this._priv_contentInfos===null)return null;let{isDirectFile:r}=this._priv_contentInfos;return r?null:this._priv_callTracksStoreGetterSetter(e,null,(n,i)=>n.getLockedVideoRepresentations(i))}getLockedAudioRepresentations(e){if(this._priv_contentInfos===null)return null;let{isDirectFile:r}=this._priv_contentInfos;return r?null:this._priv_callTracksStoreGetterSetter(e,null,(n,i)=>n.getLockedAudioRepresentations(i))}unlockVideoRepresentations(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r}=this._priv_contentInfos;if(!r)return this._priv_callTracksStoreGetterSetter(e,void 0,(n,i)=>n.unlockVideoRepresentations(i))}unlockAudioRepresentations(e){if(this._priv_contentInfos===null)return;let{isDirectFile:r}=this._priv_contentInfos;if(!r)return this._priv_callTracksStoreGetterSetter(e,void 0,(n,i)=>n.unlockAudioRepresentations(i))}getMinimumPosition(){if(this._priv_contentInfos===null)return null;if(this._priv_contentInfos.isDirectFile)return 0;let{manifest:e}=this._priv_contentInfos;return e!==null?mu(e):null}getLivePosition(){if(this._priv_contentInfos===null)return null;let{isDirectFile:e,manifest:r}=this._priv_contentInfos;if(!e)return(r==null?void 0:r.isLive)!==!0?null:pu(r)}getMaximumPosition(){if(this._priv_contentInfos===null)return null;let{isDirectFile:e,manifest:r}=this._priv_contentInfos;if(e){if(this.videoElement===null)throw new Error("Disposed player");return this.videoElement.duration}return r!==null?!r.isDynamic&&this.videoElement!==null?this.videoElement.duration:Qi(r):null}async __priv_getSegmentSinkMetrics(){if(this._priv_segmentSinkMetricsCallback!==null)return this._priv_segmentSinkMetricsCallback()}__priv_getManifest(){return this._priv_contentInfos===null?null:this._priv_contentInfos.manifest}__priv_getCurrentAdaptation(){if(this._priv_contentInfos===null)return null;let{currentPeriod:e,activeAdaptations:r}=this._priv_contentInfos;return e===null||r===null||w(r[e.id])?null:r[e.id]}__priv_getCurrentRepresentations(){if(this._priv_contentInfos===null)return null;let{currentPeriod:e,activeRepresentations:r}=this._priv_contentInfos;return e===null||r===null||w(r[e.id])?null:r[e.id]}_priv_cleanUpCurrentContentState(){var r,n,i,a;k.debug("Locking `contentLock` to clean-up the current content."),this._priv_contentLock.setValue(!0),(n=(r=this._priv_contentInfos)==null?void 0:r.tracksStore)==null||n.dispose(),(a=(i=this._priv_contentInfos)==null?void 0:i.mediaElementTracksStore)==null||a.dispose(),this._priv_contentInfos=null,this._priv_segmentSinkMetricsCallback=null,this._priv_contentEventsMemory={};let e=()=>{this.videoElement!==null&&(k.debug("Unlocking `contentLock`. Next content can begin."),this._priv_contentLock.setValue(!1))};w(this.videoElement)?e():WS(this.videoElement).then(()=>{k.debug("API: DRM session cleaned-up with success!"),e()},o=>{k.error("API: An error arised when trying to clean-up the DRM session:"+(o instanceof Error?o.toString():"Unknown Error")),e()})}_priv_onManifestReady(e,r){var i;if(e.contentId!==((i=this._priv_contentInfos)==null?void 0:i.contentId))return;e.manifest=r,r.manifestFormat===0&&(this._priv_reloadingMetadata.manifest=r);let n=new PZ({preferTrickModeTracks:this._priv_preferTrickModeTracks,defaultAudioTrackSwitchingMode:e.defaultAudioTrackSwitchingMode});e.tracksStore=n,n.addEventListener("newAvailablePeriods",a=>{this.trigger("newAvailablePeriods",a)}),n.addEventListener("brokenRepresentationsLock",a=>{this.trigger("brokenRepresentationsLock",a)}),n.addEventListener("trackUpdate",a=>{var s,d;this.trigger("trackUpdate",a);let o=(d=(s=this._priv_contentInfos)==null?void 0:s.currentPeriod)!=null?d:void 0;a.reason==="no-playable-representation"&&a.period.id===(o==null?void 0:o.id)&&this._priv_onAvailableTracksMayHaveChanged(a.trackType)}),e.tracksStore.addEventListener("warning",a=>{this.trigger("warning",a)}),e.tracksStore.addEventListener("error",a=>{this._priv_onFatalError(a,e)}),e.tracksStore.onManifestUpdate(r)}_priv_onManifestUpdate(e,r){var a,o,s;if(this._priv_contentInfos===null||this._priv_contentInfos.manifest===null)return;w(e==null?void 0:e.tracksStore)||e.tracksStore.onManifestUpdate(this._priv_contentInfos.manifest);let n=(o=(a=this._priv_contentInfos)==null?void 0:a.currentPeriod)!=null?o:void 0,i=(s=this._priv_contentInfos)==null?void 0:s.tracksStore;if(!(n===void 0||w(i))){for(let d of r.updatedPeriods)if(d.period.id===n.id&&(d.result.addedAdaptations.length>0||d.result.removedAdaptations.length>0)){if(i.getPeriodObjectFromPeriod(n)===void 0)return;this._priv_onAvailableTracksMayHaveChanged("audio"),this._priv_onAvailableTracksMayHaveChanged("text"),this._priv_onAvailableTracksMayHaveChanged("video")}}}_priv_onDecipherabilityUpdate(e,r){if(e===null||e.manifest===null)return;w(e==null?void 0:e.tracksStore)||e.tracksStore.onDecipherabilityUpdates();let n=r.reduce((i,a)=>{var s,d,c;if(!(ce(i,m=>m[0].id===a.period.id&&m[1]===a.adaptation.type)!==void 0)){let m=e.tracksStore;if(m===null)return i;let f=!1,p=m.getPeriodObjectFromPeriod(a.period);if(p===void 0)return i;switch(a.adaptation.type){case"audio":f=((s=m.getChosenAudioTrack(p))==null?void 0:s.id)===a.adaptation.id;break;case"video":f=((d=m.getChosenVideoTrack(p))==null?void 0:d.id)===a.adaptation.id;break;case"text":f=((c=m.getChosenTextTrack(p))==null?void 0:c.id)===a.adaptation.id;break}f&&i.push([a.period,a.adaptation.type])}return i},[]);for(let[i,a]of n)this._priv_triggerEventIfNotStopped("representationListUpdate",{period:{start:i.start,end:i.end,id:i.id},trackType:a,reason:"decipherability-update"},e.currentContentCanceller.signal)}_priv_onActivePeriodChanged(e,{period:r}){var s,d,c,m,f,p;if(e.contentId!==((s=this._priv_contentInfos)==null?void 0:s.contentId))return;e.currentPeriod=r;let n=e.currentContentCanceller.signal;this._priv_contentEventsMemory.periodChange!==r&&(this._priv_contentEventsMemory.periodChange=r,this._priv_triggerEventIfNotStopped("periodChange",{start:r.start,end:r.end,id:r.id},n)),this._priv_triggerEventIfNotStopped("availableAudioTracksChange",this.getAvailableAudioTracks(),n),this._priv_triggerEventIfNotStopped("availableTextTracksChange",this.getAvailableTextTracks(),n),this._priv_triggerEventIfNotStopped("availableVideoTracksChange",this.getAvailableVideoTracks(),n);let i=(d=this._priv_contentInfos)==null?void 0:d.tracksStore;if(w(i))this._priv_triggerEventIfNotStopped("audioTrackChange",null,n),this._priv_triggerEventIfNotStopped("textTrackChange",null,n),this._priv_triggerEventIfNotStopped("videoTrackChange",null,n);else{let y=i.getPeriodObjectFromPeriod(r);if(y){let v=i.getChosenAudioTrack(y);this._priv_triggerEventIfNotStopped("audioTrackChange",v,n);let b=i.getChosenTextTrack(y);this._priv_triggerEventIfNotStopped("textTrackChange",b,n);let T=i.getChosenVideoTrack(y);this._priv_triggerEventIfNotStopped("videoTrackChange",T,n)}}let a=(m=(c=this.__priv_getCurrentRepresentations())==null?void 0:c.audio)!=null?m:null;this._priv_triggerEventIfNotStopped("audioRepresentationChange",a,n);let o=(p=(f=this.__priv_getCurrentRepresentations())==null?void 0:f.video)!=null?p:null;this._priv_triggerEventIfNotStopped("videoRepresentationChange",o,n)}_priv_onPeriodStreamReady(e,r){var s;if(e.contentId!==((s=this._priv_contentInfos)==null?void 0:s.contentId))return;let{type:n,period:i,adaptationRef:a}=r,o=e.tracksStore;switch(n){case"video":case"audio":case"text":w(o)?(k.error(`API: TracksStore not instanciated for a new ${n} period`),a.setValue(null)):o.addTrackReference(n,i,a);break;default:ur(n)}}_priv_onPeriodStreamCleared(e,r){var d;if(e.contentId!==((d=this._priv_contentInfos)==null?void 0:d.contentId))return;let{type:n,period:i}=r,a=e.tracksStore;switch(n){case"audio":case"text":case"video":w(a)||a.removeTrackReference(n,i);break}let{activeAdaptations:o,activeRepresentations:s}=e;if(!w(o)&&!w(o[i.id])){let c=o[i.id];delete c[n],Object.keys(c).length===0&&delete o[i.id]}if(!w(s)&&!w(s[i.id])){let c=s[i.id];delete c[n],Object.keys(c).length===0&&delete s[i.id]}}_priv_onAdaptationChange(e,{type:r,adaptation:n,period:i}){var m;if(e.contentId!==((m=this._priv_contentInfos)==null?void 0:m.contentId))return;e.activeAdaptations===null&&(e.activeAdaptations={});let{activeAdaptations:a,currentPeriod:o}=e,s=a[i.id];w(s)?a[i.id]={[r]:n}:s[r]=n;let{tracksStore:d}=e,c=e.currentContentCanceller.signal;if(d!==null&&o!==null&&!w(i)&&i.id===o.id){let f=d.getPeriodObjectFromPeriod(i);if(f===void 0)return;switch(r){case"audio":let p=d.getChosenAudioTrack(f);this._priv_triggerEventIfNotStopped("audioTrackChange",p,c);break;case"text":let y=d.getChosenTextTrack(f);this._priv_triggerEventIfNotStopped("textTrackChange",y,c);break;case"video":let v=d.getChosenVideoTrack(f);this._priv_triggerEventIfNotStopped("videoTrackChange",v,c);break}}}_priv_onRepresentationChange(e,{type:r,period:n,representation:i}){var d;if(e.contentId!==((d=this._priv_contentInfos)==null?void 0:d.contentId))return;e.activeRepresentations===null&&(e.activeRepresentations={});let{activeRepresentations:a,currentPeriod:o}=e,s=a[n.id];if(w(s)?a[n.id]={[r]:i}:s[r]=i,!w(n)&&o!==null&&o.id===n.id){let c=this._priv_contentInfos.currentContentCanceller.signal;r==="video"?this._priv_triggerEventIfNotStopped("videoRepresentationChange",i,c):r==="audio"&&this._priv_triggerEventIfNotStopped("audioRepresentationChange",i,c)}}_priv_onBitrateEstimateChange({type:e,bitrate:r}){r!==void 0&&(this._priv_bitrateInfos.lastBitrates[e]=r),this.trigger("__priv_bitrateEstimateChange",{type:e,bitrate:r})}_priv_setPlayerState(e){this.state!==e&&(this.state=e,k.info("API: playerStateChange event",e),this.trigger("playerStateChange",e))}_priv_triggerPositionUpdate(e,r){var s,d;if(e.contentId!==((s=this._priv_contentInfos)==null?void 0:s.contentId))return;let{isDirectFile:n,manifest:i}=e;if(!n&&i===null||w(r))return;let a=i!==null?Qi(i):void 0,o={position:r.position.getPolled(),duration:r.duration,playbackRate:r.playbackRate,maximumPosition:a,bufferGap:r.bufferGap===void 0||!isFinite(r.bufferGap)?0:r.bufferGap};if(i!==null&&i.isLive&&r.position.getPolled()>0){let c=(d=i.availabilityStartTime)!=null?d:0;o.wallClockTime=r.position.getPolled()+c;let m=pu(i);m!==void 0&&(o.liveGap=m-r.position.getPolled())}else if(n&&this.videoElement!==null){let c=Hm(this.videoElement);c!==void 0&&(o.wallClockTime=c+r.position.getPolled())}this.trigger("positionUpdate",o)}_priv_triggerEventIfNotStopped(e,r,n){n.isCancelled()||this.trigger(e,r)}_priv_initializeMediaElementTracksStore(e){var n,i,a;be(Ee.directfile!==null,"Initializing `MediaElementTracksStore` without Directfile feature"),be(this.videoElement!==null,"Initializing `MediaElementTracksStore` on a disposed RxPlayer");let r=new Ee.directfile.mediaElementTracksStore(this.videoElement);return this._priv_triggerEventIfNotStopped("availableAudioTracksChange",r.getAvailableAudioTracks(),e),this._priv_triggerEventIfNotStopped("availableVideoTracksChange",r.getAvailableVideoTracks(),e),this._priv_triggerEventIfNotStopped("availableTextTracksChange",r.getAvailableTextTracks(),e),this._priv_triggerEventIfNotStopped("audioTrackChange",(n=r.getChosenAudioTrack())!=null?n:null,e),this._priv_triggerEventIfNotStopped("textTrackChange",(i=r.getChosenTextTrack())!=null?i:null,e),this._priv_triggerEventIfNotStopped("videoTrackChange",(a=r.getChosenVideoTrack())!=null?a:null,e),r.addEventListener("availableVideoTracksChange",o=>this.trigger("availableVideoTracksChange",o)),r.addEventListener("availableAudioTracksChange",o=>this.trigger("availableAudioTracksChange",o)),r.addEventListener("availableTextTracksChange",o=>this.trigger("availableTextTracksChange",o)),r.addEventListener("audioTrackChange",o=>this.trigger("audioTrackChange",o)),r.addEventListener("videoTrackChange",o=>this.trigger("videoTrackChange",o)),r.addEventListener("textTrackChange",o=>this.trigger("textTrackChange",o)),r}_priv_callTracksStoreGetterSetter(e,r,n){var d,c;if(this._priv_contentInfos===null||this._priv_contentInfos.tracksStore===null)return k.warn("API: Trying to call track API too soon"),r;let{tracksStore:i}=this._priv_contentInfos,a=(c=(d=this._priv_contentInfos)==null?void 0:d.currentPeriod)!=null?c:void 0,o=e!=null?e:a==null?void 0:a.id;if(o===void 0)return r;let s=o===(a==null?void 0:a.id)?i.getPeriodObjectFromPeriod(a):i.getPeriodObjectFromId(o);return s===void 0?r:n(i,s)}_priv_onAvailableTracksMayHaveChanged(e,r){let n=this._priv_contentInfos;if(n===null)return;let{currentPeriod:i,tracksStore:a,currentContentCanceller:o}=n,s=o.signal;if(w(i)||a===null)return;let d=r!=null?r:a.getPeriodObjectFromPeriod(i);if(d!==void 0)switch(e){case"video":let c=a.getAvailableVideoTracks(d);this._priv_triggerEventIfNotStopped("availableVideoTracksChange",c!=null?c:[],s);break;case"audio":let m=a.getAvailableAudioTracks(d);this._priv_triggerEventIfNotStopped("availableAudioTracksChange",m!=null?m:[],s);break;case"text":let f=a.getAvailableTextTracks(d);this._priv_triggerEventIfNotStopped("availableTextTracksChange",f!=null?f:[],s);break;default:ur(e)}}_priv_onFatalError(e,r){let n=er(e,{defaultCode:"NONE",defaultReason:"An unknown error stopped content playback."});n.fatal=!0,r.currentContentCanceller.cancel(),this._priv_cleanUpCurrentContentState(),this._priv_currentError=n,k.error("API: The player stopped because of an error",n),this._priv_setPlayerState("STOPPED"),this._priv_currentError===n&&this.trigger("error",n)}};Fa._priv_currentlyUsedVideoElements=new WeakSet;var mI=Fa;mI.version="4.1.0";var UZ=mI;var FZ=UZ;u();l();u();l();u();l();var Qo=Ae,Ka=Qo===void 0?void 0:w(Qo.MediaSource)?w(Qo.MozMediaSource)?w(Qo.WebKitMediaSource)?Qo.MSMediaSource:Qo.WebKitMediaSource:Qo.MozMediaSource:Qo.MediaSource;var Vze=200,pI=new Map;function Ep(t){if(w(Ka))return Fo&&k.error("Compat: Cannot request codec support in a worker without MSE."),!1;if(typeof Ka.isTypeSupported=="function"){let e=pI.get(t);if(e!==void 0)return e;{let r=Ka.isTypeSupported(t);return pI.size>=Vze&&pI.clear(),pI.set(t,r),r}}return!0}var Hze=50,sP=class{constructor(){this._cachedCodecSupport=new Map}isSupported(e,r){let n=`${e!=null?e:""};codecs="${r!=null?r:""}"`,i=this._cachedCodecSupport.get(n);if(i!==void 0)return i;this._cachedCodecSupport.size>=Hze&&this._cachedCodecSupport.clear();let a=Ep(n);return this._cachedCodecSupport.set(n,a),a}},Gze=new sP,Xo=Gze;Zx();Ee.codecSupportProber=Xo;Md()?k.setLevel("DEBUG"):g.CURRENT_ENV===g.DEV&&k.setLevel(h.CURRENT_LEVEL);var Fd=FZ;var Gt=Se(Ie());u();l();var yI=Se(Ie());u();l();var fP=window.document,_p=window.Math,uP=window.HTMLElement,gI=window.XMLHttpRequest,pP=function(t,e){for(var r=0,n=t.length;r'}}},download:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},heart:{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},"mark-github":{heights:{16:{width:16,path:''}}},package:{heights:{16:{width:16,path:''}}},play:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}}},cje=function(t,e){t=mP(t).replace(/^octicon-/,""),hI(lP,t)||(t="mark-github");var r=e>=24&&24 in lP[t].heights?24:16,n=lP[t].heights[r];return'"},dP={},fje=function(t,e){var r=dP[t]||(dP[t]=[]);if(!(r.push(e)>1)){var n=Wze(function(){for(delete dP[t];e=r.shift();)e.apply(null,arguments)});if(GZ){var i=new gI;Jo(i,"abort",n),Jo(i,"error",n),Jo(i,"load",function(){var d;try{d=JSON.parse(this.responseText)}catch(c){n(c);return}n(this.status!==200,d)}),i.open("GET",t),i.send()}else{var a=this||window;a._=function(d){a._=null,n(d.meta.status!==200,d.data)};var o=gP(a.document)("script",{async:!0,src:t+(t.indexOf("?")!==-1?"&":"?")+"callback=_"}),s=function(){a._&&a._({meta:{}})};Jo(o,"load",s),Jo(o,"error",s),eje(o,/de|m/,s),a.document.getElementsByTagName("head")[0].appendChild(o)}}},jZ=function(t,e,r){var n=gP(t.ownerDocument),i=t.appendChild(n("style",{type:"text/css"})),a=rje+dje(e["data-color-scheme"]);i.styleSheet?i.styleSheet.cssText=a:i.appendChild(t.ownerDocument.createTextNode(a));var o=mP(e["data-size"])==="large",s=n("a",{className:"btn",href:e.href,rel:"noopener",target:"_blank",title:e.title||void 0,"aria-label":e["aria-label"]||void 0,innerHTML:cje(e["data-icon"],o?16:14)+" "},[n("span",{},[e["data-text"]||""])]),d=t.appendChild(n("div",{className:"widget"+(o?" widget-lg":"")},[s])),c=s.hostname.replace(/\.$/,"");if(("."+c).substring(c.length-Zo.length)!=="."+Zo){s.removeAttribute("href"),r(d);return}var m=(" /"+s.pathname).split(/\/+/);if(((c===Zo||c==="gist."+Zo)&&m[3]==="archive"||c===Zo&&m[3]==="releases"&&(m[4]==="download"||m[4]==="latest"&&m[5]==="download")||c==="codeload."+Zo)&&(s.target="_top"),mP(e["data-show-count"])!=="true"||c!==Zo||m[1]==="marketplace"||m[1]==="sponsors"||m[1]==="orgs"||m[1]==="users"||m[1]==="-"){r(d);return}var f,p;if(!m[2]&&m[1])p="followers",f="?tab=followers";else if(!m[3]&&m[2])p="stargazers_count",f="/stargazers";else if(!m[4]&&m[3]==="subscription")p="subscribers_count",f="/watchers";else if(!m[4]&&m[3]==="fork")p="forks_count",f="/forks";else if(m[3]==="issues")p="open_issues_count",f="/issues";else{r(d);return}var y=m[2]?"/repos/"+m[1]+"/"+m[2]:"/users/"+m[1];fje.call(this,Xze+y,function(v,b){if(!v){var T=b[p];d.appendChild(n("a",{className:"social-count",href:b.html_url+f,rel:"noopener",target:"_blank","aria-label":T+" "+p.replace(/_count$/,"").replace("_"," ").slice(0,T<2?-1:void 0)+" on GitHub"},[(""+T).replace(/\B(?=(\d{3})+(?!\d))/g,",")]))}r(d)})},cP=window.devicePixelRatio||1,VZ=function(t){return(cP>1?_p.ceil(_p.round(t*cP)/cP*2)/2:_p.ceil(t))||0},mje=function(t){var e=t.offsetWidth,r=t.offsetHeight;if(t.getBoundingClientRect){var n=t.getBoundingClientRect();e=_p.max(e,VZ(n.width)),r=_p.max(r,VZ(n.height))}return[e,r]},HZ=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"},WZ=function(t,e){if(!(t==null||e==null))if(t.getAttribute&&(t=tje(t)),Zze){var r=KZ("span");jZ(r.attachShadow({mode:"closed"}),t,function(){e(r)})}else{var n=KZ("iframe",{src:"javascript:0",title:t.title||void 0,allowtransparency:!0,scrolling:"no",frameBorder:0});HZ(n,[0,0]),n.style.border="none";var i=function(){var a=n.contentWindow,o;try{o=a.document.body}catch(s){fP.body.appendChild(n.parentNode.removeChild(n));return}hP(n,"load",i),jZ.call(a,o,t,function(s){var d=mje(s);n.parentNode.removeChild(n),Jze(n,"load",function(){HZ(n,d)}),n.src=Qze+"#"+(n.name=uje(t)),e(n)})};Jo(n,"load",i),fP.body.appendChild(n)}};var{useEffect:pje,useRef:gje}=yI,hje=({href:t,ariaLabel:e,dataColorScheme:r="dark_high_contrast",dataIcon:n,dataShowCount:i,dataSize:a="large",dataText:o,title:s,children:d})=>{let c=gje(null);return pje(()=>{let m=c.current;m!==null&&WZ(m,f=>{var p;return(p=m==null?void 0:m.parentNode)==null?void 0:p.replaceChild(f,m)})}),yI.createElement("span",{className:"button-gh"},yI.createElement("a",{ref:c,href:t,"aria-label":e,"data-icon":n,"data-color-scheme":r,"data-show-count":i,"data-size":a,"data-text":o,title:s},d))},yP=hje;u();l();var Ht=Se(Ie());u();l();u();l();u();l();u();l();u();l();var yje=uu,Rp=yje;u();l();function Mp(t){return t===void 0||t.indexOf("widevine")<0}u();l();u();l();u();l();u();l();function vP(t){let e=t.map(o=>Math.log(o/t[0])),r=e.map(o=>o-e[0]+1),n=(r[r.length-1]-1)/(t.length*2+10),i=1/n;return t.map((o,s)=>a(s));function a(o){if(o===0)return 0;let s=Math.min(Math.max(1,o),t.length-1);return t[s]===t[s-1]?a(o-1):i*(n+(t[s]*r[s-1]-t[s-1]*r[s])/(t[s]-t[s-1]))+4}}u();l();u();l();var Qn=class{constructor(e){this._alpha=Math.exp(Math.log(.5)/e),this._lastEstimate=0,this._totalWeight=0}addSample(e,r){let n=Math.pow(this._alpha,e),i=r*(1-n)+n*this._lastEstimate;isNaN(i)||(this._lastEstimate=i,this._totalWeight+=e)}getEstimate(){let e=1-Math.pow(this._alpha,this._totalWeight);return this._lastEstimate/e}};var Cp=class{constructor(){this._currentRepresentationData=null,this._lastRepresentationWithGoodScore=null}addSample(e,r,n){let i=n/r,a=this._currentRepresentationData,o;a!==null&&a.representation.id===e.id?(o=a.ewma,a.ewma.addSample(r,i),a.loadedDuration+=n,a.loadedSegments++):(o=new Qn(5),o.addSample(r,i),this._currentRepresentationData={representation:e,ewma:o,loadedDuration:n,loadedSegments:0}),o.getEstimate()>1&&this._lastRepresentationWithGoodScore!==e&&(k.debug("ABR: New last stable representation",e.bitrate),this._lastRepresentationWithGoodScore=e)}getEstimate(e){if(this._currentRepresentationData===null||this._currentRepresentationData.representation.id!==e.id)return;let{ewma:r,loadedSegments:n,loadedDuration:i}=this._currentRepresentationData,a=r.getEstimate(),o=n>=5&&i>=10?1:0;return{score:a,confidenceLevel:o}}getLastStableRepresentation(){return this._lastRepresentationWithGoodScore}};var $Z=6e3,vje=15e3,bje=3e3,Sje=1e3,Ije=9e3,wp=class{constructor(e){this._levelsMap=vP(e).map(r=>r+4),this._bitrates=e,this._lastUnsuitableQualityTimestamp=void 0,this._blockRaiseDelay=$Z,k.debug("ABR: Steps for buffer based chooser.",this._levelsMap.map((r,n)=>`bufferLevel: ${r}, bitrate: ${e[n]}`).join(" ,"))}onAddedSegment(e){let r=this._levelsMap,n=this._bitrates,{bufferGap:i,currentBitrate:a,currentScore:o,speed:s}=e;if(w(a)){this._currentEstimate=n[0];return}let d=-1;for(let v=0;va)break}if(d<0||n.length!==r.length){k.info("ABR: Current Bitrate not found in the calculated levels"),this._currentEstimate=n[0];return}let c;o!==void 0&&(c=s===0?o.score:o.score/s);let m=isFinite(i)?i:0,f=re();if(mT===a);for(let T=b-1;T>=0;T--)if(m>=r[T]){this._currentEstimate=n[T];return}this._currentEstimate=n[0];return}if(this._lastUnsuitableQualityTimestamp!==void 0&&f-this._lastUnsuitableQualityTimestamp{for(let v=d+1;vp)return v})();if(y!==void 0){let v=r[y];if(i>=v){k.debug("ABR: Raising quality in BufferBasedChooser",n[y]),this._currentEstimate=n[y];return}}this._currentEstimate=a}getLastEstimate(){return this._currentEstimate}};u();l();u();l();function Tje(t,e){let r=-1;for(let o=0;o-1.2){r=o;break}if(d>e&&e-s.time>-1.2){r=o;break}}if(r<0)return[];let n=t[r],i=n.content.segment.time,a=[n];for(let o=r+1;o0?f.progress[f.progress.length-1]:void 0,b=vI(f);if(v!==void 0&&b!==void 0){let M=YZ(v,b);if((p-v.timestamp)/1e3<=M&&M-d/o>2500)return b}if(!f.content.segment.complete)return;let T=f.content.segment.duration,S=(p-f.requestTimestamp)/1e3,I=S<=(T*1.5+2)/o;if(w(r)||I)return;let E=T/S,R=r.bitrate*Math.min(.7,E);if(i===void 0||Rf.segment.duration>0&&f.segment.time+f.segment.duration>i);if(a===void 0)return!0;let o=re(),s=a.progress.length>0?a.progress[a.progress.length-1]:void 0,d=vI(a);if(s===void 0||d===void 0)return!0;let c=YZ(s,d);return(o-s.timestamp)/1e3>c*1.2?!0:c-n/t.speed>-1.5}var xp=class{constructor(e,r){let{ABR_STARVATION_GAP:n,OUT_OF_STARVATION_GAP:i,ABR_STARVATION_FACTOR:a,ABR_REGULAR_FACTOR:o}=Q.getCurrent();this._initialBitrate=e,this._inStarvationMode=!1,this._lowLatencyMode=r,r?this._config={starvationGap:n.LOW_LATENCY,outOfStarvationGap:i.LOW_LATENCY,starvationBitrateFactor:a.LOW_LATENCY,regularBitrateFactor:o.LOW_LATENCY}:this._config={starvationGap:n.DEFAULT,outOfStarvationGap:i.DEFAULT,starvationBitrateFactor:a.DEFAULT,regularBitrateFactor:o.DEFAULT}}getBandwidthEstimate(e,r,n,i,a){let o,s,d=this._config,{bufferGap:c,position:m,duration:f}=e,p=isFinite(c)?c:0,{ABR_STARVATION_DURATION_DELTA:y}=Q.getCurrent();return isNaN(f)||p+m.getWanted()=d.outOfStarvationGap&&(k.info("ABR: exit starvation mode."),this._inStarvationMode=!1):this._inStarvationMode&&(k.info("ABR: exit starvation mode."),this._inStarvationMode=!1),this._inStarvationMode&&(s=kje(i,e,n,this._lowLatencyMode,a),s!==void 0&&(k.info("ABR: starvation mode emergency estimate:",s),r.reset(),o=w(n)?s:Math.min(s,n.bitrate))),w(o)&&(s=r.getEstimate(),s!==void 0?o=s*(this._inStarvationMode?d.starvationBitrateFactor:d.regularBitrateFactor):a!==void 0?o=a*(this._inStarvationMode?d.starvationBitrateFactor:d.regularBitrateFactor):o=this._initialBitrate),e.speed>1&&(o/=e.speed),{bandwidthEstimate:s,bitrateChosen:o}}isUrgent(e,r,n,i){return r===null?!0:e>=r.bitrate?!1:Eje(i,n,this._lowLatencyMode)}};u();l();var Ap=class{constructor(){this.bandwidth=void 0,this.representation=null,this.algorithmType=3}update(e,r,n){this.representation=e,this.bandwidth=r,this.algorithmType=n}};var Pp=class{constructor(e,r){this._scoreCalculator=e,this._lastAbrEstimate=r,this._consecutiveWrongGuesses=0,this._blockGuessesUntil=0,this._lastMaintanableBitrate=null}getGuess(e,r,n,i,a){let{bufferGap:o,speed:s}=r,d=this._lastAbrEstimate.representation;if(d===null)return null;if(i>d.bitrate)return this._lastAbrEstimate.algorithmType===2&&(this._lastAbrEstimate.representation!==null&&(this._lastMaintanableBitrate=this._lastAbrEstimate.representation.bitrate),this._consecutiveWrongGuesses=0),null;let c=this._scoreCalculator.getEstimate(n);if(this._lastAbrEstimate.algorithmType!==2){if(c===void 0)return null;if(this._canGuessHigher(o,s,c)){let f=QZ(e,n);if(f!==null)return f}return null}if(this._isLastGuessValidated(d,i,c)&&(k.debug("ABR: Guessed Representation validated",d.bitrate),this._lastMaintanableBitrate=d.bitrate,this._consecutiveWrongGuesses=0),n.id!==d.id)return d;if(this._shouldStopGuess(n,c,o,a))return this._consecutiveWrongGuesses++,this._blockGuessesUntil=re()+Math.min(this._consecutiveWrongGuesses*15e3,12e4),_je(e,n);if(c===void 0)return n;if(this._canGuessHigher(o,s,c)){let f=QZ(e,n);if(f!==null)return f}return n}_canGuessHigher(e,r,{score:n,confidenceLevel:i}){return isFinite(e)&&e>=2.5&&re()>this._blockGuessesUntil&&i===1&&n/r>1.01}_shouldStopGuess(e,r,n,i){if(r!==void 0&&r.score<1.01)return!0;if((r===void 0||r.score<1.2)&&n<.6)return!0;let a=i.filter(s=>s.content.representation.id===e.id),o=re();for(let s of a){let d=o-s.requestTimestamp;if(s.content.segment.isInit){if(d>1e3)return!0}else{if(d>s.content.segment.duration*1e3+200)return!0;{let c=vI(s);if(c!==void 0&&c1.5?!0:r>=e.bitrate&&(this._lastMaintanableBitrate===null||this._lastMaintanableBitratei===e.id);if(n<0)return k.error("ABR: Current Representation not found."),null;for(;++ne.bitrate)return t[n];return null}function _je(t,e){let r=et(t,({id:n})=>n===e.id);if(r<0)return k.error("ABR: Current Representation not found."),null;for(;--r>=0;)if(t[r].bitratea.bitrate-o.bitrate);let r=t[0].bitrate,n=Math.max(e,r),i=et(t,a=>a.bitrate>n);return i===-1?t:t.slice(0,i)}u();l();function SP(t,e){if(e.width===void 0||e.height===void 0)return t;let r=e.width*e.pixelRatio,n=e.height*e.pixelRatio,i=t.slice().sort((s,d)=>{var c,m;return((c=s.width)!=null?c:0)-((m=d.width)!=null?m:0)}),a=ce(i,s=>typeof s.width=="number"&&s.width>=r&&typeof s.height=="number"&&s.height>=n);if(a===void 0)return t;let o=typeof a.width=="number"?a.width:0;return t.filter(s=>typeof s.width=="number"?s.width<=o:!0)}u();l();var Lp=class{constructor(){this._currentRequests={}}add(e){let{id:r,requestTimestamp:n,content:i}=e;this._currentRequests[r]={requestTimestamp:n,progress:[],content:i}}addProgress(e){let r=this._currentRequests[e.id];if(w(r)){if(g.CURRENT_ENV===g.DEV)throw new Error("ABR: progress for a request not added");k.warn("ABR: progress for a request not added");return}r.progress.push(e)}remove(e){if(w(this._currentRequests[e])){if(g.CURRENT_ENV===g.DEV)throw new Error("ABR: can't remove unknown request");k.warn("ABR: can't remove unknown request")}delete this._currentRequests[e]}getRequests(){return Ad(this._currentRequests).filter(e=>!w(e)).sort((e,r)=>e.content.segment.time-r.content.segment.time)}};u();l();function bI(t,e){let r=et(t,n=>n.bitrate>e);return r===-1?t[t.length-1]:r===0?t[0]:t[r-1]}var XZ=new oe(void 0);XZ.finish();var ZZ=new oe(1/0);ZZ.finish();function IP(t){let e={},{initialBitrates:r,throttlers:n,lowLatencyMode:i}=t;return function(s,d,c,m,f){var T,S,I;let{type:p}=s.adaptation,y=a(p),v=(T=r[p])!=null?T:0,b={limitResolution:(S=n.limitResolution[p])!=null?S:XZ,throttleBitrate:(I=n.throttleBitrate[p])!=null?I:ZZ};return Rje({bandwidthEstimator:y,context:s,currentRepresentation:d,filters:b,initialBitrate:v,playbackObserver:m,representations:c,lowLatencyMode:i},f)};function a(o){let s=e[o];if(w(s)){k.debug("ABR: Creating new BandwidthEstimator for ",o);let d=new Op;return e[o]=d,d}return s}}function Rje({bandwidthEstimator:t,context:e,currentRepresentation:r,filters:n,initialBitrate:i,lowLatencyMode:a,playbackObserver:o,representations:s},d){let c=new Cp,m=new xp(i!=null?i:0,a),f=new Lp,p=ye,y={metrics:I,requestBegin:E,requestProgress:R,requestEnd:M,addedSegment(C){p(C)}},v=new X;v.linkToSignal(d);let b=T(s.getValue(),v.signal);return s.onUpdate(S,{clearSignal:d}),{estimates:b,callbacks:y};function T(C,A){if(C.length<=1)return new oe({bitrate:void 0,representation:C[0],urgent:!0,knownStableBitrate:void 0});let x=!1,O=C.sort((N,B)=>N.bitrate-B.bitrate),D=new wp(O.map(N=>N.bitrate)),F=new Ap,K=new Pp(c,F),P=o.getReference().getValue(),L=new oe(z());return o.listen(N=>{P=N,V()},{includeLastObservation:!1,clearSignal:A}),p=function(N){if(P===null)return;let{position:B,speed:U}=P,j=N.buffered,Y=jS(j,B.getWanted()),{representation:W}=N.content,se=c.getEstimate(W),Z=W.bitrate,$={bufferGap:Y,currentBitrate:Z,currentScore:se,speed:U};D.onAddedSegment($),V()},A.register(()=>{p=ye}),n.throttleBitrate.onUpdate(V,{clearSignal:A}),n.limitResolution.onUpdate(V,{clearSignal:A}),L;function V(){L.setValue(z())}function z(){let{bufferGap:N,position:B,maximumPosition:U}=P,j=n.limitResolution.getValue(),Y=n.throttleBitrate.getValue(),W=r.getValue(),se=Mje(O,j,Y),Z=f.getRequests(),{bandwidthEstimate:$,bitrateChosen:ue}=m.getBandwidthEstimate(P,t,W,Z,F.bandwidth),Le=c.getLastStableRepresentation(),Re=Le===null?void 0:Le.bitrate/(P.speed>0?P.speed:1),{ABR_ENTER_BUFFER_BASED_ALGO:ne,ABR_EXIT_BUFFER_BASED_ALGO:de}=Q.getCurrent();x&&N<=de?x=!1:!x&&isFinite(N)&&N>=ne&&(x=!0);let Wt=bI(se,ue),Pt=D.getLastEstimate(),Ot=Wt.bitrate,Rr=null;x&&Pt!==void 0&&Pt>Ot&&(Rr=bI(se,Pt),Ot=Rr.bitrate);let Mr=null;return a&&W!==null&&e.manifest.isDynamic&&U-B.getWanted()<40&&(Mr=K.getGuess(O,P,W,Ot,Z)),Mr!==null&&Mr.bitrate>Ot?(k.debug("ABR: Choosing representation with guess-based estimation.",Mr.bitrate,Mr.id),F.update(Mr,$,2),{bitrate:$,representation:Mr,urgent:W===null||Mr.bitrate=500||t.status===404||t.status===415||t.status===412:t.type===cu.TIMEOUT||t.type===cu.ERROR_EVENT:t instanceof Wn?typeof t.canRetry=="boolean"?t.canRetry:t.xhr!==void 0?t.xhr.status>=500||t.xhr.status===404||t.xhr.status===415||t.xhr.status===412:!1:zo(t)&&t.code==="INTEGRITY_ERROR"}async function TP(t,e,r,n,i){if(i.cancellationError!==null)return Promise.reject(i.cancellationError);let{baseDelay:a,maxDelay:o,maxRetry:s,onRetry:d}=n;t!==null&&t.length===0&&k.warn("Fetchers: no CDN given to `scheduleRequestWithCdns`.");let c=new Map,m=f();if(m===void 0)throw new Error("No CDN to request");return p(m);function f(){if(t===null){let T=c.get(null);return T!==void 0&&T.isBlacklisted?void 0:null}else{if(e===null)return b(t);{let T=e.getCdnPreferenceForResource(t);return b(T)}}}async function p(T){try{return await r(T,i)}catch(S){if(X.isCancellationError(S))throw S;T!==null&&e!==null&&e.downgradeCdn(T);let I=c.get(T);if(I===void 0?(I={errorCounter:1,blockedUntil:void 0,isBlacklisted:!1},c.set(T,I)):I.errorCounter++,!Cje(S))return I.blockedUntil=void 0,I.isBlacklisted=!0,y(S);if(I.errorCounter>s)I.blockedUntil=void 0,I.isBlacklisted=!0;else{let E=I.errorCounter,R=Math.min(a*Math.pow(2,E-1),o),M=vp(R);I.blockedUntil=re()+M}return y(S)}}async function y(T){let S=f();if(i.isCancelled())throw i.cancellationError;if(S===void 0)throw T;if(d(T),i.isCancelled())throw i.cancellationError;return v(S,T)}function v(T,S){let I=c.get(T);if(I===void 0||I.blockedUntil===void 0)return p(T);let E=re(),R=I.blockedUntil-E;if(R<=0)return p(T);let M=new X,C=M.linkToSignal(i);return new Promise((A,x)=>{e==null||e.addEventListener("priorityChange",()=>{let F=f();if(i.isCancelled())throw i.cancellationError;if(F===void 0)return D(S);F!==T&&(M.cancel(),v(F,S).then(O,D))},M.signal),Ho(R,M.signal).then(()=>p(T).then(O,D),ye);function O(F){C(),A(F)}function D(F){C(),x(F)}})}function b(T){var I;if(c.size===0)return T[0];let S=re();return(I=T.filter(E=>{var R;return((R=c.get(E))==null?void 0:R.isBlacklisted)!==!0}).reduce((E,R)=>{var C;let M=(C=c.get(R))==null?void 0:C.blockedUntil;return M!==void 0&&M<=S&&(M=void 0),E===void 0?[R,M]:E[1]===void 0?E:M===void 0?[R,void 0]:Mn.parse({previousManifest:null,unsafeMode:!1})),e.then(n=>{this.trigger("manifestReady",n.manifest),this._canceller.isUsed()||this._recursivelyRefreshManifest(n.manifest,n)}).catch(n=>this._onFatalError(n))}updateContentUrls(e,r){var n;this._prioritizedContentUrl=(n=e==null?void 0:e[0])!=null?n:void 0,r&&this.scheduleManualRefresh({enablePartialRefresh:!1,delay:0,canUseUnsafeMode:!1})}async _fetchManifest(e){var d;let r=this._canceller.signal,n=this._settings,i=this._pipelines,a=e!=null?e:(d=this._manifestUrls)==null?void 0:d[0],o=this._getBackoffSetting(c=>{this.trigger("warning",za(c))});try{let c=await s(a);return{parse:m=>this._parseLoadedManifest(c,m,a)}}catch(c){throw za(c)}function s(c){let{loadManifest:m}=i,f=n.requestTimeout===void 0?Q.getCurrent().DEFAULT_REQUEST_TIMEOUT:n.requestTimeout,p=n.connectionTimeout===void 0?Q.getCurrent().DEFAULT_CONNECTION_TIMEOUT:n.connectionTimeout;return f<0&&(f=void 0),p<0&&(p=void 0),kP(()=>m(c,{timeout:f,connectionTimeout:p},r),o,r)}}parse(e,r,n){return this._parseLoadedManifest({responseData:e,size:void 0,requestDuration:void 0},r,n)}async _parseLoadedManifest(e,r,n){var b;let i=re(),a=this._canceller.signal,o=this.trigger.bind(this),{sendingTime:s,receivedTime:d}=e,c=this._getBackoffSetting(T=>{this.trigger("warning",za(T))}),m=n!=null?n:(b=this._manifestUrls)==null?void 0:b[0],f={externalClockOffset:r.externalClockOffset,unsafeMode:r.unsafeMode,previousManifest:r.previousManifest,originalUrl:m};try{let T=this._pipelines.parseManifest(e,f,y,a,p);if(wje(T)){let{manifest:S,warnings:I}=await T;return v(S,I)}else return v(T.manifest,T.warnings)}catch(T){throw er(T,{defaultCode:"PIPELINE_PARSE_ERROR",defaultReason:"Unknown error when parsing the Manifest"})}async function p(T){try{return await kP(T,c,a)}catch(S){throw za(S)}}function y(T){for(let S of T){if(a.isCancelled())return;let I=er(S,{defaultCode:"PIPELINE_PARSE_ERROR",defaultReason:"Unknown error when parsing the Manifest"});o("warning",I)}}function v(T,S){y(S);let I=re()-i;return k.info(`MF: Manifest parsed in ${I}ms`),{manifest:T,sendingTime:s,receivedTime:d,parsingTime:I}}}_getBackoffSetting(e){let{DEFAULT_MAX_MANIFEST_REQUEST_RETRY:r,INITIAL_BACKOFF_DELAY_BASE:n,MAX_BACKOFF_DELAY_BASE:i}=Q.getCurrent(),{lowLatencyMode:a,maxRetry:o}=this._settings,s=a?n.LOW_LATENCY:n.REGULAR,d=a?i.LOW_LATENCY:i.REGULAR,c=o!=null?o:r;return{onRetry:e,baseDelay:s,maxDelay:d,maxRetry:c}}_recursivelyRefreshManifest(e,{sendingTime:r,parsingTime:n,updatingTime:i}){let{MAX_CONSECUTIVE_MANIFEST_PARSING_IN_UNSAFE_MODE:a,MIN_MANIFEST_PARSING_TIME_TO_ENTER_UNSAFE_MODE:o}=Q.getCurrent(),s=n!==void 0?n+(i!=null?i:0):void 0,d=!1;this._consecutiveUnsafeMode>0?d=this._consecutiveUnsafeMode=o);let c=r===void 0?0:re()-r,m=Math.max(this._settings.minimumManifestUpdateInterval-c,0),f=new X;if(f.linkToSignal(this._canceller.signal),this.scheduleManualRefresh=p=>{let{enablePartialRefresh:y,delay:v,canUseUnsafeMode:b}=p,T=b&&d,S=r===void 0?0:re()-r,I=Math.max(this._settings.minimumManifestUpdateInterval-S,0),E=setTimeout(()=>{f.cancel(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:y,unsafeMode:T})},Math.max((v!=null?v:0)-S,I));f.signal.register(()=>{clearTimeout(E)})},e.expired!==null){let p=setTimeout(()=>{var y;(y=e.expired)==null||y.then(()=>{f.cancel(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:!1,unsafeMode:d})},ye)},m);f.signal.register(()=>{clearTimeout(p)})}if(e.lifetime!==void 0&&e.lifetime>=0){let p=e.lifetime*1e3-c,y;s===void 0?y=p:e.lifetime<3&&s>=100?(y=Math.min(Math.max(3e3-c,Math.max(p,0)+s),p*6),k.info("MUS: Manifest update rythm is too frequent. Postponing next request.",p,y)):s>=e.lifetime*1e3/10?(y=Math.min(Math.max(p,0)+s,p*6),k.info("MUS: Manifest took too long to parse. Postponing next request",y,y)):y=p;let v=setTimeout(()=>{f.cancel(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:!1,unsafeMode:d})},Math.max(y,m));f.signal.register(()=>{clearTimeout(v)})}}_triggerNextManifestRefresh(e,{enablePartialRefresh:r,unsafeMode:n}){let i=e.updateUrl,a,o;this._prioritizedContentUrl!==null?(a=!0,o=this._prioritizedContentUrl,this._prioritizedContentUrl=null):(a=!r||i===void 0,o=a?e.getUrls()[0]:i);let s=e.clockOffset;n?(this._consecutiveUnsafeMode+=1,k.info('Init: Refreshing the Manifest in "unsafeMode" for the '+String(this._consecutiveUnsafeMode)+" consecutive time.")):this._consecutiveUnsafeMode>0&&(k.info('Init: Not parsing the Manifest in "unsafeMode" anymore after '+String(this._consecutiveUnsafeMode)+" consecutive times."),this._consecutiveUnsafeMode=0),!this._isRefreshPending&&(this._isRefreshPending=!0,this._fetchManifest(o).then(d=>d.parse({externalClockOffset:s,previousManifest:e,unsafeMode:n})).then(d=>{this._isRefreshPending=!1;let{manifest:c,sendingTime:m,parsingTime:f}=d,p=re();if(a)e.replace(c);else try{e.update(c)}catch(v){let b=v instanceof Error?v.message:"unknown error";k.warn(`MUS: Attempt to update Manifest failed: ${b}`,"Re-downloading the Manifest fully");let{FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY:T}=Q.getCurrent(),S=m===void 0?0:re()-m,I=Math.max(this._settings.minimumManifestUpdateInterval-S,0),E=ye,R=setTimeout(()=>{E(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:!1,unsafeMode:!1})},Math.max(T-S,I));E=this._canceller.signal.register(()=>{clearTimeout(R)});return}let y=re()-p;this._recursivelyRefreshManifest(e,{sendingTime:m,parsingTime:f,updatingTime:y})}).catch(d=>{this._isRefreshPending=!1,this._onFatalError(d)}))}_onFatalError(e){this._canceller.isUsed()||(this.trigger("error",e),this.dispose())}};function wje(t){return t instanceof Promise}var EP=Np;u();l();u();l();u();l();var Dp=class extends Me{constructor(e){super(),this._downgradedCdnList={metadata:[],timeouts:[]},e.register(()=>{for(let r of this._downgradedCdnList.timeouts)clearTimeout(r);this._downgradedCdnList={metadata:[],timeouts:[]}})}getCdnPreferenceForResource(e){return e.length<=1?e:this._innerGetCdnPreferenceForResource(e)}downgradeCdn(e){let r=eJ(this._downgradedCdnList.metadata,e);r>=0&&this._removeIndexFromDowngradeList(r);let{DEFAULT_CDN_DOWNGRADE_TIME:n}=Q.getCurrent(),i=n;this._downgradedCdnList.metadata.push(e);let a=setTimeout(()=>{let o=eJ(this._downgradedCdnList.metadata,e);o>=0&&this._removeIndexFromDowngradeList(o),this.trigger("priorityChange",null)},i);this._downgradedCdnList.timeouts.push(a),this.trigger("priorityChange",null)}_innerGetCdnPreferenceForResource(e){let[r,n]=e.reduce((i,a)=>(this._downgradedCdnList.metadata.some(o=>o.id===a.id&&o.baseUrl===a.baseUrl)?i[1].push(a):i[0].push(a),i),[[],[]]);return r.concat(n)}_removeIndexFromDowngradeList(e){this._downgradedCdnList.metadata.splice(e,1);let r=this._downgradedCdnList.timeouts.splice(e,1);clearTimeout(r[0])}};function eJ(t,e){return t.length===0?-1:e.id!==void 0?et(t,r=>r.id===e.id):et(t,r=>r.baseUrl===e.baseUrl)}u();l();function _P(t,e){let r=new WeakMap;return{createRequest(n,i,a,o){let s=c=>e(n,a,c),d=t.create(s,i,a,o);return r.set(d,s),d},updatePriority(n,i){let a=r.get(n);if(a===void 0){k.warn("Fetchers: Cannot update the priority of a request: task not found.");return}t.updatePriority(a,i)}}}u();l();u();l();var RP=class{constructor(){this._cache=new WeakMap}add({representation:e,segment:r},n){r.isInit&&this._cache.set(e,n)}get({representation:e,segment:r}){if(r.isInit){let n=this._cache.get(e);if(n!==void 0)return n}return null}},tJ=RP;var xje=Dt();function qp(t,e,r,n,i){let a;i.connectionTimeout===void 0||i.connectionTimeout<0?a=void 0:a=i.connectionTimeout;let o={timeout:i.requestTimeout<0?void 0:i.requestTimeout,connectionTimeout:a},s=ve(["audio","video"],t)?new tJ:void 0,{loadSegment:d,parseSegment:c}=e;return async function(f,p,y){var N,B,U;let{segment:v,adaptation:b,representation:T,manifest:S,period:I}=f,E=hu(f),R=xje(),M,C=[],A=0,x=!1,O={segment:v,type:b.type,language:b.language,isLive:S.isLive,periodStart:I.start,periodEnd:I.end,mimeType:T.mimeType,codecs:T.codecs[0],manifestPublishTime:S.publishTime},D={onProgress(j){var Y;M===void 0&&j.totalSize!==void 0&&j.size0&&C.every(Y=>Y)&&(x=!0,(j=n.onMetrics)==null||j.call(n,{size:M.size,requestDuration:M.requestDuration,content:f,segmentDuration:A}))}}}function rJ({maxRetry:t,lowLatencyMode:e,requestTimeout:r,connectionTimeout:n}){let{DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR:i,DEFAULT_REQUEST_TIMEOUT:a,DEFAULT_CONNECTION_TIMEOUT:o,INITIAL_BACKOFF_DELAY_BASE:s,MAX_BACKOFF_DELAY_BASE:d}=Q.getCurrent();return{maxRetry:t!=null?t:i,baseDelay:e?s.LOW_LATENCY:s.REGULAR,maxDelay:e?d.LOW_LATENCY:d.REGULAR,requestTimeout:r===void 0?a:r,connectionTimeout:n===void 0?o:n}}u();l();var Up=class{constructor({prioritySteps:e}){if(this._minPendingPriority=null,this._waitingQueue=[],this._pendingTasks=[],this._prioritySteps=e,this._prioritySteps.high>=this._prioritySteps.low)throw new Error("TP: the max high level priority should be given a lowerpriority number than the min low priority.")}create(e,r,n,i){let a;return nn(i,(o,s)=>(a={hasEnded:!1,priority:r,trigger:()=>{if(a.hasEnded)return;let c=()=>{y(),this._endTask(a)},m=v=>{n.beforeEnded(),c(),o(v)},f=v=>{c(),s(v)},p=new X,y=p.linkToSignal(i);a.interrupter=p,p.signal.register(()=>{a.interrupter=null,i.isCancelled()||n.beforeInterrupted()}),this._minPendingPriority=this._minPendingPriority===null?a.priority:Math.min(this._minPendingPriority,a.priority),this._pendingTasks.push(a),a.taskFn(p.signal).then(m).catch(v=>{!i.isCancelled()&&p.isUsed()&&v instanceof yt||f(v)})},taskFn:e,interrupter:null},this._canBeStartedNow(a)?(a.trigger(),this._isRunningHighPriorityTasks()&&this._interruptCancellableTasks()):this._waitingQueue.push(a),()=>this._endTask(a)))}_endTask(e){e.hasEnded=!0;let r=Bp(e.taskFn,this._waitingQueue);if(r>=0)this._waitingQueue.splice(r,1);else{let n=Bp(e.taskFn,this._pendingTasks);if(n<0)return;this._pendingTasks.splice(n,1),this._pendingTasks.length>0?this._minPendingPriority===e.priority&&(this._minPendingPriority=Math.min(...this._pendingTasks.map(i=>i.priority))):this._minPendingPriority=null,this._loopThroughWaitingQueue()}}updatePriority(e,r){let n=Bp(e,this._waitingQueue);if(n>=0){let s=this._waitingQueue[n];if(s.priority===r||(s.priority=r,!this._canBeStartedNow(s)))return;this._findAndRunWaitingQueueTask(n),this._isRunningHighPriorityTasks()&&this._interruptCancellableTasks();return}let i=Bp(e,this._pendingTasks);if(i<0){k.warn("TP: request to update the priority of a non-existent task");return}let a=this._pendingTasks[i];if(a.priority===r)return;let o=a.priority;a.priority=r,this._minPendingPriority===null||rs.priority)),this._loopThroughWaitingQueue()),this._isRunningHighPriorityTasks()&&this._interruptCancellableTasks()}_loopThroughWaitingQueue(){let e=this._waitingQueue.reduce((r,n)=>r===null||r>n.priority?n.priority:r,null);if(!(e===null||this._minPendingPriority!==null&&this._minPendingPriority=this._prioritySteps.low)return this._interruptPendingTask(r),this._interruptCancellableTasks()}}_findAndRunWaitingQueueTask(e){return e>=this._waitingQueue.length||e<0?(k.warn("TP : Tried to start a non existing task"),!1):(this._waitingQueue.splice(e,1)[0].trigger(),!0)}_interruptPendingTask(e){var n;let r=Bp(e.taskFn,this._pendingTasks);if(r<0){k.warn("TP: Interrupting a non-existent pending task. Aborting...");return}this._pendingTasks.splice(r,1),this._waitingQueue.push(e),this._pendingTasks.length===0?this._minPendingPriority=null:this._minPendingPriority===e.priority&&(this._minPendingPriority=Math.min(...this._pendingTasks.map(i=>i.priority))),(n=e.interrupter)==null||n.cancel()}_canBeStartedNow(e){return this._minPendingPriority===null||e.priority<=this._minPendingPriority}_isRunningHighPriorityTasks(){return this._minPendingPriority!==null&&this._minPendingPriority<=this._prioritySteps.high}};function Bp(t,e){return et(e,r=>r.taskFn===t)}var Fp=class{constructor(e,r,n){let i=new Dp(n),{MIN_CANCELABLE_PRIORITY:a,MAX_HIGH_PRIORITY_LEVEL:o}=Q.getCurrent();this._transport=e,this._prioritizer=new Up({prioritySteps:{high:o,low:a}}),this._cdnPrioritizer=i,this._backoffOptions=r}createSegmentFetcher(e,r){let n=rJ(this._backoffOptions),i=this._transport[e],a=qp(e,i,this._cdnPrioritizer,r,n);return _P(this._prioritizer,a)}};var MP=Fp;u();l();u();l();u();l();var Iu=class{constructor(e){this._array=[],this._sortingFn=e}add(...e){e.sort(this._sortingFn);let r=0;for(let n=0;n=this._array.length)throw new Error("Invalid index.");return this._array[e]}toArray(){return this._array.slice()}findFirst(e){return ce(this._array,e)}has(e){return ve(this._array,e)}removeElement(e){let r=this._array.indexOf(e);if(r>=0)return this._array.splice(r,1),r}head(){return this._array[0]}last(){return this._array[this._array.length-1]}shift(){return this._array.shift()}pop(){return this._array.pop()}};var Kp=class extends Me{constructor(e,r,n){super(),this._canceller=new X,this._manifest=e,this._activeStreams=new Map,this._allBufferTypes=n,this._lastCurrentPeriodId=null;let i=new CP(e);this._maximumPositionCalculator=i;let a=this._canceller.signal;r.listen(({position:o})=>{let s=o.getWanted();if(si.getMaximumAvailablePosition()){let d=new he("MEDIA_TIME_AFTER_MANIFEST","The current position is after the latest time announced in the Manifest.");this.trigger("warning",d)}},{includeLastObservation:!0,clearSignal:a}),e.addEventListener("manifestUpdate",()=>{this.trigger("endingPositionChange",this._getManifestEndTime()),!a.isCancelled()&&this._checkEndOfStream()},a)}getCurrentEndingTime(){return this._getManifestEndTime()}onAdaptationChange(e,r,n){if(this._manifest.isLastPeriodKnown){let i=this._manifest.periods[this._manifest.periods.length-1];if(r.id===(i==null?void 0:i.id)&&(e==="audio"||e==="video")){e==="audio"?this._maximumPositionCalculator.updateLastAudioAdaptation(n):this._maximumPositionCalculator.updateLastVideoAdaptation(n);let a=this._maximumPositionCalculator.getEndingPosition(),o=a!==void 0?{isEnd:!0,endingPosition:a}:{isEnd:!1,endingPosition:this._maximumPositionCalculator.getMaximumAvailablePosition()};this.trigger("endingPositionChange",o)}}this._canceller.isUsed()||n===null&&this._addActivelyLoadedPeriod(r,e)}onRepresentationChange(e,r){this._addActivelyLoadedPeriod(r,e)}onPeriodCleared(e,r){this._removeActivelyLoadedPeriod(r,e)}onLastSegmentFinishedLoading(e){let r=this._lazilyCreateActiveStreamInfo(e);r.hasFinishedLoadingLastPeriod||(r.hasFinishedLoadingLastPeriod=!0,this._checkEndOfStream())}onLastSegmentLoadingResume(e){let r=this._lazilyCreateActiveStreamInfo(e);r.hasFinishedLoadingLastPeriod&&(r.hasFinishedLoadingLastPeriod=!1,this._checkEndOfStream())}dispose(){this.removeEventListener(),this._canceller.cancel()}_addActivelyLoadedPeriod(e,r){let n=this._lazilyCreateActiveStreamInfo(r);n.activePeriods.has(e)||(n.activePeriods.add(e),this._checkCurrentPeriod())}_removeActivelyLoadedPeriod(e,r){let n=this._activeStreams.get(r);n!==void 0&&n.activePeriods.has(e)&&(n.activePeriods.removeElement(e),this._checkCurrentPeriod())}_checkCurrentPeriod(){if(this._allBufferTypes.length===0)return;let e=this._activeStreams.get(this._allBufferTypes[0]);if(e!==void 0)for(let r of e.activePeriods.toArray()){let n=!0;for(let i of this._allBufferTypes){let a=this._activeStreams.get(i);if(a===void 0)return;if(!a.activePeriods.toArray().some(d=>d.id===r.id)){n=!1;break}}if(n){this._lastCurrentPeriodId!==r.id&&(this._lastCurrentPeriodId=r.id,this.trigger("periodChange",r));return}}}_getManifestEndTime(){let e=this._maximumPositionCalculator.getEndingPosition();return e!==void 0?{isEnd:!0,endingPosition:e}:{isEnd:!1,endingPosition:this._maximumPositionCalculator.getMaximumAvailablePosition()}}_lazilyCreateActiveStreamInfo(e){let r=this._activeStreams.get(e);return r===void 0&&(r={activePeriods:new Iu((n,i)=>n.start-i.start),hasFinishedLoadingLastPeriod:!1},this._activeStreams.set(e,r)),r}_checkEndOfStream(){if(!this._manifest.isLastPeriodKnown)return;this._allBufferTypes.every(r=>{let n=this._activeStreams.get(r);return n!==void 0&&n.hasFinishedLoadingLastPeriod})?this.trigger("endOfStream",null):this.trigger("resumeStream",null)}},CP=class{constructor(e){this._manifest=e,this._lastAudioAdaptation=void 0,this._lastVideoAdaptation=void 0}updateLastAudioAdaptation(e){this._lastAudioAdaptation=e}updateLastVideoAdaptation(e){this._lastVideoAdaptation=e}getMaximumAvailablePosition(){if(this._manifest.isDynamic)return this._manifest.getMaximumSafePosition();if(this._lastVideoAdaptation===void 0||this._lastAudioAdaptation===void 0)return this._manifest.getMaximumSafePosition();if(this._lastAudioAdaptation===null){if(this._lastVideoAdaptation===null)return this._manifest.getMaximumSafePosition();{let e=SI(this._lastVideoAdaptation);return typeof e!="number"?this._manifest.getMaximumSafePosition():e}}else if(this._lastVideoAdaptation===null){let e=SI(this._lastAudioAdaptation);return typeof e!="number"?this._manifest.getMaximumSafePosition():e}else{let e=SI(this._lastAudioAdaptation),r=SI(this._lastVideoAdaptation);return typeof e!="number"||typeof r!="number"?this._manifest.getMaximumSafePosition():Math.min(e,r)}}getEndingPosition(){var e,r;if(!this._manifest.isDynamic)return this.getMaximumAvailablePosition();if(!(this._lastVideoAdaptation===void 0||this._lastAudioAdaptation===void 0)){if(this._lastAudioAdaptation===null)return this._lastVideoAdaptation===null?void 0:(e=II(this._lastVideoAdaptation))!=null?e:void 0;if(this._lastVideoAdaptation===null)return(r=II(this._lastAudioAdaptation))!=null?r:void 0;{let n=II(this._lastAudioAdaptation),i=II(this._lastVideoAdaptation);return typeof n!="number"||typeof i!="number"?void 0:Math.min(n,i)}}}};function SI(t){let{representations:e}=t,r=null,n;for(let i of e)if(i.index!==n){n=i.index;let a=i.index.getLastAvailablePosition();if(a===void 0)return;a!==null&&(r=w(r)?a:Math.min(r,a))}return r}function II(t){let{representations:e}=t,r=null,n;for(let i=0;i{e.interruptDurationSetting()});let o=new Kp(t,r,n.getBufferTypes());a.register(()=>{o.dispose()}),o.addEventListener("warning",d=>i.onWarning(d)),o.addEventListener("periodChange",d=>i.onPeriodChanged(d)),o.addEventListener("endingPositionChange",d=>{e.setDuration(d.endingPosition,d.isEnd)}),o.addEventListener("endOfStream",()=>{k.debug("Init: end-of-stream order received."),e.maintainEndOfStream()}),o.addEventListener("resumeStream",()=>{e.stopEndOfStream()});let s=o.getCurrentEndingTime();return e.setDuration(s.endingPosition,s.isEnd),o}u();l();var zp=class{constructor(e){this._segmentSinksStore=e,this._currentFreezeTimestamp=null}needToReload(e){let{readyState:r,rebuffering:n,freezing:i}=e;if((e.bufferGap!==void 0&&isFinite(e.bufferGap)?e.bufferGap:0)<6||n===null&&i===null||r>1)return this._currentFreezeTimestamp=null,!1;let o=re();this._currentFreezeTimestamp===null&&(this._currentFreezeTimestamp=o);let s=n!==null&&o-n.timestamp>4e3,d=i!==null&&o-i.timestamp>4e3;if((s||d)&&re()-this._currentFreezeTimestamp>4e3){let c=this._segmentSinksStore.getStatus("audio"),m=this._segmentSinksStore.getStatus("video"),f=!0,p=!0;for(let y of[c,m])if(y.type==="initialized")for(let v of y.value.getLastKnownInventory()){let{representation:b}=v.infos;if(b.decipherable===!1)return k.warn("Init: we have undecipherable segments left in the buffer, reloading"),this._currentFreezeTimestamp=null,!0;b.contentProtections!==void 0&&(p=!1,b.decipherable!==!0&&(f=!1))}if(!p&&f)return k.warn("Init: we are frozen despite only having decipherable segments left in the buffer, reloading"),this._currentFreezeTimestamp=null,!0}return!1}};u();l();u();l();function TI({segmentSink:t,playbackObserver:e,maxBufferBehind:r,maxBufferAhead:n},i){let a,o=[];e.listen(d=>{a=d.position.getWanted(),o=d.buffered[t.bufferType],s()},{includeLastObservation:!0,clearSignal:i});function s(){o!==null&&Aje(t,a,o,r.getValue(),n.getValue(),i).catch(d=>{let c=d instanceof Error?d.message:"Unknown error";k.error("Could not run BufferGarbageCollector:",c)})}r.onUpdate(s,{clearSignal:i}),n.onUpdate(s,{clearSignal:i}),s()}async function Aje(t,e,r,n,i,a){if(!isFinite(n)&&!isFinite(i))return Promise.resolve();let o=[],{innerRange:s,outerRanges:d}=tZ(r,e),c=()=>{if(isFinite(n)){for(let f of d)e-n>=f.end?o.push(f):e>=f.end&&e-n>f.start&&e-ns.start&&o.push({start:s.start,end:e-n})}},m=()=>{if(isFinite(i)){for(let f of d)e+i<=f.start?o.push(f):e<=f.start&&e+if.start&&o.push({start:e+i,end:f.end});w(s)||e+iNa(r.context,e))}_cleanHistory(e){let r=e-this._lifetime,n=0;for(let i of this._history)if(i.date0&&(this._history=this._history.splice(n)),this._history.length>this._maxHistoryLength){let i=this._history.length-this._maxHistoryLength;this._history=this._history.splice(i)}}};var Vp=class{constructor(){let{BUFFERED_HISTORY_RETENTION_TIME:e,BUFFERED_HISTORY_MAXIMUM_ENTRIES:r}=Q.getCurrent();this._inventory=[],this._bufferedHistory=new jp(e,r)}reset(){this._inventory.length=0}synchronizeBuffered(e){var d,c,m,f,p,y,v;let r=this._inventory,n=0,i=r[0],{MINIMUM_SEGMENT_SIZE:a}=Q.getCurrent(),o=i==null?void 0:i.infos.adaptation.type;if(k.hasLevel("DEBUG")){let b=e.map(T=>`${T.start}-${T.end}`).join(",");k.debug(`SI: synchronizing ${o!=null?o:"unknown"} buffered ranges:`,b)}let s=e.length;for(let b=0;b0){let C=r[I+R-1];E={end:(c=C.bufferedEnd)!=null?c:C.end,precizeEnd:C.precizeEnd},k.debug(`SI: ${R} segments GCed.`,o);let A=r.splice(I,R);for(let x of A)x.bufferedStart===void 0&&x.bufferedEnd===void 0&&x.status!==2&&this._bufferedHistory.addBufferedSegment(x.infos,null);n=I}if(i===void 0)return;if(S-((m=i.bufferedStart)!=null?m:i.start)>=a){if(Pje(i,T,E,o),n===r.length-1){iJ(i,S,o);return}i=r[++n];let C=(f=i.bufferedStart)!=null?f:i.start,A=(p=i.bufferedEnd)!=null?p:i.end,x=b=a||x!==void 0&&S-C=b&&(k.debug("SI: A segment at the end has been completely GCed",o,`${I.start}-${I.end}`),I.bufferedStart===void 0&&I.bufferedEnd===void 0&&I.status!==2&&this._bufferedHistory.addBufferedSegment(I.infos,null),r.splice(S,1),S--)}}o!==void 0&&k.hasLevel("DEBUG")&&k.debug(`SI: current ${o} inventory timeline: +`+Oje(this._inventory))}insertChunk({period:e,adaptation:r,representation:n,segment:i,chunkSize:a,start:o,end:s},d,c){if(i.isInit)return;let m=r.type;if(o>=s){k.warn("SI: Invalid chunked inserted: starts before it ends",m,o,s);return}let f=this._inventory,p={status:d?0:2,insertionTs:c,chunkSize:a,splitted:!1,start:o,end:s,precizeStart:!1,precizeEnd:!1,bufferedStart:void 0,bufferedEnd:void 0,infos:{segment:i,period:e,adaptation:r,representation:n}};for(let v=f.length-1;v>=0;v--){let b=f[v];if(b.start<=o)if(b.end<=o){for(k.debug("SI: Pushing segment strictly after previous one.",m,o,b.end),this._inventory.splice(v+1,0,p),v+=2;vp.end){k.debug("SI: Segment pushed updates the start of the next one",m,p.end,f[v].start),f[v].start=p.end,f[v].bufferedStart=void 0,f[v].precizeStart=f[v].precizeStart&&p.precizeEnd;return}k.debug("SI: Segment pushed removes the next one",m,o,s,f[v].start,f[v].end),f.splice(v,1)}return}else if(b.start===o)if(b.end<=s){for(k.debug("SI: Segment pushed replace another one",m,o,s,b.end),this._inventory.splice(v,1,p),v+=1;vp.end){k.debug("SI: Segment pushed updates the start of the next one",m,p.end,f[v].start),f[v].start=p.end,f[v].bufferedStart=void 0,f[v].precizeStart=f[v].precizeStart&&p.precizeEnd;return}k.debug("SI: Segment pushed removes the next one",m,o,s,f[v].start,f[v].end),f.splice(v,1)}return}else{k.debug("SI: Segment pushed ends before another with the same start",m,o,s,b.end),f.splice(v,0,p),b.start=p.end,b.bufferedStart=void 0,b.precizeStart=b.precizeStart&&p.precizeEnd;return}else if(b.end<=p.end){for(k.debug("SI: Segment pushed updates end of previous one",m,o,s,b.start,b.end),this._inventory.splice(v+1,0,p),b.end=p.start,b.bufferedEnd=void 0,b.precizeEnd=b.precizeEnd&&p.precizeStart,v+=2;vp.end){k.debug("SI: Segment pushed updates the start of the next one",m,p.end,f[v].start),f[v].start=p.end,f[v].bufferedStart=void 0,f[v].precizeStart=f[v].precizeStart&&p.precizeEnd;return}k.debug("SI: Segment pushed removes the next one",m,o,s,f[v].start,f[v].end),f.splice(v,1)}return}else{k.warn("SI: Segment pushed is contained in a previous one",m,o,s,b.start,b.end);let T={status:b.status,insertionTs:b.insertionTs,chunkSize:b.chunkSize,splitted:!0,start:p.end,end:b.end,precizeStart:b.precizeStart&&b.precizeEnd&&p.precizeEnd,precizeEnd:b.precizeEnd,bufferedStart:void 0,bufferedEnd:b.end,infos:b.infos};b.end=p.start,b.splitted=!0,b.bufferedEnd=void 0,b.precizeEnd=b.precizeEnd&&p.precizeStart,f.splice(v+1,0,p),f.splice(v+2,0,T);return}}let y=this._inventory[0];if(y===void 0){k.debug("SI: first segment pushed",m,o,s),this._inventory.push(p);return}if(y.start>=s)k.debug("SI: Segment pushed comes before all previous ones",m,o,s,y.start),this._inventory.splice(0,0,p);else if(y.end<=s){for(k.debug("SI: Segment pushed starts before and completely recovers the previous first one",m,o,s,y.start,y.end),this._inventory.splice(0,1,p);f.length>1&&f[1].startp.end){k.debug("SI: Segment pushed updates the start of the next one",m,p.end,f[1].start),f[1].start=p.end,f[1].bufferedStart=void 0,f[1].precizeStart=p.precizeEnd;return}k.debug("SI: Segment pushed removes the next one",m,o,s,f[1].start,f[1].end),f.splice(1,1)}return}else{k.debug("SI: Segment pushed start of the next one",m,o,s,y.start,y.end),y.start=s,y.bufferedStart=void 0,y.precizeStart=p.precizeEnd,this._inventory.splice(0,0,p);return}}completeSegment(e){if(e.segment.isInit)return;let r=this._inventory,n=[];for(let i=0;i0&&(a=!0,n.length===1&&(k.warn("SI: Completed Segment is splitted.",e.segment.id,e.segment.time,e.segment.end),n[0].splitted=!0));let o=i,s=r[i].chunkSize;for(i+=1;i0&&(this._inventory.splice(o+1,c),i-=c),this._inventory[o].status===0&&(this._inventory[o].status=1),this._inventory[o].chunkSize=s,this._inventory[o].end=m,this._inventory[o].bufferedEnd=f,this._inventory[o].splitted=a,n.push(this._inventory[o])}if(n.length===0)k.warn("SI: Completed Segment not found",e.segment.id,e.segment.time);else for(let i of n)i.bufferedStart!==void 0&&i.bufferedEnd!==void 0?i.status!==2&&this._bufferedHistory.addBufferedSegment(i.infos,{start:i.bufferedStart,end:i.bufferedEnd}):k.debug("SI: buffered range not known after sync. Skipping history.",i.start,i.end)}getInventory(){return this._inventory}getHistoryFor(e){return this._bufferedHistory.getHistoryFor(e)}};function xP(t){if(t.bufferedStart===void 0||t.status!==1)return!1;let{start:e,end:r}=t,n=r-e,{MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:i,MAX_MANIFEST_BUFFERED_DURATION_DIFFERENCE:a}=Q.getCurrent();return Math.abs(e-t.bufferedStart)<=i&&(t.bufferedEnd===void 0||t.bufferedEnd>t.bufferedStart&&Math.abs(t.bufferedEnd-t.bufferedStart-n)<=Math.min(a,n/3))}function nJ(t){if(t.bufferedEnd===void 0||!t.infos.segment.complete||t.status!==1)return!1;let{start:e,end:r}=t,n=r-e,{MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:i,MAX_MANIFEST_BUFFERED_DURATION_DIFFERENCE:a}=Q.getCurrent();return Math.abs(r-t.bufferedEnd)<=i&&t.bufferedStart!==void 0&&t.bufferedEnd>t.bufferedStart&&Math.abs(t.bufferedEnd-t.bufferedStart-n)<=Math.min(a,n/3)}function Pje(t,e,r,n){let{MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:i,MISSING_DATA_TRIGGER_SYNC_DELAY:a,SEGMENT_SYNCHRONIZATION_DELAY:o}=Q.getCurrent();if(t.bufferedStart!==void 0)t.bufferedStarte&&(r.precizeEnd||t.start-r.end<=i))k.debug("SI: buffered start is end of previous segment",n,e,t.start,r.end),t.bufferedStart=r.end,xP(t)&&(t.start=r.end,t.precizeStart=!0);else if(t.start-e<=i){let s=re();if(t.start-e>=a&&s-t.insertionTs=a&&s-t.insertionTse&&(k.debug("SI: Segment partially GCed at the end",r,t.bufferedEnd,e),t.bufferedEnd=e),!t.precizeEnd&&e-t.end<=n&&nJ(t)&&(t.precizeEnd=!0,t.end=e);else if(t.precizeEnd)k.debug("SI: buffered end is precize end",r,t.end),t.bufferedEnd=t.end;else if(e-t.end<=n||!t.infos.segment.complete){let o=re();if(e-t.end>=i&&o-t.insertionTst.end)k.debug("SI: range end too far from expected end",r,e,t.end),t.bufferedEnd=t.end;else{let o=re();if(e-t.end>=i&&o-t.insertionTs{var c;s+=` +[${d.letter}] P: ${d.periodId} || R: ${d.representationId}(${(c=d.bitrate)!=null?c:"unknown bitrate"})`}),s}u();l();function Kd(t,e){for(let r=0;r=e.start)return r>0?t[r-1]:null;return t.length>0?t[t.length-1]:null}function zd(t,e){for(let r of t)if(r.infos.period.start>e.start)return r;return null}var aJ=Vp;var jd=class{constructor(){this._segmentInventory=new aJ}synchronizeInventory(e){this._segmentInventory.synchronizeBuffered(e)}getLastKnownInventory(){return this._segmentInventory.getInventory()}getSegmentHistory(e){return this._segmentInventory.getHistoryFor(e)}};var Hp=class extends jd{constructor(e,r,n){super(),k.info("AVSB: calling `mediaSource.addSourceBuffer`",r);let i=n.addSourceBuffer(e,r);this.bufferType=e,this._sourceBuffer=i,this._lastInitSegmentUniqueId=null,this.codec=r,this._initSegmentsMap=new Map,this._pendingOperations=[]}declareInitSegment(e,r){oJ(r),this._initSegmentsMap.set(e,r)}freeInitSegment(e){this._initSegmentsMap.delete(e)}async pushChunk(e){oJ(e.data.chunk),k.debug("AVSB: receiving order to push data to the SourceBuffer",this.bufferType,hu(e.inventoryInfos));let r=this._getActualDataToPush(e.data);r.length===0&&r.push(new Uint8Array);let n=Promise.all(r.map(o=>{let{codec:s,timestampOffset:d,appendWindow:c}=e.data;return k.debug("AVSB: pushing segment",this.bufferType,hu(e.inventoryInfos)),this._sourceBuffer.appendBuffer(o,{codec:s,timestampOffset:d,appendWindow:c})}));this._addToOperationQueue(n,{type:0,value:e});let i;try{i=await n}catch(o){throw this._segmentInventory.insertChunk(e.inventoryInfos,!1,re()),o}e.inventoryInfos!==null&&this._segmentInventory.insertChunk(e.inventoryInfos,!0,re());let a=i[i.length-1];return this._segmentInventory.synchronizeBuffered(a),a}async removeBuffer(e,r){k.debug("AVSB: receiving order to remove data from the SourceBuffer",this.bufferType,e,r);let n=this._sourceBuffer.remove(e,r);this._addToOperationQueue(n,{type:1,value:{start:e,end:r}});let i=await n;return this._segmentInventory.synchronizeBuffered(i),i}async signalSegmentComplete(e){if(this._pendingOperations.length>0){let{promise:r}=this._pendingOperations[this._pendingOperations.length-1];this._addToOperationQueue(r,{type:2,value:e});try{await r}catch(n){}}this._segmentInventory.completeSegment(e)}getPendingOperations(){return this._pendingOperations.map(e=>e.operation)}dispose(){try{k.debug("AVSB: Calling `dispose` on the SourceBufferInterface"),this._sourceBuffer.dispose()}catch(e){k.debug(`AVSB: Failed to dispose a ${this.bufferType} SourceBufferInterface:`,e instanceof Error?e:"")}}_getActualDataToPush(e){let r=[];if(e.initSegmentUniqueId!==null&&!this._isLastInitSegment(e.initSegmentUniqueId)){let n=this._initSegmentsMap.get(e.initSegmentUniqueId);if(n===void 0)throw new Error("Invalid initialization segment uniqueId");let i=new ArrayBuffer(n.byteLength),a=new Uint8Array(i);a.set(n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer)),n=a,r.push(n),this._lastInitSegmentUniqueId=e.initSegmentUniqueId}return e.chunk!==null&&r.push(e.chunk),r}_isLastInitSegment(e){return this._lastInitSegmentUniqueId===null?!1:this._lastInitSegmentUniqueId===e}_addToOperationQueue(e,r){let n={operation:r,promise:e};this._pendingOperations.push(n);let i=()=>{let a=this._pendingOperations.indexOf(n);a>=0&&this._pendingOperations.splice(a,1)};e.then(i,i)}};function oJ(t){if(g.CURRENT_ENV!==g.PRODUCTION&&(typeof t!="object"||t!==null&&!(t instanceof ArrayBuffer)&&!(t.buffer instanceof ArrayBuffer)))throw new Error("Invalid data given to the AudioVideoSegmentSink")}var EI=Hp;u();l();u();l();u();l();var Gp=class extends jd{constructor(e){k.debug("HTSB: Creating TextSegmentSink"),super(),this.bufferType="text",this._sender=e,this._pendingOperations=[],this._sender.reset()}declareInitSegment(e){k.warn("HTSB: Declaring initialization segment for Text SegmentSink",e)}freeInitSegment(e){k.warn("HTSB: Freeing initialization segment for Text SegmentSink",e)}async pushChunk(e){let{data:r}=e;Nje(r.chunk);let n=this._sender.pushTextData(nt(je({},r),{chunk:r.chunk}));this._addToOperationQueue(n,{type:0,value:e});let i=await n;return e.inventoryInfos!==null&&this._segmentInventory.insertChunk(e.inventoryInfos,!0,re()),this._segmentInventory.synchronizeBuffered(i),i}async removeBuffer(e,r){let n=this._sender.remove(e,r);this._addToOperationQueue(n,{type:1,value:{start:e,end:r}});let i=await n;return this._segmentInventory.synchronizeBuffered(i),i}async signalSegmentComplete(e){if(this._pendingOperations.length>0){let{promise:r}=this._pendingOperations[this._pendingOperations.length-1];this._addToOperationQueue(r,{type:2,value:e});try{await r}catch(n){}}this._segmentInventory.completeSegment(e)}getPendingOperations(){return this._pendingOperations.map(e=>e.operation)}dispose(){k.debug("HTSB: Disposing TextSegmentSink"),this._sender.reset()}_addToOperationQueue(e,r){let n={operation:r,promise:e};this._pendingOperations.push(n);let i=()=>{let a=this._pendingOperations.indexOf(n);a>=0&&this._pendingOperations.splice(a,1)};e.then(i,i)}};function Nje(t){if(g.CURRENT_ENV!==g.PRODUCTION&&(typeof t!="object"||t===null||typeof t.data!="string"||typeof t.type!="string"||t.language!==void 0&&typeof t.language!="string"||t.start!==void 0&&typeof t.start!="number"||t.end!==void 0&&typeof t.end!="number"))throw new Error("Invalid format given to a TextSegmentSink")}g.CURRENT_ENV===g.DEV&&(Dje=function(e){function r(n){}});var Dje;var sJ=Gp;var qje=["audio","video","text"],Wp=class t{static isNative(e){return uJ(e)}constructor(e,r,n){this._mediaSource=e,this._textInterface=n,this._hasVideo=r,this._initializedSegmentSinks={},this._onNativeBufferAddedOrDisabled=[]}getBufferTypes(){let e=this.getNativeBufferTypes();return this._textInterface!==null&&e.push("text"),e}getNativeBufferTypes(){return this._hasVideo?["video","audio"]:["audio"]}getStatus(e){let r=this._initializedSegmentSinks[e];return r===void 0?{type:"uninitialized"}:r===null?{type:"disabled"}:{type:"initialized",value:r}}waitForUsableBuffers(e){return this._areNativeBuffersUsable()?Promise.resolve():nn(e,r=>{let n,i=()=>{let a=this._onNativeBufferAddedOrDisabled.indexOf(n);a>=0&&this._onNativeBufferAddedOrDisabled.splice(a,1)};return n=()=>{this._areNativeBuffersUsable()&&(i(),r())},this._onNativeBufferAddedOrDisabled.push(n),i})}disableSegmentSink(e){let r=this._initializedSegmentSinks[e];if(r===null){k.warn(`SBS: The ${e} SegmentSink was already disabled.`);return}if(r!==void 0)throw new Error("Cannot disable an active SegmentSink.");this._initializedSegmentSinks[e]=null,t.isNative(e)&&this._onNativeBufferAddedOrDisabled.forEach(n=>n())}createSegmentSink(e,r){let n=this._initializedSegmentSinks[e];if(uJ(e)){if(!w(n))return n instanceof EI&&n.codec!==r?k.warn("SB: Reusing native SegmentSink with codec",n.codec,"for codec",r):k.info("SB: Reusing native SegmentSink with codec",r),n;k.info("SB: Adding native SegmentSink with codec",r);let a=e==="audio"?"audio":"video",o=new EI(a,r,this._mediaSource);return this._initializedSegmentSinks[e]=o,this._onNativeBufferAddedOrDisabled.forEach(s=>s()),o}if(!w(n))return k.info("SB: Reusing a previous custom SegmentSink for the type",e),n;let i;if(e==="text"){if(k.info("SB: Creating a new text SegmentSink"),this._textInterface===null)throw new Error("HTML Text track feature not activated");return i=new sJ(this._textInterface),this._initializedSegmentSinks.text=i,i}throw k.error("SB: Unknown buffer type:",e),new he("BUFFER_TYPE_UNKNOWN","The player wants to create a SegmentSink of an unknown type.")}disposeSegmentSink(e){let r=this._initializedSegmentSinks[e];if(w(r)){k.warn("SB: Trying to dispose a SegmentSink that does not exist");return}k.info("SB: Aborting SegmentSink",e),r.dispose(),delete this._initializedSegmentSinks[e]}disposeAll(){qje.forEach(e=>{this.getStatus(e).type==="initialized"&&this.disposeSegmentSink(e)})}_areNativeBuffersUsable(){let e=this.getNativeBufferTypes();return!(e.some(i=>this._initializedSegmentSinks[i]===void 0)||e.every(i=>this._initializedSegmentSinks[i]===null))}createSegmentSinkMetricsForType(e){var r,n;return{bufferType:e,codec:(r=this._initializedSegmentSinks[e])==null?void 0:r.codec,segmentInventory:(n=this._initializedSegmentSinks[e])==null?void 0:n.getLastKnownInventory().map(i=>nt(je({},i),{infos:Bje(i.infos)}))}}getSegmentSinksMetrics(){return{segmentSinks:{audio:this.createSegmentSinkMetricsForType("audio"),video:this.createSegmentSinkMetricsForType("video"),text:this.createSegmentSinkMetricsForType("text")}}}};function uJ(t){return t==="audio"||t==="video"}function Bje(t){return{adaptation:t.adaptation.getMetadataSnapshot(),period:t.period.getMetadataSnapshot(),representation:t.representation.getMetadataSnapshot()}}var es=Wp;u();l();u();l();u();l();u();l();var $p=class{constructor(e){this._weakMap=new WeakMap,this._fn=e}get(e){let r=this._weakMap.get(e);if(r===void 0){let n=this._fn(e);return this._weakMap.set(e,n),n}else return r}destroy(e){this._weakMap.delete(e)}};u();l();u();l();u();l();u();l();u();l();u();l();u();l();var Yp=class extends Me{constructor(e,r,n,i){super(),this._content=e,this._currentCanceller=null,this._downloadQueue=r,this._initSegmentRequest=null,this._mediaSegmentRequest=null,this._segmentFetcher=n,this._initSegmentInfoRef=new oe(void 0),this._mediaSegmentAwaitingInitMetadata=null,i||this._initSegmentInfoRef.setValue(null)}getRequestedInitSegment(){return this._initSegmentRequest===null?null:this._initSegmentRequest.segment}getRequestedMediaSegment(){return this._mediaSegmentRequest===null?null:this._mediaSegmentRequest.segment}start(){this._currentCanceller===null&&(this._currentCanceller=new X,this._downloadQueue.onUpdate(e=>{let{segmentQueue:r}=e;if(r.length>0&&r[0].segment.id===this._mediaSegmentAwaitingInitMetadata)return;let n=this._mediaSegmentRequest;if(r.length===0){if(n===null)return;k.debug("Stream: no more media segment to request. Cancelling queue.",this._content.adaptation.type),this._restartMediaSegmentDownloadingQueue();return}else if(n===null){k.debug("Stream: Media segments now need to be requested. Starting queue.",this._content.adaptation.type,r.length),this._restartMediaSegmentDownloadingQueue();return}else{let i=r[0];if(n.segment.id!==i.segment.id){k.debug("Stream: Next media segment changed, cancelling previous",this._content.adaptation.type),this._restartMediaSegmentDownloadingQueue();return}n.priority!==i.priority&&(k.debug("Stream: Priority of next media segment changed, updating",this._content.adaptation.type,n.priority,i.priority),this._segmentFetcher.updatePriority(n.request,i.priority));return}},{emitCurrentValue:!0,clearSignal:this._currentCanceller.signal}),this._downloadQueue.onUpdate(e=>{var n;let r=this._initSegmentRequest;if(e.initSegment!==null&&r!==null){e.initSegment.priority!==r.priority&&this._segmentFetcher.updatePriority(r.request,e.initSegment.priority);return}else if(((n=e.initSegment)==null?void 0:n.segment.id)===(r==null?void 0:r.segment.id))return;e.initSegment===null&&k.debug("Stream: no more init segment to request. Cancelling queue.",this._content.adaptation.type),this._restartInitSegmentDownloadingQueue(e.initSegment)},{emitCurrentValue:!0,clearSignal:this._currentCanceller.signal}))}stop(){var e;(e=this._currentCanceller)==null||e.cancel(),this._currentCanceller=null}_restartMediaSegmentDownloadingQueue(){this._mediaSegmentRequest!==null&&this._mediaSegmentRequest.canceller.cancel();let{segmentQueue:e}=this._downloadQueue.getValue(),r=e[0],n=i=>{if(this._currentCanceller!==null&&this._currentCanceller.isUsed()){this._mediaSegmentRequest=null;return}if(i===void 0){this._mediaSegmentRequest=null,this.trigger("emptyQueue",null);return}let a=new X,o=this._currentCanceller===null?ye:a.linkToSignal(this._currentCanceller.signal),{segment:s,priority:d}=i,c=le({segment:s},this._content),m=!1,f=!1;a.signal.register(()=>{this._mediaSegmentRequest=null,!m&&(this._mediaSegmentAwaitingInitMetadata===s.id&&(this._mediaSegmentAwaitingInitMetadata=null),m=!0,f=!1)});let p=b=>{be(b.segmentType==="media","Should have loaded a media segment."),this.trigger("parsedMediaSegment",le({},b,{segment:s}))},y=()=>{let b=this._downloadQueue.getValue().segmentQueue;if(b.length===0){m=!0,this.trigger("emptyQueue",null);return}else b[0].segment.id===s.id&&b.shift();m=!0,n(b[0])},v=this._segmentFetcher.createRequest(c,d,{onRetry:b=>{this.trigger("requestRetry",{segment:s,error:b})},beforeInterrupted(){k.info("Stream: segment request interrupted temporarly.",s.id,s.time)},onChunk:b=>{let T=this._initSegmentInfoRef.getValue();T!==void 0?p(b(T!=null?T:void 0)):(f=!0,this._initSegmentInfoRef.waitUntilDefined(S=>{p(b(S!=null?S:void 0))},{clearSignal:a.signal}))},onAllChunksReceived:()=>{f?(this._mediaSegmentAwaitingInitMetadata=s.id,this._initSegmentInfoRef.waitUntilDefined(()=>{this._mediaSegmentAwaitingInitMetadata=null,f=!1,this.trigger("fullyLoadedSegment",s)},{clearSignal:a.signal})):this.trigger("fullyLoadedSegment",s)},beforeEnded:()=>{o(),this._mediaSegmentRequest=null,f?this._initSegmentInfoRef.waitUntilDefined(y,{clearSignal:a.signal}):y()}},a.signal);v.catch(b=>{o(),m||(m=!0,this.stop(),this.trigger("error",b))}),this._mediaSegmentRequest={segment:s,priority:d,request:v,canceller:a}};n(r)}_restartInitSegmentDownloadingQueue(e){if(this._currentCanceller!==null&&this._currentCanceller.isUsed()||(this._initSegmentRequest!==null&&this._initSegmentRequest.canceller.cancel(),e===null))return;let r=new X,n=this._currentCanceller===null?ye:r.linkToSignal(this._currentCanceller.signal),{segment:i,priority:a}=e,o=le({segment:i},this._content),s=!1,d=this._segmentFetcher.createRequest(o,a,{onRetry:c=>{this.trigger("requestRetry",{segment:i,error:c})},beforeInterrupted:()=>{k.info("Stream: init segment request interrupted temporarly.",i.id)},beforeEnded:()=>{n(),this._initSegmentRequest=null,s=!0},onChunk:c=>{var f;let m=c(void 0);be(m.segmentType==="init","Should have loaded an init segment."),this.trigger("parsedInitSegment",le({},m,{segment:i})),m.segmentType==="init"&&this._initSegmentInfoRef.setValue((f=m.initTimescale)!=null?f:null)},onAllChunksReceived:()=>{this.trigger("fullyLoadedSegment",i)}},r.signal);d.catch(c=>{n(),s||(s=!0,this.stop(),this.trigger("error",c))}),r.signal.register(()=>{this._initSegmentRequest=null,!s&&(s=!0)}),this._initSegmentRequest={segment:i,priority:a,request:d,canceller:r}}};u();l();u();l();function AP(t,e,r,n,i){let{period:a,adaptation:o,representation:s}=t,d=Uje(i,e);if(d===null){if(r===null){if(n&&a.end!==void 0&&e.end>=a.end)return{start:void 0,end:null};let f=s.index.checkDiscontinuity(e.start);if(f!==null)return{start:void 0,end:f}}return null}let c=i[d];if(c.bufferedStart!==void 0&&c.bufferedStart>e.start&&(r===null||c.infos.segment.end<=r)){let f=c.bufferedStart;return!n&&s.index.awaitSegmentBetween(e.start,f)!==!1?null:(k.debug("RS: current discontinuity encountered",o.type,c.bufferedStart),{start:void 0,end:f})}let m=Fje(i,e,d+1);if(m!==null){let f=i[m-1],p=i[m];if(r===null||p.infos.segment.end<=r){if(!n&&s.index.awaitSegmentBetween(f.infos.segment.end,p.infos.segment.time)!==!1)return null;let y=f.bufferedEnd,v=p.bufferedStart;return k.debug("RS: future discontinuity encountered",o.type,y,v),{start:y,end:v}}}if(r===null){if(n&&a.end!==void 0){if(e.end=a.end)return null;for(let f=i.length-1;f>=0;f--){let p=i[f];if(p.bufferedStart===void 0)break;if(p.bufferedStart=e.end)return null;if(n.bufferedEnd>e.start)return r}return null}function Fje(t,e,r){if(r<=0)return k.error("RS: Asked to check a discontinuity before the first chunk."),null;for(let n=r;n=e.end)return null;if(i.bufferedStart-a.bufferedEnd>0)return n}return null}function Kje(t,e){for(let r=t.length-1;r>=0;r--){let n=t[r];if(n.bufferedStart===void 0)return null;if(n.bufferedStart!lJ(M.infos,e,r,n)),y=Yje(p,a,i),{MINIMUM_SEGMENT_SIZE:v,MIN_BUFFER_AHEAD:b}=Q.getCurrent(),T=!1,S=Math.min(1/60,v),I=!1,E=[];return{segmentsToLoad:f.filter(M=>{let C=le({segment:M},e);if(o.length>0&&o.some(P=>Na(C,P)))return!1;let{duration:A,time:x,end:O}=M;if(M.isInit)return!0;if(T)return E.push(M),!1;if(M.complete&&A0&&o.some(P=>{if(P.period.id!==e.period.id||P.adaptation.id!==e.adaptation.id)return!1;let{segment:L}=P;if(L.time-S>x)return!1;if(L.complete){if(L.end+Sx)return!1;return!lJ(P,C,r,n)}))return!1;for(let K=0;K-S){if(V.complete){if(V.end-O>-S)return!1}else if(Math.abs(x-V.time)a.start+b))return T=!0,E.push(M),!1;let F=i(C);if(F.length>1){let K=F[F.length-1],P=F[F.length-2];if(K.buffered===null&&P.buffered===null)return k.warn("Stream: Segment GCed multiple times in a row, ignoring it.","If this happens a lot and lead to unpleasant experience, please check your device's available memory. If it's low when this message is emitted, you might want to update the RxPlayer's settings (`maxBufferAhead`, `maxVideoBufferSize` etc.) so less memory is used by regular media data buffering."+d.type,c.id,M.time),!1}for(let K=0;Kx){let L=P.start>x+S||jje(y,K).end{let{bitrate:o}=a.representation,{duration:s}=a.segment;return i+o*s},0),t.reduce((i,a)=>a.chunkSize!==void 0?i-a.chunkSize*8:i,n)}function jje(t,e){let r=e+1,{MINIMUM_SEGMENT_SIZE:n}=Q.getCurrent(),i=Math.min(1/60,n);for(;rt[r].start;)r++;return r--,t[r]}function lJ(t,e,r,n){let{CONTENT_REPLACEMENT_PADDING:i}=Q.getCurrent();if(t.period.id!==e.period.id)return!1;let{segment:a}=t;return a.timea}return nn}function Hje(t,e,r){let{MAX_TIME_MISSING_FROM_COMPLETE_SEGMENT:n}=Q.getCurrent();return t.bufferedStart===void 0||e!==null&&e.bufferedEnd!==void 0&&t.bufferedStart-e.bufferedEnd<.1?!1:rn?(k.info("Stream: The start of the wanted segment has been garbage collected",t.start,t.bufferedStart),!0):!1}function Gje(t,e,r){let{MAX_TIME_MISSING_FROM_COMPLETE_SEGMENT:n}=Q.getCurrent();return t.bufferedEnd===void 0||e!==null&&e.bufferedStart!==void 0&&e.bufferedStart-t.bufferedEnd<.1?!1:r>t.bufferedEnd&&t.end-t.bufferedEnd>n?(k.info("Stream: The end of the wanted segment has been garbage collected",t.end,t.bufferedEnd),!0):!1}function Wje(t,e){var o,s;if(t.length<2)return!0;let n=(o=t[t.length-1].buffered)==null?void 0:o.start;if(e!==void 0&&n!==void 0&&e-n>.05)return!0;let a=(s=t[t.length-2].buffered)==null?void 0:s.start;return a===void 0||n===void 0?!0:Math.abs(a-n)>.01}function $je(t,e){var o,s;if(t.length<2)return!0;let n=(o=t[t.length-1].buffered)==null?void 0:o.end;if(e!==void 0&&n!==void 0&&n-e>.05)return!0;let a=(s=t[t.length-2].buffered)==null?void 0:s.end;return a===void 0||n===void 0?!0:Math.abs(a-n)>.01}function Yje(t,e,r){return t.filter((n,i,a)=>{let o=i===0?null:a[i-1],s=i>=a.length-1?null:a[i+1],d=null;if(Hje(n,o,e.start)){if(d=r(n.infos),Wje(d,n.bufferedStart))return!1;k.debug("Stream: skipping segment gc-ed at the start",n.start,n.bufferedStart)}if(Gje(n,s,e.end)){if(d=d!=null?d:r(n.infos),$je(d,n.bufferedEnd))return!1;k.debug("Stream: skipping segment gc-ed at the end",n.end,n.bufferedEnd)}return!0})}u();l();function Qp(t,e){let r=t-e,{SEGMENT_PRIORITIES_STEPS:n}=Q.getCurrent();for(let i=0;iF.type===2).map(F=>F.value),v=o.getLastKnownInventory(),b=r.getCurrentTime();b===void 0&&(b=r.getReference().getValue().position.getWanted());let T=o.getSegmentHistory.bind(o),{segmentsToLoad:S,segmentsOnHold:I,isBufferFull:E}=PP({content:t,bufferedSegments:v,currentPlaybackTime:b,fastSwitchThreshold:n,getBufferedHistory:T,neededRange:f,segmentsBeingPushed:y,maxBufferSize:a}),R=S.map(F=>({priority:Qp(F.time,m),segment:F})),M=s.index.isInitialized()&&!s.index.isStillAwaitingFutureSegments()&&f.hasReachedPeriodEnd&&R.length===0&&I.length===0,C=null;return y.length>0&&(C=Math.min(...y.map(F=>F.segment.time))),I.length>0&&(C=C!==null?Math.min(C,I[0].time):I[0].time),R.length>0&&(C=C!==null?Math.min(C,R[0].segment.time):R[0].segment.time),{imminentDiscontinuity:AP(t,f,C,M,v),hasFinishedLoading:M,neededSegments:R,isBufferFull:E,shouldRefreshManifest:p}}function Qje(t,e,r){var f;let n,{manifest:i,period:a,representation:o}=t,s=o.index.getLastAvailablePosition(),d=o.index;!w(s)&&es.isNative(t.adaptation.type)&&e>=s&&d.isInitialized()&&!d.isStillAwaitingFutureSegments()&&Xje(i,a,e)?n=s-1:n=e-.1;let c=n+r,m;return!o.index.isInitialized()||o.index.isStillAwaitingFutureSegments()||a.end===void 0?m=!1:s===void 0?m=c>=a.end:s===null?m=!0:m=c>=s,{start:Math.max(n,a.start),end:Math.min(c,(f=a.end)!=null?f:1/0),hasReachedPeriodEnd:m}}function Xje(t,e,r){var i;let n=t.getPeriodAfter(e);return e.containsTime(r,n)&&t.isLastPeriodKnown&&e.id===((i=t.periods[t.periods.length-1])==null?void 0:i.id)}u();l();u();l();async function Xp(t,e,r,n,i){try{return await e.pushChunk(r)}catch(a){if(i.isCancelled()&&a instanceof yt)throw a;if(!(a instanceof Ir)||!a.isBufferFull){let d=a instanceof Error?a.toString():"An unknown error happened when pushing content";throw new he("BUFFER_APPEND_ERROR",d,{tracks:[jo(r.inventoryInfos.adaptation)]})}let{position:o}=t.getReference().getValue(),s=o.getWanted();try{k.warn("Stream: Running garbage collector");let d=Math.max(s-5,0),c=s+n.getValue()+12;if(await e.removeBuffer(0,d),await e.removeBuffer(c,Number.MAX_VALUE),await yu(200),i.cancellationError!==null)throw i.cancellationError;return await e.pushChunk(r)}catch(d){if(d instanceof yt)throw d;let c=d instanceof Error?d.toString():"Could not clean the buffer";throw new he("BUFFER_FULL_ERROR",c,{tracks:[jo(r.inventoryInfos.adaptation)]})}}}async function LP({playbackObserver:t,content:e,initSegmentUniqueId:r,segment:n,segmentSink:i,bufferGoal:a},o){if(o.cancellationError!==null)throw o.cancellationError;let s=e.representation.getMimeTypeString(),d={initSegmentUniqueId:r,chunk:null,timestampOffset:0,appendWindow:[void 0,void 0],codec:s},c=le({segment:n,chunkSize:void 0,start:0,end:0},e),m=await Xp(t,i,{data:d,inventoryInfos:c},a,o);return{content:e,segment:n,buffered:m}}u();l();async function NP({playbackObserver:t,bufferGoal:e,content:r,initSegmentUniqueId:n,parsedSegment:i,segment:a,segmentSink:o},s){var C,A;if(i.chunkData===null)return null;if(s.cancellationError!==null)throw s.cancellationError;let{chunkData:d,chunkInfos:c,chunkOffset:m,chunkSize:f,appendWindow:p}=i,y=r.representation.getMimeTypeString(),{APPEND_WINDOW_SECURITIES:v}=Q.getCurrent(),b=[p[0]!==void 0?Math.max(0,p[0]-v.START):void 0,p[1]!==void 0?p[1]+v.END:void 0],T={initSegmentUniqueId:n,chunk:d,timestampOffset:m,appendWindow:b,codec:y},S=(C=c==null?void 0:c.time)!=null?C:a.time,I=(A=c==null?void 0:c.duration)!=null?A:a.duration,E=S+I;b[0]!==void 0&&(S=Math.max(S,b[0])),b[1]!==void 0&&(E=Math.min(E,b[1]));let R=le({segment:a,chunkSize:f,start:S,end:E},r),M=await Xp(t,o,{data:T,inventoryInfos:R},e,s);return{content:r,segment:a,buffered:M}}function DP({content:t,options:e,playbackObserver:r,segmentSink:n,segmentFetcher:i,terminate:a},o,s){let{period:d,adaptation:c,representation:m}=t,{bufferGoal:f,maxBufferSize:p,drmSystemId:y,fastSwitchThreshold:v}=e,b=c.type,T=new X;T.linkToSignal(s);let S=new X;S.linkToSignal(T.signal);let I={segment:m.index.getInitSegment(),uniqueId:null,isLoaded:!1};T.signal.register(()=>{I.uniqueId!==null&&n.freeInitSegment(I.uniqueId)});let E=new oe({initSegment:null,segmentQueue:[]},S.signal),R=I.segment!==null;R||(I.isLoaded=!0);let M=!1;if(y!==void 0){let D=m.getEncryptionData(y);if(D.length>0&&D.every(F=>F.keyIds!==void 0)&&(M=!0,o.encryptionDataEncountered(D.map(F=>le({content:t},F))),T.isUsed()))return}let C=new Yp(t,E,i,R);C.addEventListener("error",D=>{S.signal.isCancelled()||(T.cancel(),o.error(D))}),C.addEventListener("parsedInitSegment",x),C.addEventListener("parsedMediaSegment",x),C.addEventListener("emptyQueue",A),C.addEventListener("requestRetry",D=>{if(o.warning(D.error),S.signal.isCancelled())return;let F=D.segment,{index:K}=m;K.isSegmentStillAvailable(F)===!1?A():K.canBeOutOfSyncError(D.error,F)&&o.manifestMightBeOufOfSync()}),C.addEventListener("fullyLoadedSegment",D=>{n.signalSegmentComplete(le({segment:D},t)).catch(O)}),C.start(),S.signal.register(()=>{C.removeEventListener(),C.stop()}),r.listen(A,{includeLastObservation:!1,clearSignal:S.signal}),t.manifest.addEventListener("manifestUpdate",A,S.signal),f.onUpdate(A,{emitCurrentValue:!1,clearSignal:S.signal}),p.onUpdate(A,{emitCurrentValue:!1,clearSignal:S.signal}),a.onUpdate(A,{emitCurrentValue:!1,clearSignal:S.signal}),A();return;function A(){if(S.isUsed())return;let D=r.getReference().getValue(),F=D.position.getWanted(),K=OP(t,F,r,v.getValue(),f.getValue(),p.getValue(),n),{neededSegments:P}=K,L=null;if(m.index.isInitialized()){if(P.length>0&&!I.isLoaded&&I.segment!==null){let N=P[0].priority;L={segment:I.segment,priority:N}}}else if(I.segment===null)k.warn("Stream: Uninitialized index without an initialization segment");else if(I.isLoaded)k.warn("Stream: Uninitialized index with an already loaded initialization segment");else{let N=D.position.getWanted();L={segment:I.segment,priority:Qp(d.start,N)}}let V=a.getValue();if(V===null)E.setValue({initSegment:L,segmentQueue:P});else if(V.urgent){k.debug("Stream: Urgent switch, terminate now.",b),E.setValue({initSegment:null,segmentQueue:[]}),E.finish(),S.cancel(),o.terminating();return}else{let N=P[0],B=C.getRequestedInitSegment(),U=C.getRequestedMediaSegment(),j=U===null||N===void 0||U.id!==N.segment.id?[]:[N],Y=B===null?null:L;if(E.setValue({initSegment:Y,segmentQueue:j}),j.length===0&&Y===null){k.debug("Stream: No request left, terminate",b),E.finish(),S.cancel(),o.terminating();return}}if(o.streamStatusUpdate({period:d,position:D.position.getWanted(),bufferType:b,imminentDiscontinuity:K.imminentDiscontinuity,isEmptyStream:!1,hasFinishedLoading:K.hasFinishedLoading,neededSegments:K.neededSegments}),S.signal.isCancelled())return;let{UPTO_CURRENT_POSITION_CLEANUP:z}=Q.getCurrent();if(K.isBufferFull){let N=Math.max(0,F-z);N>0&&n.removeBuffer(0,N).catch(O)}K.shouldRefreshManifest&&o.needsManifestRefresh()}function x(D){if(!T.isUsed()){for(let F of D.protectionData)m.addProtectionData(F.initDataType,F.keyId,F.initData);if(!M){let F=m.getAllEncryptionData();if(F.length>0&&(o.encryptionDataEncountered(F.map(K=>le({content:t},K))),M=!0,T.isUsed()))return}if(D.segmentType==="init"){if(!m.index.isInitialized()&&D.segmentList!==void 0&&m.index.initialize(D.segmentList),I.isLoaded=!0,D.initializationData!==null){let F=m.uniqueId;I.uniqueId=F,n.declareInitSegment(F,D.initializationData),LP({playbackObserver:r,bufferGoal:f,content:t,initSegmentUniqueId:F,segment:D.segment,segmentData:D.initializationData,segmentSink:n},T.signal).then(K=>{K!==null&&o.addedSegment(K)}).catch(O)}A();return}else{let{inbandEvents:F,predictedSegments:K,needsManifestRefresh:P}=D;if(K!==void 0&&m.index.addPredictedSegments(K,D.segment),P===!0&&(o.needsManifestRefresh(),T.isUsed())||F!==void 0&&F.length>0&&(o.inbandEvent(F),T.isUsed()))return;let L=I.uniqueId;NP({playbackObserver:r,bufferGoal:f,content:t,initSegmentUniqueId:L,parsedSegment:D,segment:D.segment,segmentSink:n},T.signal).then(V=>{V!==null&&o.addedSegment(V)}).catch(O)}}}function O(D){T.isUsed()&&D instanceof yt||(T.cancel(),o.error(D))}}var dJ=DP;u();l();function qP(t,e,r,n,i){var p,y,v,b;if(r.switchingMode==="lazy")return{type:"continue",value:void 0};let a=n.getLastKnownInventory(),o=[];for(let T of a)T.infos.period.id===t.id&&(T.infos.adaptation.id!==e.id||!ve(r.representationIds,T.infos.representation.id))&&Vo(o,{start:(p=T.bufferedStart)!=null?p:T.start,end:(y=T.bufferedEnd)!=null?y:T.end});let s=n.getPendingOperations();for(let T of s)if(T.type===0){let S=T.value.inventoryInfos;if(S.period.id===t.id&&(S.adaptation.id!==e.id||!ve(r.representationIds,S.representation.id))){let I=S.segment.time,E=I+S.segment.duration;Vo(o,{start:I,end:E})}}if(o.length===0)return{type:"continue",value:void 0};if(r.switchingMode==="reload"){let T=i.getReadyState();if(T===void 0||T>1)return{type:"needs-reload",value:void 0}}let d=r.switchingMode==="direct",c=[],m=Kd(a,t);if(m!==null&&(m.bufferedEnd===void 0||t.start-m.bufferedEnd<1)&&c.push({start:0,end:t.start+1}),!d){let{ADAP_REP_SWITCH_BUFFER_PADDINGS:T}=Q.getCurrent(),S=e.type,I=(v=T[S].before)!=null?v:0,E=(b=T[S].after)!=null?b:0,R=i.getCurrentTime();R===void 0&&(R=i.getReference().getValue().position.getPolled()),c.push({start:R-I,end:R+E})}if(t.end!==void 0){let T=zd(a,t);T!==null&&(T.bufferedStart===void 0||T.bufferedStart-t.end<1)&&c.push({start:t.end-1,end:Number.MAX_VALUE})}let f=VS(o,c);return f.length===0?{type:"continue",value:void 0}:d?{type:"flush-buffer",value:f}:{type:"clean-buffer",value:f}}function BP({playbackObserver:t,content:e,options:r,representationEstimator:n,segmentSink:i,segmentFetcherCreator:a,wantedBufferAhead:o,maxVideoBufferSize:s},d,c){let{manifest:m,period:f,adaptation:p}=e,y=new X;y.linkToSignal(c);let v=new Map,b=new oe(null,y.signal),T,S=e.representations.getValue().representationIds,I=e.adaptation.representations.filter(P=>ve(S,P.id)&&P.decipherable!==!1&&P.isSupported!==!1),E=new oe(I,y.signal),{estimates:R,callbacks:M}=n({manifest:m,period:f,adaptation:p},b,E,t,y.signal),C=a.createSegmentFetcher(p.type,{onRequestBegin:M.requestBegin,onRequestEnd:M.requestEnd,onProgress:M.requestProgress,onMetrics:M.metrics}),A=new oe(0);R.onUpdate(({bitrate:P,knownStableBitrate:L})=>{r.enableFastSwitching&&A.setValueIfChanged(L),!(P===void 0||P===T)&&(T=P,k.debug(`Stream: new ${p.type} bitrate estimate`,P),d.bitrateEstimateChange({type:p.type,bitrate:P}))},{emitCurrentValue:!0,clearSignal:y.signal});let x;e.representations.onUpdate(P=>{x!==void 0&&x.cancel();let L=e.representations.getValue().representationIds,V=e.adaptation.representations.filter(z=>ve(L,z.id));E.setValueIfChanged(V),x=new X,x.linkToSignal(y.signal),O(P,x.signal).catch(z=>{(x==null?void 0:x.isUsed())===!0&&X.isCancellationError(z)||(y.cancel(),d.error(z))})},{clearSignal:y.signal,emitCurrentValue:!0});return;async function O(P,L){let V=qP(f,p,P,i,t);switch(V.type){case"continue":break;case"needs-reload":return Oa(()=>{t.listen(()=>{if(L.isCancelled())return;let{DELTA_POSITION_AFTER_RELOAD:z}=Q.getCurrent(),N=z.bitrateSwitch;return d.waitingMediaSourceReload({bufferType:p.type,period:f,timeOffset:N,stayInPeriod:!0})},{includeLastObservation:!0,clearSignal:L})});case"flush-buffer":case"clean-buffer":for(let z of V.value)if(await i.removeBuffer(z.start,z.end),L.isCancelled())return;if(V.type==="flush-buffer"&&(d.needsBufferFlush(),L.isCancelled()))return;break;default:ur(V)}D(L)}function D(P){let L=new X;L.linkToSignal(P);let{representation:V}=R.getValue();if(V===null)return;let z=new oe(null,L.signal);R.onUpdate(U=>{if(!(U.representation===null||U.representation.id===V.id))return U.urgent?(k.info("Stream: urgent Representation switch",p.type),z.setValue({urgent:!0})):(k.info("Stream: slow Representation switch",p.type),z.setValue({urgent:!1}))},{clearSignal:L.signal,emitCurrentValue:!0});let N={type:p.type,adaptation:p,period:f,representation:V};if(b.setValue(V),y.isUsed()||(d.representationChange(N),y.isUsed()))return;let B={streamStatusUpdate:d.streamStatusUpdate,encryptionDataEncountered:d.encryptionDataEncountered,manifestMightBeOufOfSync:d.manifestMightBeOufOfSync,needsManifestRefresh:d.needsManifestRefresh,inbandEvent:d.inbandEvent,warning:d.warning,error(U){y.cancel(),d.error(U)},addedSegment(U){M.addedSegment(U)},terminating(){if(!L.isUsed())return L.cancel(),D(P)}};F(V,z,B,P)}function F(P,L,V,z){let N=new X;N.linkToSignal(z);let B=lu(o,Y=>Y*K(P),N.signal),U=p.type==="video"?s:new oe(1/0);k.info("Stream: changing representation",p.type,P.id,P.bitrate);let j=le({},V,{error(Y){var se;let W=er(Y,{defaultCode:"NONE",defaultReason:"Unknown `RepresentationStream` error"});if(W.code!=="BUFFER_FULL_ERROR")V.error(Y);else{let Z=o.getValue(),ue=((se=v.get(P.id))!=null?se:1)*.7;if(ue<=.05||Z*ue<=2)throw W;v.set(P.id,ue),Ho(4e3,y.signal).then(()=>F(P,L,V,z)).catch(ye)}},terminating(){N.cancel(),V.terminating()}});dJ({playbackObserver:t,content:{representation:P,adaptation:p,period:f,manifest:m},segmentSink:i,segmentFetcher:C,terminate:L,options:{bufferGoal:B,maxBufferSize:U,drmSystemId:r.drmSystemId,fastSwitchThreshold:A}},j,z),m.addEventListener("manifestUpdate",Y=>{for(let W of Y.updatedPeriods)if(W.period.id===f.id){for(let se of W.result.updatedAdaptations)if(se.adaptation===p.id){for(let Z of se.removedRepresentations)if(Z===P.id)return z.isCancelled()?void 0:d.waitingMediaSourceReload({bufferType:p.type,period:f,timeOffset:0,stayInPeriod:!0})}}else if(W.period.start>f.start)break},z)}function K(P){let L=v.get(P.id),V=L!==void 0?L:1;return L===void 0&&v.set(P.id,V),V}}var cJ=BP;u();l();u();l();function Zje(t,e){let[r,...n]=t.split(";"),[i,...a]=e.split(";");if(r!==i)return!1;let o=ce(n,m=>on(m,"codecs=")),s=ce(a,m=>on(m,"codecs="));if(o===void 0||s===void 0)return!1;let d=o.substring(7),c=s.substring(7);return d.split(".")[0]===c.split(".")[0]}var fJ=Zje;function UP(t,e,r,n,i,a){var y,v,b,T;if(t.codec!==void 0&&a.onCodecSwitch==="reload"&&!Jje(r,t.codec))return{type:"needs-reload",value:void 0};let o=t.getLastKnownInventory(),s=[];for(let S of o)S.infos.period.id===e.id&&S.infos.adaptation.id!==r.id&&Vo(s,{start:(y=S.bufferedStart)!=null?y:S.start,end:(v=S.bufferedEnd)!=null?v:S.end});let d=t.getPendingOperations();for(let S of d)if(S.type===0){let I=S.value.inventoryInfos;if(I.period.id===e.id&&I.adaptation.id!==r.id){let E=I.segment.time,R=E+I.segment.duration;Vo(s,{start:E,end:R})}}if(s.length===0)return{type:"continue",value:void 0};if(n==="reload"){let S=i.getReadyState();if(S===void 0||S>1)return{type:"needs-reload",value:void 0}}let c=n==="direct",m=[],f=Kd(o,e);if(f!==null&&(f.bufferedEnd===void 0||e.start-f.bufferedEnd<1)&&m.push({start:0,end:e.start+1}),!c){let S=r.type,{ADAP_REP_SWITCH_BUFFER_PADDINGS:I}=Q.getCurrent(),E=(b=I[S].before)!=null?b:0,R=(T=I[S].after)!=null?T:0,M=i.getCurrentTime();M===void 0&&(M=i.getReference().getValue().position.getPolled()),m.push({start:M-E,end:M+R})}if(e.end!==void 0){let S=zd(o,e);S!==null&&(S.bufferedStart===void 0||S.bufferedStart-e.end<1)&&m.push({start:e.end-1,end:Number.MAX_VALUE})}let p=VS(s,m);return p.length===0?{type:"continue",value:void 0}:c&&r.type!=="text"?{type:"flush-buffer",value:p}:{type:"clean-buffer",value:p}}function Jje(t,e){return t.representations.some(r=>r.isSupported===!0&&r.decipherable!==!1&&fJ(r.getMimeTypeString(),e))}function FP({bufferType:t,content:e,garbageCollectors:r,playbackObserver:n,representationEstimator:i,segmentFetcherCreator:a,segmentSinksStore:o,options:s,wantedBufferAhead:d,maxVideoBufferSize:c},m,f){let{manifest:p,period:y}=e,v=new oe(void 0,f);if(m.periodStreamReady({type:t,manifest:p,period:y,adaptationRef:v}),f.isCancelled())return;let b,T=!0;v.onUpdate(E=>{(async()=>{var P;if(E===void 0)return;let R=new X;if(R.linkToSignal(f),b==null||b.cancel(),b=R,E===null){k.info(`Stream: Set no ${t} Adaptation. P:`,y.start);let L=o.getStatus(t);if(L.type==="initialized"){if(k.info(`Stream: Clearing previous ${t} SegmentSink`),es.isNative(t))return I(0,!0,R.signal);{let V=(P=y.end)!=null?P:1/0;if(y.start>V)k.warn("Stream: Can't free buffer: period's start is after its end");else if(await L.value.removeBuffer(y.start,V),R.isUsed())return}}else if(L.type==="uninitialized"&&(o.disableSegmentSink(t),R.isUsed()))return;return m.adaptationChange({type:t,adaptation:null,period:y}),R.isUsed()?void 0:mJ(n,d,t,{period:y},m,R.signal)}let M=y.adaptations[t],C=ce(M!=null?M:[],L=>L.id===E.adaptationId);if(C===void 0){b.cancel(),k.warn("Stream: Unfound chosen Adaptation choice",E.adaptationId);return}let{DELTA_POSITION_AFTER_RELOAD:A}=Q.getCurrent(),x=!1,O;if(T)O=0;else if(E.relativeResumingPosition!==void 0)O=E.relativeResumingPosition;else switch(x=!0,t){case"audio":O=A.trackSwitch.audio;break;case"video":O=A.trackSwitch.video;break;default:O=A.trackSwitch.other;break}if(T=!1,es.isNative(t)&&o.getStatus(t).type==="disabled")return I(O,!0,R.signal);p.addEventListener("manifestUpdate",L=>{for(let V of L.updatedPeriods)if(V.period.id===y.id){for(let z of V.result.removedAdaptations)if(z.id===C.id)return I(O,!0,R.signal)}else if(V.period.start>y.start)break},b.signal);let{representations:D}=E;if(k.info(`Stream: Updating ${t} adaptation`,`A: ${C.id}`,`P: ${y.start}`),m.adaptationChange({type:t,adaptation:C,period:y}),R.isUsed())return;let F=eVe(o,t,C),K=UP(F,y,C,E.switchingMode,n,s);if(K.type==="needs-reload")return I(O,!0,R.signal);if(await o.waitForUsableBuffers(R.signal),!R.isUsed()){if(K.type==="flush-buffer"||K.type==="clean-buffer"){for(let{start:L,end:V}of K.value)if(await F.removeBuffer(L,V),R.isUsed())return;if(K.type==="flush-buffer"&&(m.needsBufferFlush({relativeResumingPosition:O,relativePosHasBeenDefaulted:x}),R.isUsed()))return}r.get(F)(R.signal),S(C,D,F,R.signal)}})().catch(R=>{R instanceof yt||(b==null||b.cancel(),m.error(R))})},{clearSignal:f,emitCurrentValue:!0});function S(E,R,M,C){let A=rVe(n,E.type);cJ({content:{manifest:p,period:y,adaptation:E,representations:R},options:s,playbackObserver:A,representationEstimator:i,segmentSink:M,segmentFetcherCreator:a,wantedBufferAhead:d,maxVideoBufferSize:c},nt(je({},m),{error:x}),C);function x(O){if(!es.isNative(t)){k.error(`Stream: ${t} Stream crashed. Aborting it.`,O instanceof Error?O:""),o.disposeSegmentSink(t);let D=er(O,{defaultCode:"NONE",defaultReason:"Unknown `AdaptationStream` error"});return m.warning(D),C.isCancelled()?void 0:mJ(n,d,t,{period:y},m,C)}k.error(`Stream: ${t} Stream crashed. Stopping playback.`,O instanceof Error?O:""),m.error(O)}}function I(E,R,M){Oa(()=>{n.listen(()=>{M.isCancelled()||m.waitingMediaSourceReload({bufferType:t,period:y,timeOffset:E,stayInPeriod:R})},{includeLastObservation:!0,clearSignal:M})})}}function eVe(t,e,r){let n=t.getStatus(e);if(n.type==="initialized")return k.info("Stream: Reusing a previous SegmentSink for the type",e),n.value;let i=tVe(r);return t.createSegmentSink(e,i)}function tVe(t){let e=t.representations.filter(r=>r.isSupported===!0&&r.decipherable!==!1);if(e.length===0)throw new he("NO_PLAYABLE_REPRESENTATION","No Representation in the chosen "+t.type+" Adaptation can be played",{tracks:[jo(t)]});return e[0].getMimeTypeString()}function rVe(t,e){return t.deriveReadOnlyObserver(function(n,i){let a=new oe(o(),i);return n.onUpdate(s,{clearSignal:i,emitCurrentValue:!1}),a;function o(){let d=n.getValue(),c=d.buffered[e],m=c!==null?jS(c,d.position.getWanted()):0;return le({},d,{bufferGap:m,buffered:c})}function s(){a.setValue(o())}})}function mJ(t,e,r,n,i,a){let{period:o}=n,s=!1;e.onUpdate(d,{emitCurrentValue:!1,clearSignal:a}),t.listen(d,{includeLastObservation:!1,clearSignal:a}),d();function d(){let c=t.getReference().getValue(),m=e.getValue(),f=c.position.getWanted();o.end!==void 0&&f+m>=o.end&&(k.debug('Stream: full "empty" AdaptationStream',r),s=!0),i.streamStatusUpdate({period:o,bufferType:r,imminentDiscontinuity:null,position:f,isEmptyStream:!0,hasFinishedLoading:s,neededSegments:[]})}}var pJ=FP;u();l();function _I(t,e){if(e.length===0)return[];let r=[],n=t.getLastKnownInventory();for(let i=0;ia.infos.period.id===s.period.id&&a.infos.adaptation.id===s.adaptation.id&&a.infos.representation.id===s.representation.id)){let{bufferedStart:s,bufferedEnd:d}=a;if(s===void 0||d===void 0)return k.warn("SO: No buffered start or end found from a segment."),[{start:0,end:Number.MAX_VALUE}];let c=r[r.length-1];c!==void 0&&c.end===s?c.end=d:r.push({start:s,end:d})}}return r}function KP(t,e,r,n,i,a,o,s){let{manifest:d,initialPeriod:c}=t,{maxBufferAhead:m,maxBufferBehind:f,wantedBufferAhead:p,maxVideoBufferSize:y}=a,{MINIMUM_MAX_BUFFER_AHEAD:v,MAXIMUM_MAX_BUFFER_AHEAD:b,MAXIMUM_MAX_BUFFER_BEHIND:T}=Q.getCurrent(),S=new $p(R=>{var x,O;let{bufferType:M}=R,C=(x=T[M])!=null?x:1/0,A=(O=b[M])!=null?O:1/0;return D=>{TI({segmentSink:R,playbackObserver:e,maxBufferBehind:lu(f,F=>Math.min(F,C),D),maxBufferAhead:lu(m,F=>{var P;let K=Math.max(F,(P=v[M])!=null?P:0);return Math.min(K,A)},D)},D)}});for(let R of n.getBufferTypes())I(R,c);function I(R,M){let C=new Iu((K,P)=>K.start-P.start),A=!1,x=new X;return x.linkToSignal(s),e.listen(({position:K})=>{var V;let P=K.getWanted();if(!A||!D(P))return;for(k.info("Stream: Destroying all PeriodStreams due to out of bounds situation",R,P),A=!1;C.length()>0;){let z=C.get(C.length()-1);C.removeElement(z),o.periodStreamCleared({type:R,manifest:d,period:z})}x.cancel(),x=new X,x.linkToSignal(s);let L=(V=d.getPeriodForTime(P))!=null?V:d.getNextPeriod(P);if(L===void 0){k.warn("Stream: The wanted position is not found in the Manifest."),A=!0;return}O(L)},{clearSignal:s,includeLastObservation:!0}),d.addEventListener("decipherabilityUpdate",K=>{s.isCancelled()||F(K).catch(P=>{s.isCancelled()||(x.cancel(),o.error(P))})},s),O(M);function O(K){let P=nt(je({},o),{waitingMediaSourceReload(L){let V=C.head();V===void 0||V.id!==L.period.id?o.lockedStream({bufferType:L.bufferType,period:L.period}):o.needsMediaSourceReload({timeOffset:L.timeOffset,minimumPosition:L.stayInPeriod?L.period.start:void 0,maximumPosition:L.stayInPeriod?L.period.end:void 0})},periodStreamReady(L){A=!0,C.add(L.period),o.periodStreamReady(L)},periodStreamCleared(L){C.removeElement(L.period),o.periodStreamCleared(L)},error(L){x.cancel(),o.error(L)}});E(R,K,P,x.signal)}function D(K){let P=C.head(),L=C.last();return P===void 0||L===void 0?!0:P.start>K||(w(L.end)?1/0:L.end)j.adaptation.type===R);if(L.length===0||P.type!=="initialized"||L.every(j=>j.representation.decipherable===!0))return;let V=P.value,z=L.filter(j=>j.representation.decipherable===void 0),N=L.filter(j=>j.representation.decipherable===!1),B=_I(V,N),U=_I(V,z);for(A=!1,k.info("Stream: Destroying all PeriodStreams for decipherability matters",R);C.length()>0;){let j=C.get(C.length()-1);C.removeElement(j),o.periodStreamCleared({type:R,manifest:d,period:j})}x.cancel(),x=new X,x.linkToSignal(s);for(let{start:j,end:Y}of[...B,...U]){if(s.isCancelled())return;if(j{if(s.isCancelled())return;let j=e.getReference().getValue();if(gJ(j,B)){if(o.needsDecipherabilityFlush(),s.isCancelled())return}else if(gJ(j,U)&&(o.needsBufferFlush(),s.isCancelled()))return;let Y=j.position.getWanted(),W=d.getPeriodForTime(Y);if(W===void 0){o.error(new he("MEDIA_TIME_NOT_FOUND","The wanted position is not found in the Manifest."));return}O(W)})}}function E(R,M,C,A){k.info("Stream: Creating new Stream for",R,M.start);let x=null,O=new X;O.linkToSignal(A),e.listen(({position:L},V)=>{if(M.end!==void 0&&L.getWanted()>=M.end){let z=d.getPeriodAfter(M);if(M.containsTime(L.getWanted(),z))return;k.info("Stream: Destroying PeriodStream as the current playhead moved above it",R,M.start,L.getWanted(),M.end),V(),C.periodStreamCleared({type:R,manifest:d,period:M}),O.cancel()}},{clearSignal:A,includeLastObservation:!0});let D={bufferType:R,content:{manifest:d,period:M},garbageCollectors:S,maxVideoBufferSize:y,segmentFetcherCreator:i,segmentSinksStore:n,options:a,playbackObserver:e,representationEstimator:r,wantedBufferAhead:p},F=nt(je({},C),{streamStatusUpdate(L){if(L.hasFinishedLoading){let V=d.getPeriodAfter(M);V!==null&&K(V)}else x!==null&&(k.info("Stream: Destroying next PeriodStream due to current one being active",R,x.period.start),C.periodStreamCleared({type:R,manifest:d,period:x.period}),x.canceller.cancel(),x=null);C.streamStatusUpdate(L)},error(L){x!==null&&(x.canceller.cancel(),x=null),O.cancel(),C.error(L)}});pJ(D,F,O.signal),P(O.signal);function K(L){if(x!==null){if(x.period.id===L.id)return;k.warn("Stream: Creating next `PeriodStream` while one was already created.",R,L.id,x.period.id),C.periodStreamCleared({type:R,manifest:d,period:x.period}),x.canceller.cancel()}let V=new X;V.linkToSignal(A),x={canceller:V,period:L},E(R,L,C,x.canceller.signal)}function P(L){d.addEventListener("manifestUpdate",V=>{for(let z of V.removedPeriods)if(z.id===M.id){if(d.periods.length>0&&d.periods[0].start<=z.start)return Oa(()=>{if(!L.isCancelled())return o.needsMediaSourceReload({timeOffset:0,minimumPosition:void 0,maximumPosition:void 0})})}else if(z.start>M.start)break;if(V.addedPeriods.length>0&&x!==null){let z=d.getPeriodAfter(M);(z===null||x.period.id!==z.id)&&(k.warn("Stream: Destroying next PeriodStream due to new one being added",R,x.period.start),C.periodStreamCleared({type:R,manifest:d,period:x.period}),x.canceller.cancel(),x=null)}},L)}}}function gJ(t,e){if(e.length===0)return!1;let r=t.position.getPolled();return t.speed>=0?e[e.length-1].end>=r-5:e[0].start<=r+5}var hJ=KP;var yJ=hJ;u();l();var nVe={createSync(t){return{syncValue:t,getValueAsAsync(){return Promise.resolve(t)}}},createAsync(t){let e=null;return t.then(r=>{e=r},ye),{syncValue:e,getValueAsAsync(){return t}}}},vJ=nVe;u();l();var ts=class extends Me{};u();l();u();l();function zP(t,e){let r={audio:null,video:null,text:null};if(e!==null&&(r.text=e.getBufferedRanges()),t===null)return r;let n=ce(t.sourceBuffers,s=>s.type==="audio"),i=ce(t.sourceBuffers,s=>s.type==="video"),a=n==null?void 0:n.getBuffered();a!==void 0&&(r.audio=a);let o=i==null?void 0:i.getBuffered();return o!==void 0&&(r.video=o),r}function Zp(t,{autoPlay:e,initialPlayPerformed:r,manifest:n,mediaSource:i,speed:a,textDisplayer:o},s){return t.deriveReadOnlyObserver(function(c,m){let f=new X;f.linkToSignal(m),f.linkToSignal(s);let p=new oe(y(),f.signal);return a.onUpdate(v,{clearSignal:f.signal,emitCurrentValue:!1}),c.onUpdate(v,{clearSignal:f.signal,emitCurrentValue:!1}),p;function y(){let b=c.getValue(),T=a.getValue();return iVe(b,n),{maximumPosition:Qi(n),bufferGap:b.bufferGap,position:b.position,buffered:zP(i,o),duration:b.duration,rebuffering:b.rebuffering,freezing:b.freezing,paused:{last:b.paused,pending:aVe(r,e)},readyState:b.readyState,speed:T}}function v(){p.setValue(y())}})}function iVe(t,e){if(!e.isDynamic||e.isLastPeriodKnown){let r=e.periods[e.periods.length-1];if(r!==void 0&&r.end!==void 0){let n=t.position.getWanted();if(n>=r.start&&n>=r.end-1){let i=t.buffered;(i.length===0||i.end(i.length-1)=0;n--)if(r[n].nodeName==="track")try{t.removeChild(r[n])}catch(i){k.warn("Compat: Could not remove text track child from element.")}}}t.src="",t.removeAttribute("src")}u();l();u();l();function jP(t,e){if(typeof t.changeType=="function"){try{t.changeType(e)}catch(r){return k.warn("Could not call 'changeType' on the given SourceBuffer:",r instanceof Error?r:""),!1}return!0}return!1}u();l();function oVe(t){let e=[];for(let r=0;r{i.cancel(),Jp(t,e)},i.signal);wX(r,()=>{i.cancel(),Jp(t,e)},i.signal)}function bJ(t,e){let r=new X;r.linkToSignal(e),wd(t,()=>{k.debug("Init: MediaSource re-opened while end-of-stream is active"),r.cancel(),r=new X,r.linkToSignal(e),Jp(t,r.signal)},e),Jp(t,r.signal)}u();l();u();l();function VP(){return uu}var sVe=365*24*3600,eg=class{constructor(e){this._mediaSource=e,this._currentMediaSourceDurationUpdateCanceller=null}updateDuration(e,r){this._currentMediaSourceDurationUpdateCanceller!==null&&this._currentMediaSourceDurationUpdateCanceller.cancel(),this._currentMediaSourceDurationUpdateCanceller=new X;let n=this._mediaSource,i=this._currentMediaSourceDurationUpdateCanceller.signal,a=dVe(n,i),o=new X;o.linkToSignal(i),a.onUpdate(s,{emitCurrentValue:!0,clearSignal:i});function s(){if(o.cancel(),!a.getValue())return;o=new X,o.linkToSignal(i);let d=lVe(n.sourceBuffers,o.signal),c=new X;return c.linkToSignal(o.signal),d.onUpdate(m=>{c.cancel(),c=new X,c.linkToSignal(o.signal),!m&&IJ(n,e,r,c.signal)},{clearSignal:o.signal,emitCurrentValue:!0})}}stopUpdating(){this._currentMediaSourceDurationUpdateCanceller!==null&&(this._currentMediaSourceDurationUpdateCanceller.cancel(),this._currentMediaSourceDurationUpdateCanceller=null)}};function uVe(t,e,r){let n=e;r||(n=VP()?1/0:SJ(e));let i=0;for(let a=0;a0&&(i=Math.max(o.buffered.end(s-1)))}if(n===t.duration)return"success";if(i>n){if(i=.1){let s=Math.abs(t.duration-a);return o{a.removeEventListener("updatestart",n),a.removeEventListener("update",n)})}return r;function n(){for(let i=0;i{k.debug("Init: Reacting to MediaSource open in duration updater"),r.setValueIfChanged(!0)},e),OS(t,()=>{k.debug("Init: Reacting to MediaSource ended in duration updater"),r.setValueIfChanged(!1)},e),PS(t,()=>{k.debug("Init: Reacting to MediaSource close in duration updater"),r.setValueIfChanged(!1)},e),r}function IJ(t,e,r,n){if(uVe(t,e,r)==="success")return;let a=setTimeout(()=>{o(),IJ(t,e,r,n)},2e3),o=n.register(()=>{clearTimeout(a)})}function SJ(t){return Math.max(Math.pow(2,32),t+sVe)}var ja=class extends Me{constructor(e){if(super(),this.id=e,this.sourceBuffers=[],this._canceller=new X,w(Ka))throw new he("MEDIA_SOURCE_NOT_SUPPORTED","No MediaSource Object was found in the current browser.");k.info("Init: Creating MediaSource");let r=new Ka;this.readyState=r.readyState;let n=r.handle;this.handle=w(n)?{type:"media-source",value:r}:{type:"handle",value:n},this._mediaSource=r,this._durationUpdater=new eg(r),this._endOfStreamCanceller=null,wd(r,()=>{this.readyState=r.readyState,this.trigger("mediaSourceOpen",null)},this._canceller.signal),OS(r,()=>{this.readyState=r.readyState,this.trigger("mediaSourceEnded",null)},this._canceller.signal),PS(r,()=>{this.readyState=r.readyState,this.trigger("mediaSourceClose",null)},this._canceller.signal)}addSourceBuffer(e,r){let n=this._mediaSource.addSourceBuffer(r),i=new HP(e,r,n);return this.sourceBuffers.push(i),i}setDuration(e,r){this._durationUpdater.updateDuration(e,r)}interruptDurationSetting(){this._durationUpdater.stopUpdating()}maintainEndOfStream(){this._endOfStreamCanceller===null&&(this._endOfStreamCanceller=new X,this._endOfStreamCanceller.linkToSignal(this._canceller.signal),k.debug("Init: end-of-stream order received."),bJ(this._mediaSource,this._endOfStreamCanceller.signal))}stopEndOfStream(){this._endOfStreamCanceller!==null&&(k.debug("Init: resume-stream order received."),this._endOfStreamCanceller.cancel(),this._endOfStreamCanceller=null)}dispose(){this.sourceBuffers.forEach(e=>e.dispose()),this._canceller.cancel(),cVe(this._mediaSource)}},HP=class{constructor(e,r,n){this.type=e,this.codec=r,this._canceller=new X,this._sourceBuffer=n,this._operationQueue=[],this._currentOperations=[];let i=o=>{let s;o instanceof Error?s=o:o.error instanceof Error?s=o.error:s=new Error("Unknown SourceBuffer Error");let d=this._currentOperations;if(this._currentOperations=[],d.length===0)k.error("SBI: error for an unknown operation",s);else{let c=new Ir(s.name,s.message,s.name==="QuotaExceededError");for(let m of d)m.reject(c)}},a=()=>{let o=this._currentOperations;this._currentOperations=[];try{for(let s of o)s.resolve(Ii(this._sourceBuffer.buffered))}catch(s){for(let d of o)s instanceof Error&&s.name==="InvalidStateError"?d.resolve([]):d.reject(s)}this._performNextOperation()};n.addEventListener("error",i),n.addEventListener("updateend",a),this._canceller.signal.register(()=>{n.removeEventListener("error",i),n.removeEventListener("updateend",a)})}appendBuffer(...e){return k.debug("SBI: receiving order to push data to the SourceBuffer",this.type),this._addToQueue({operationName:0,params:e})}remove(e,r){return k.debug("SBI: receiving order to remove data from the SourceBuffer",this.type,e,r),this._addToQueue({operationName:1,params:[e,r]})}getBuffered(){try{return Ii(this._sourceBuffer.buffered)}catch(e){return k.error("Failed to get buffered time range of SourceBuffer",this.type,e instanceof Error?e:null),[]}}abort(){try{this._sourceBuffer.abort()}catch(e){k.debug("Init: Failed to abort SourceBuffer:",e instanceof Error?e:null)}this._emptyCurrentQueue()}dispose(){try{this._sourceBuffer.abort()}catch(e){}this._emptyCurrentQueue()}_emptyCurrentQueue(){let e=new yt;this._currentOperations.length>0&&(this._currentOperations.forEach(r=>{r.reject(e)}),this._currentOperations=[]),this._operationQueue.length>0&&(this._operationQueue.forEach(r=>{r.reject(e)}),this._operationQueue=[])}_addToQueue(e){return new Promise((r,n)=>{let i=this._operationQueue.length===0&&this._currentOperations.length===0,a=le({resolve:r,reject:n},e);this._operationQueue.push(a),i&&this._performNextOperation()})}_performNextOperation(){var r,n,i,a,o;if(this._currentOperations.length!==0||this._sourceBuffer.updating)return;let e=this._operationQueue.shift();if(e!==void 0)if(e.operationName===0){this._currentOperations=[{operationName:0,resolve:e.resolve,reject:e.reject}];let s=e.params[0],d=e.params[1],c=s;if(this._operationQueue.length>0&&this._operationQueue[0].operationName===0){let m;s instanceof ArrayBuffer?m=new Uint8Array(s):s instanceof Uint8Array?m=s:m=new Uint8Array(s.buffer);let f=[m];for(;((r=this._operationQueue[0])==null?void 0:r.operationName)===0;){let p=this._operationQueue[0],y=(n=d.appendWindow)!=null?n:[void 0,void 0],v=(i=p.params[1].appendWindow)!=null?i:[void 0,void 0],b=(a=d.timestampOffset)!=null?a:0,T=(o=p.params[1].timestampOffset)!=null?o:0;if(y[0]===v[0]&&y[1]===v[1]&&d.codec===p.params[1].codec&&b===T){let S=p.params[0],I;S instanceof ArrayBuffer?I=new Uint8Array(S):S instanceof Uint8Array?I=S:I=new Uint8Array(S.buffer),f.push(I),this._operationQueue.splice(0,1),this._currentOperations.push({operationName:0,resolve:p.resolve,reject:p.reject})}else break}f.length>1&&(k.info(`MMSI: Merging ${f.length} segments together for perf`,this.type),c=_e(...f))}try{this._appendBufferNow(c,d)}catch(m){let f=m instanceof Error?new Ir(m.name,m.message,m.name==="QuotaExceededError"):new Ir("Error","Unknown SourceBuffer Error during appendBuffer",!1);this._currentOperations.forEach(p=>{p.reject(f)}),this._currentOperations=[]}}else{this._currentOperations=[e];let[s,d]=e.params;k.debug("SBI: removing data from SourceBuffer",this.type,s,d);try{this._sourceBuffer.remove(s,d)}catch(c){let m=c instanceof Error?new Ir(c.name,c.message,!1):new Ir("Error","Unknown SourceBuffer Error during remove",!1);e.reject(m),this._currentOperations=[]}}}_appendBufferNow(e,r){let n=this._sourceBuffer,{codec:i,timestampOffset:a,appendWindow:o=[]}=r;if(i!==void 0&&i!==this.codec&&(k.debug("SBI: updating codec",i),jP(n,i)?this.codec=i:k.debug("SBI: could not update codec",i,this.codec)),a!==void 0&&n.timestampOffset!==a){let s=a;k.debug("SBI: updating timestampOffset",i,n.timestampOffset,s),n.timestampOffset=s}if(o[0]===void 0)n.appendWindowStart>0&&(k.debug("SBI: re-setting `appendWindowStart` to `0`"),n.appendWindowStart=0);else if(o[0]!==n.appendWindowStart){if(o[0]>=n.appendWindowEnd){let s=o[0]+1;k.debug("SBI: pre-updating `appendWindowEnd`",s),n.appendWindowEnd=s}k.debug("SBI: setting `appendWindowStart`",o[0]),n.appendWindowStart=o[0]}o[1]===void 0?n.appendWindowEnd!==1/0&&(k.debug("SBI: re-setting `appendWindowEnd` to `Infinity`"),n.appendWindowEnd=1/0):o[1]!==n.appendWindowEnd&&(k.debug("SBI: setting `appendWindowEnd`",o[1]),n.appendWindowEnd=o[1]),k.debug("SBI: pushing segment",this.type),n.appendBuffer(e)}};function cVe(t){if(t.readyState!=="closed"){let{readyState:e,sourceBuffers:r}=t;for(let n=r.length-1;n>=0;n--){let i=r[n];try{if(e==="open"){k.info("Init: Aborting SourceBuffer before removing");try{i.abort()}catch(a){}}k.info("Init: Removing SourceBuffer from mediaSource"),t.removeSourceBuffer(i)}catch(a){}}r.length>0&&k.info("Init: Not all SourceBuffers could have been removed.")}}var fVe=Dt();function ea(t,e){if(e!==null&&t.src===e&&(k.info("Init: Clearing HTMLMediaElement's src"),Vd(t)),e!==null)try{k.debug("Init: Revoking previous URL"),URL.revokeObjectURL(e)}catch(r){k.warn("Init: Error while revoking the media source URL",r instanceof Error?r:"")}}function mVe(t,e){let r=G(t.src)?t.src:null;ea(t,r);let n=new ja(fVe());return e.register(()=>{n.dispose()}),n}function RI(t,e){return nn(e,r=>{let n=mVe(t,e);if(n.addEventListener("mediaSourceOpen",()=>{k.info("Init: MediaSource opened"),r(n)},e),k.info("MTCI: Attaching MediaSource URL to the media element"),n.handle.type==="handle")t.srcObject=n.handle.value,e.register(()=>{ea(t,null)});else{let i=URL.createObjectURL(n.handle.value);t.src=i,e.register(()=>{ea(t,i)})}})}u();l();function tg(t,e,r){var i;if(!w(r)){let a=mu(t),o=Qi(t);if(w(r.position))if(w(r.wallClockTime))if(w(r.fromFirstPosition))if(w(r.fromLastPosition))if(w(r.fromLivePosition)){if(!w(r.percentage)){k.debug("Init: using startAt.percentage");let{percentage:s}=r;if(s>100)return o;if(s<0)return a;let d=+s/100,c=o-a;return a+c*d}}else{k.debug("Init: using startAt.fromLivePosition");let s=(i=pu(t))!=null?i:o,{fromLivePosition:d}=r;return d>=0?s:Math.max(a,s+d)}else{k.debug("Init: using startAt.fromLastPosition");let{fromLastPosition:s}=r;return s>=0?o:Math.max(a,o+s)}else{k.debug("Init: using startAt.fromFirstPosition");let{fromFirstPosition:s}=r;return s<=0?a:Math.min(o,a+s)}else{k.debug("Init: using startAt.wallClockTime");let s=t.availabilityStartTime===void 0?0:t.availabilityStartTime,d=r.wallClockTime-s;return Math.max(Math.min(d,o),a)}else return k.debug("Init: using startAt.minimumPosition"),Math.max(Math.min(r.position,o),a)}let n=mu(t);if(t.isLive){let{suggestedPresentationDelay:a,clockOffset:o}=t,s=Qi(t),d,{DEFAULT_LIVE_GAP:c}=Q.getCurrent();if(o===void 0)k.info("Init: no clock offset found for a live content, starting close to maximum available position"),d=s;else{k.info("Init: clock offset found for a live content, checking if we can start close to it");let f=t.availabilityStartTime===void 0?0:t.availabilityStartTime,p=(re()+o)/1e3-f;d=Math.min(s,p)}let m=a!=null?a:e?c.LOW_LATENCY:c.DEFAULT;return k.debug(`Init: ${d} defined as the live time, applying a live gap of ${m}`),Math.max(d-m,n)}return k.info("Init: starting at the minimum available position:",n),n}u();l();u();l();function rg(){return eA}u();l();function GP(t){return!(t&&su)}u();l();function WP(){return uu}function Tu(t,e,r,n){let i=new X;i.linkToSignal(n);let a=new oe(!1,i.signal);return t.listen(o=>{if(o.rebuffering!==null||o.freezing!==null||o.readyState===0)return;if(!GP(r)){if(isNaN(e.duration))return;if(e.duration>0){a.setValue(!0),i.cancel();return}}let s=WP()?4:3;if(o.readyState>=s&&(o.currentRange!==null||o.ended)&&(!rg()||e.duration>0)){a.setValue(!0),i.cancel();return}},{includeLastObservation:!0,clearSignal:i.signal}),a}u();l();u();l();var pVe=!su,TJ=pVe;function ku({mediaElement:t,playbackObserver:e,startTime:r,mustAutoPlay:n,isDirectfile:i,onWarning:a},o){let s=new oe(!1,o);return{autoPlayResult:new Promise((c,m)=>{let f=o.register(S=>{m(S)});if(o.isCancelled())return;let p=!1,y=S=>{e.setCurrentTime(S),p=!0};if(!i||typeof r=="number"){let S=typeof r=="number"?r:r();S!==0&&y(S),v()}else e.listen((S,I)=>{if(S.readyState>=1){I();let E=typeof r=="number"?r:r();E!==0&&(TJ?y(E):setTimeout(()=>{y(E)},0)),v()}},{includeLastObservation:!0,clearSignal:o});function v(){let S=!1;e.listen((I,E)=>{if(!S&&(I.seeking!==0||I.event==="seeking"||I.event==="internal-seeking")&&(S=!0),!(p&&!S||I.readyState===0)){if(E(),rg()&&t.duration===0){let R=new he("MEDIA_ERR_NOT_LOADED_METADATA","Cannot load automatically: your browser falsely announced having loaded the content.");a(R)}o.isCancelled()||b()}},{includeLastObservation:!0,clearSignal:o})}function b(){e.listen((S,I)=>{S.seeking===0&&S.rebuffering===null&&S.readyState>=1&&(I(),T())},{includeLastObservation:!0,clearSignal:o})}function T(){var I;if(k.info("Init: Can begin to play content"),n){if(t.ended)return k.warn("Init: autoplay is enabled but the video is ended. Skipping autoplay to prevent video to start again"),s.setValue(!0),s.finish(),f(),c({type:"skipped"})}else return t.autoplay&&k.warn("Init: autoplay is enabled on HTML media element. Media will play as soon as possible."),s.setValue(!0),s.finish(),f(),c({type:"skipped"});let S;try{S=(I=t.play())!=null?I:Promise.resolve()}catch(E){return f(),m(E)}S.then(()=>{if(!o.isCancelled())return s.setValue(!0),s.finish(),f(),c({type:"autoplay"})}).catch(E=>{if(f(),!o.isCancelled())if(E instanceof Error&&E.name==="NotAllowedError"){k.warn("Init: Media element can't play. It may be due to browser auto-play policies.");let R=new he("MEDIA_ERR_BLOCKED_AUTOPLAY","Cannot trigger auto-play automatically: your browser does not allow it.");return a(R),o.isCancelled()?void 0:c({type:"autoplay-blocked"})}else m(E)})}}),initialPlayPerformed:s}}u();l();function ng(t,e,r,n,i){if(e.length===0)return c("No `keySystems` option given.");if(Ee.decrypt===null)return c("EME feature not activated.");let a=new X;a.linkToSignal(i);let o=new oe({initializationState:{type:"uninitialized",value:null},drmSystemId:void 0},i),s=Ee.decrypt;if(!s.hasEmeApis())return c("EME API not available on the current page.");k.debug("Init: Creating ContentDecryptor");let d=new s(t,e);return d.addEventListener("stateChange",m=>{if(m===1){let f=new oe(!1);f.onUpdate((p,y)=>{p&&(y(),m===1&&d.attach())},{clearSignal:a.signal}),o.setValue({initializationState:{type:"awaiting-media-link",value:{isMediaLinked:f}},drmSystemId:d.systemId})}else m===2&&(o.setValue({initializationState:{type:"initialized",value:null},drmSystemId:d.systemId}),d.removeEventListener("stateChange"))}),d.addEventListener("error",m=>{a.cancel(),n.onError(m)}),d.addEventListener("warning",m=>{n.onWarning(m)}),d.addEventListener("blackListProtectionData",m=>{n.onBlackListProtectionData(m)}),d.addEventListener("keyIdsCompatibilityUpdate",m=>{n.onKeyIdsCompatibilityUpdate(m)}),r.onUpdate(m=>{m!==null&&d.onInitializationData(m)},{clearSignal:a.signal}),a.signal.register(()=>{d.dispose()}),o;function c(m){r.onUpdate((p,y)=>{if(p===null)return;y();let v=new ze("MEDIA_IS_ENCRYPTED_ERROR",m);n.onError(v)},{clearSignal:i});let f=new oe({initializationState:{type:"initialized",value:null},drmSystemId:void 0});return f.finish(),f}}u();l();var ig=class{constructor(e){this._displayer=e}pushTextData(e){try{return Promise.resolve(this._displayer.pushTextData(e))}catch(r){return Promise.reject(r)}}remove(e,r){try{return Promise.resolve(this._displayer.removeBuffer(e,r))}catch(n){return Promise.reject(n)}}reset(){this._displayer.reset()}stop(){this._displayer.stop()}};u();l();var ag=1/60,Va=class extends Me{constructor(e,r,n){super(),this._playbackObserver=e,this._manifest=r,this._speed=n,this._discontinuitiesStore=[],this._isStarted=!1,this._canceller=new X}start(){if(this._isStarted)return;this._isStarted=!0;let e=new QP(this._playbackObserver,this._speed);this._canceller.signal.register(()=>{e.dispose()});let r=null;this._playbackObserver.listen(n=>{let i=this._discontinuitiesStore,{buffered:a,position:o,readyState:s,rebuffering:d,freezing:c}=n,{BUFFER_DISCONTINUITY_THRESHOLD:m,FREEZING_STALLED_DELAY:f,UNFREEZING_SEEK_DELAY:p,UNFREEZING_DELTA_POSITION:y}=Q.getCurrent();if(c!==null){let I=re(),E=r===null?c.timestamp:r.attemptTimestamp;if(!o.isAwaitingFuturePosition()&&I-E>p&&(k.warn("Init: trying to seek to un-freeze player"),this._playbackObserver.setCurrentTime(this._playbackObserver.getCurrentTime()+y),r={attemptTimestamp:I}),I-c.timestamp>f){d===null?e.stopRebuffering():e.startRebuffering(),this.trigger("stalled","freezing");return}}else r=null;if(d===null){if(e.stopRebuffering(),s===1){let I;n.seeking!==0?I=n.seeking===1?"internal-seek":"seeking":I="not-ready",this.trigger("stalled",I);return}this.trigger("unstalled",null);return}let v=d.reason==="seeking"&&n.seeking===1?"internal-seek":d.reason;if(o.isAwaitingFuturePosition()){e.stopRebuffering(),k.debug("Init: let rebuffering happen as we're awaiting a future position"),this.trigger("stalled",v);return}if(e.startRebuffering(),this._manifest===null){this.trigger("stalled",v);return}let{position:b}=d;if(b!=null&&this._speed.getValue()>0){let I=gVe(i,this._manifest,b);if(I!==null){let E=I+.001;if(E<=this._playbackObserver.getCurrentTime())k.info("Init: position to seek already reached, no seeking",this._playbackObserver.getCurrentTime(),E);else{k.warn("SA: skippable discontinuity found in the stream",o.getPolled(),E),this._playbackObserver.setCurrentTime(E),this.trigger("warning",YP(b,E));return}}}let T=b!=null?b:o.getPolled(),S=eZ(a,T);if(this._speed.getValue()>0&&S=0;I--){let E=this._manifest.periods[I];if(E.end!==void 0&&E.end<=T){if(this._manifest.periods[I+1].start>T&&this._manifest.periods[I+1].start>this._playbackObserver.getCurrentTime()){let R=this._manifest.periods[I+1];this._playbackObserver.setCurrentTime(R.start),this.trigger("warning",YP(T,R.start));return}break}}this.trigger("stalled",v)},{includeLastObservation:!0,clearSignal:this._canceller.signal})}updateDiscontinuityInfo(e){this._isStarted||this.start();let r=this._playbackObserver.getReference().getValue();hVe(this._discontinuitiesStore,e,r)}onLockedStream(e,r){var s;this._isStarted||this.start();let n=this._playbackObserver.getReference().getValue();if(!n.rebuffering||n.paused||this._speed.getValue()<=0||e!=="audio"&&e!=="video")return;let i=n.position.getWanted(),a=(s=n.rebuffering.position)!=null?s:i,o=r.start;ir)return n;let o;if(a.end===void 0||a.end>r){let{discontinuity:s,position:d}=i,{start:c,end:m}=s,f=c!=null?c:d;if(r>=f-ag)if(m===null){let p=US(e,a);p!==null?o=p.start+ag:k.warn("Init: discontinuity at Period's end but no next Period")}else ro?n:o)}}return n}function $P(t){return t.discontinuity!==null}function hVe(t,e,r){let n=Math.min(r.position.getPolled(),r.position.getWanted());for(;t.length>0&&t[0].period.end!==void 0&&t[0].period.end+10i.start){$P(e)&&t.splice(o,0,e);return}$P(e)&&t.push(e)}}function YP(t,e){return new he("DISCONTINUITY_ENCOUNTERED","A discontinuity has been encountered at position "+String(t)+", seeked at position "+String(e))}var QP=class{constructor(e,r){this._speedUpdateCanceller=new X,this._isRebuffering=!1,this._playbackObserver=e,this._isDisposed=!1,this._speed=r,this._updateSpeed()}startRebuffering(){this._isRebuffering||this._isDisposed||(this._isRebuffering=!0,this._speedUpdateCanceller.cancel(),k.info("Init: Pause playback to build buffer"),this._playbackObserver.setPlaybackRate(0))}stopRebuffering(){!this._isRebuffering||this._isDisposed||(this._isRebuffering=!1,this._speedUpdateCanceller=new X,this._updateSpeed())}dispose(){this._speedUpdateCanceller.cancel(),this._isDisposed=!0}_updateSpeed(){this._speed.onUpdate(e=>{k.info("Init: Resume playback speed",e),this._playbackObserver.setPlaybackRate(e)},{clearSignal:this._speedUpdateCanceller.signal,emitCurrentValue:!0})}};u();l();u();l();u();l();u();l();function yVe(t,e){return t.id===e.id&&t.start===e.start&&t.end===e.end}var kJ=yVe;function vVe(t,e){let r=[],{periods:n}=e;for(let i of n){let{streamEvents:a}=i;a.forEach(({start:o,end:s,id:d,data:c})=>{for(let p of t)if(kJ(p,{id:d,start:o,end:s})){r.push(p);return}let m;if(c.value.element!==void 0)m=c.value.element;else if(c.value.xmlData!==void 0){let p=c.value.xmlData.namespaces.reduce((v,b)=>v+"xmlns:"+b.key+'="'+b.value+'" ',"","application/xml").documentElement;m=y.children.length>0?y.children[0]:y.childNodes[0]}else return;let f={type:c.type,value:nt(je({},c.value),{element:m})};if(s===void 0){let p={start:o,id:d,data:f,publicEvent:{start:o,data:f}};r.push(p)}else{let p={start:o,end:s,id:d,data:f,publicEvent:{start:o,end:s,data:f}};r.push(p)}})}return r}var XP=vVe;var Eu=class extends Me{constructor(e,r,n){super(),this._manifest=e,this._mediaElement=r,this._playbackObserver=n,this._canceller=null,this._scheduledEventsRef=new oe([]),this._eventsBeingPlayed=new WeakMap}start(){if(this._canceller!==null)return;this._canceller=new X;let e=this._canceller.signal,r=this._playbackObserver,n=this._mediaElement,i=!1,a=new X;a.linkToSignal(e),this._scheduledEventsRef.setValue(XP([],this._manifest)),this._scheduledEventsRef.onUpdate(({length:o})=>{if(o===0){i&&(a.cancel(),a=new X,a.linkToSignal(e),i=!1);return}else if(i)return;i=!0;let s=f(),d=()=>{let p=f();this._emitStreamEvents(this._scheduledEventsRef.getValue(),s,p,a.signal),s=p},{STREAM_EVENT_EMITTER_POLL_INTERVAL:c}=Q.getCurrent(),m=setInterval(d,c);r.listen(d,{includeLastObservation:!1,clearSignal:a.signal}),a.signal.register(()=>{clearInterval(m)});function f(){let p=r.getReference().getValue(),y=n.currentTime,v=p.seeking!==0;return{currentTime:y,isSeeking:v}}},{emitCurrentValue:!0,clearSignal:e})}onManifestUpdate(e){let r=this._scheduledEventsRef.getValue();this._scheduledEventsRef.setValue(XP(r,e))}stop(){this._canceller!==null&&(this._canceller.cancel(),this._canceller=null)}_emitStreamEvents(e,r,n,i){let{currentTime:a}=r,{isSeeking:o,currentTime:s}=n,d=[],c=[];for(let m=0;ms||y!==void 0&&s>=y)&&(ZP(f)&&c.push(f.publicEvent),this._eventsBeingPlayed.delete(f)):p<=s&&y!==void 0&&s=(y!=null?y:p)&&(o?d.push({type:"stream-event-skip",value:f.publicEvent}):(d.push({type:"stream-event",value:f.publicEvent}),ZP(f)&&c.push(f.publicEvent)))}if(d.length>0){for(let m of d)if(m.type==="stream-event"?this.trigger("event",m.value):this.trigger("eventSkip",m.value),i.isCancelled())return}if(c.length>0){for(let m of c)if(typeof m.onExit=="function"&&m.onExit(),i.isCancelled())return}}};function ZP(t){return t.end!==void 0}var EJ=Eu;u();l();function _u(t,e,r){if(r.isCancelled())return;t.addEventListener("error",n),r.register(()=>{t.removeEventListener("error",n)});function n(){let i=t.error,a,o;switch(w(i)||(a=i.code,o=i.message),a){case 1:return o=o!=null?o:"The fetching of the associated resource was aborted by the user's request.",e(new he("MEDIA_ERR_ABORTED",o));case 2:return o=o!=null?o:"A network error occurred which prevented the media from being successfully fetched",e(new he("MEDIA_ERR_NETWORK",o));case 3:return o=o!=null?o:"An error occurred while trying to decode the media resource",e(new he("MEDIA_ERR_DECODE",o));case 4:return o=o!=null?o:"The media resource has been found to be unsuitable.",e(new he("MEDIA_ERR_SRC_NOT_SUPPORTED",o));default:return o=o!=null?o:"The HTMLMediaElement errored due to an unknown reason.",e(new he("MEDIA_ERR_UNKNOWN",o))}}}var Ha=class extends ts{constructor(e){super(),this._settings=e,this._initCanceller=new X,this._manifest=null;let r=e.url===void 0?void 0:[e.url];this._manifestFetcher=new EP(r,e.transport,e.manifestRequestSettings)}prepare(){this._manifest===null&&(this._manifest=vJ.createAsync(nn(this._initCanceller.signal,(e,r)=>{this._manifestFetcher.addEventListener("warning",n=>this.trigger("warning",n)),this._manifestFetcher.addEventListener("error",n=>{this.trigger("error",n),r(n)}),this._manifestFetcher.addEventListener("manifestReady",n=>{e(n)})})),this._manifestFetcher.start(),this._initCanceller.signal.register(()=>{this._manifestFetcher.dispose()}))}start(e,r){this.prepare(),_u(e,i=>this._onFatalError(i),this._initCanceller.signal);let n=new oe(null,this._initCanceller.signal);this._initializeMediaSourceAndDecryption(e,n).then(i=>this._onInitialMediaSourceReady(e,i.mediaSource,r,i.drmSystemId,n,i.unlinkMediaSource)).catch(i=>{this._onFatalError(i)})}updateContentUrls(e,r){this._manifestFetcher.updateContentUrls(e,r)}dispose(){this._initCanceller.cancel()}_onFatalError(e){this._initCanceller.isUsed()||(this._initCanceller.cancel(),this.trigger("error",e))}_initializeMediaSourceAndDecryption(e,r){let n=this._initCanceller;return nn(n.signal,i=>{let{keySystems:a}=this._settings,o=ng(e,a,r,{onWarning:s=>this.trigger("warning",s),onError:s=>this._onFatalError(s),onBlackListProtectionData:s=>{(async()=>{var c;if(this._manifest===null)return;let d=(c=this._manifest.syncValue)!=null?c:await this._manifest.getValueAsAsync();SVe(d,s)})().catch(ye)},onKeyIdsCompatibilityUpdate:s=>{(async()=>{var c;if(this._manifest===null)return;let d=(c=this._manifest.syncValue)!=null?c:await this._manifest.getValueAsAsync();bVe(d,s.whitelistedKeyIds,s.blacklistedKeyIds,s.delistedKeyIds)})().catch(ye)}},n.signal);o.onUpdate((s,d)=>{if(s.initializationState.type==="uninitialized")return;d();let c=new X;c.linkToSignal(n.signal),RI(e,c.signal).then(m=>{let f=o.getValue();if(f.initializationState.type==="awaiting-media-link")f.initializationState.value.isMediaLinked.setValue(!0),o.onUpdate((p,y)=>{if(p.initializationState.type==="initialized"){y(),i({mediaSource:m,drmSystemId:p.drmSystemId,unlinkMediaSource:c});return}},{emitCurrentValue:!0,clearSignal:n.signal});else if(s.initializationState.type==="initialized"){i({mediaSource:m,drmSystemId:s.drmSystemId,unlinkMediaSource:c});return}}).catch(m=>{c.isUsed()||this._onFatalError(m)})},{emitCurrentValue:!0,clearSignal:n.signal})})}async _onInitialMediaSourceReady(e,r,n,i,a,o){var D;let{adaptiveOptions:s,autoPlay:d,bufferOptions:c,lowLatencyMode:m,segmentRequestOptions:f,speed:p,startAt:y,textTrackOptions:v,transport:b}=this._settings,T=this._initCanceller;be(this._manifest!==null);let S;try{S=(D=this._manifest.syncValue)!=null?D:await this._manifest.getValueAsAsync()}catch(F){return}S.addEventListener("manifestUpdate",F=>{this.trigger("manifestUpdate",F)},T.signal),S.addEventListener("decipherabilityUpdate",F=>{this.trigger("decipherabilityUpdate",F)},T.signal),k.debug("Init: Calculating initial time");let I=tg(S,m,y);k.debug("Init: Initial time calculated:",I);let E=JZ(s),R=le({textTrackOptions:v,drmSystemId:i},c),M=new MP(b,f,T.signal);if(this.trigger("manifestReady",S),T.isUsed())return;let C=this._startBufferingOnMediaSource.bind(this),A=this.trigger.bind(this),x=this._onFatalError.bind(this);O(r,I,d,o);function O(F,K,P,L){C({mediaElement:e,playbackObserver:n,mediaSource:F,initialTime:K,autoPlay:P,manifest:S,representationEstimator:E,segmentFetcherCreator:M,speed:p,protectionRef:a,bufferOptions:R},z,L.signal);function z(N){if(L.cancel(),T.isUsed()||(A("reloadingMediaSource",N),T.isUsed()))return;let B=new X;B.linkToSignal(T.signal),RI(e,B.signal).then(U=>{O(U,N.position,N.autoPlay,B)}).catch(U=>{B.isUsed()||x(U)})}}}_startBufferingOnMediaSource(e,r,n){var K;let{autoPlay:i,bufferOptions:a,initialTime:o,manifest:s,mediaElement:d,mediaSource:c,playbackObserver:m,protectionRef:f,representationEstimator:p,segmentFetcherCreator:y,speed:v}=e,b=(K=s.getPeriodForTime(o))!=null?K:s.getNextPeriod(o);if(b===void 0){let P=new he("MEDIA_STARTING_TIME_NOT_FOUND","Wanted starting time not found in the Manifest.");return this._onFatalError(P)}let T=null,S=null;if(this._settings.textTrackOptions.textTrackMode==="html"&&Ee.htmlTextDisplayer!==null?S=new Ee.htmlTextDisplayer(d,this._settings.textTrackOptions.textTrackElement):Ee.nativeTextDisplayer!==null&&(S=new Ee.nativeTextDisplayer(d)),S!==null){let P=new ig(S);T=P,n.register(()=>{P.stop(),S==null||S.stop()})}let I=new es(c,d.nodeName==="VIDEO",T);n.register(()=>{I.disposeAll()});let{autoPlayResult:E,initialPlayPerformed:R}=ku({mediaElement:d,playbackObserver:m,startTime:o,mustAutoPlay:i,onWarning:P=>{this.trigger("warning",P)},isDirectfile:!1},n);if(n.isCancelled())return;R.onUpdate((P,L)=>{if(P){L();let V=new EJ(s,d,m);s.addEventListener("manifestUpdate",()=>{V.onManifestUpdate(s)},n),V.addEventListener("event",z=>{this.trigger("streamEvent",z)},n),V.addEventListener("eventSkip",z=>{this.trigger("streamEventSkip",z)},n),V.start(),n.register(()=>{V.stop()})}},{clearSignal:n,emitCurrentValue:!0});let M=Zp(m,{autoPlay:i,manifest:s,mediaSource:c,textDisplayer:S,initialPlayPerformed:R,speed:v},n),C=this._createRebufferingController(m,s,v,n),A=new zp(I);Rp&&s.addEventListener("decipherabilityUpdate",P=>{P.some(L=>L.representation.decipherable!==!0)&&F(0,void 0,void 0)},n),m.listen(P=>{if(A.needToReload(P)){let L,V=m.getReference().getValue();V.position.isAwaitingFuturePosition()?L=V.position.getWanted():L=m.getCurrentTime();let z=R.getValue()?!m.getIsPaused():i;r({position:L,autoPlay:z})}},{clearSignal:n}),M.listen(P=>{["video","audio","text"].forEach(L=>{var z;let V=I.getStatus(L);V.type==="initialized"&&V.value.synchronizeInventory((z=P.buffered[L])!=null?z:[])})},{clearSignal:n});let x=wP(s,c,M,I,{onWarning:P=>this.trigger("warning",P),onPeriodChanged:P=>this.trigger("activePeriodChanged",{period:P})},n);E.then(()=>{Tu(m,d,!1,n).onUpdate((P,L)=>{P&&(L(),this.trigger("loaded",{getSegmentSinkMetrics:async()=>new Promise(V=>V(I.getSegmentSinksMetrics()))}))},{emitCurrentValue:!0,clearSignal:n})}).catch(P=>{n.isCancelled()||this._onFatalError(P)});let O=this;yJ({manifest:s,initialPeriod:b},M,p,I,y,a,D(),n);function D(){return{needsBufferFlush:P=>{var B;let L,V=m.getCurrentTime(),z=(B=P==null?void 0:P.relativeResumingPosition)!=null?B:0,N=!!(P!=null&&P.relativePosHasBeenDefaulted);z===0&&N?L=V+.001:L=V+z,m.setCurrentTime(L),m.listen((U,j)=>{(U.currentRange!==null||U.position.getPolled()>L+.1)&&(j(),m.setCurrentTime(U.position.getWanted()+.001))},{includeLastObservation:!1,clearSignal:n})},streamStatusUpdate(P){let{period:L,bufferType:V,imminentDiscontinuity:z,position:N}=P;C.updateDiscontinuityInfo({period:L,bufferType:V,discontinuity:z,position:N}),!n.isCancelled()&&s.isLastPeriodKnown&&P.period.id===s.periods[s.periods.length-1].id&&(P.hasFinishedLoading||P.isEmptyStream?x.onLastSegmentFinishedLoading(P.bufferType):x.onLastSegmentLoadingResume(P.bufferType))},needsManifestRefresh:()=>O._manifestFetcher.scheduleManualRefresh({enablePartialRefresh:!0,canUseUnsafeMode:!0}),manifestMightBeOufOfSync:()=>{let{OUT_OF_SYNC_MANIFEST_REFRESH_DELAY:P}=Q.getCurrent();O._manifestFetcher.scheduleManualRefresh({enablePartialRefresh:!1,canUseUnsafeMode:!1,delay:P})},lockedStream:P=>C.onLockedStream(P.bufferType,P.period),adaptationChange:P=>{O.trigger("adaptationChange",P),!n.isCancelled()&&x.onAdaptationChange(P.type,P.period,P.adaptation)},representationChange:P=>{O.trigger("representationChange",P),!n.isCancelled()&&x.onRepresentationChange(P.type,P.period)},inbandEvent:P=>O.trigger("inbandEvents",P),warning:P=>O.trigger("warning",P),periodStreamReady:P=>O.trigger("periodStreamReady",P),periodStreamCleared:P=>{x.onPeriodCleared(P.type,P.period),!n.isCancelled()&&O.trigger("periodStreamCleared",P)},bitrateEstimateChange:P=>O.trigger("bitrateEstimateChange",P),needsMediaSourceReload:P=>{F(P.timeOffset,P.minimumPosition,P.maximumPosition)},needsDecipherabilityFlush(){var L,V,z,N;let P=Yo(d);if(Mp(P==null?void 0:P[0])){let B=M.getReference().getValue(),U=B.position.isAwaitingFuturePosition()?B.position.getWanted():(L=M.getCurrentTime())!=null?L:B.position.getPolled(),j=(z=(V=B.paused.pending)!=null?V:M.getIsPaused())!=null?z:B.paused.last;r({position:U,autoPlay:!j})}else{let B=M.getReference().getValue(),U=B.position.isAwaitingFuturePosition()?B.position.getWanted():(N=M.getCurrentTime())!=null?N:B.position.getPolled();U+.001{for(let L of P)if(f.setValue(L),n.isCancelled())return},error:P=>O._onFatalError(P)}}function F(P,L,V){var j,Y,W;let z=M.getReference().getValue(),N=z.position.isAwaitingFuturePosition()?z.position.getWanted():(j=M.getCurrentTime())!=null?j:z.position.getPolled(),B=(W=(Y=z.paused.pending)!=null?Y:M.getIsPaused())!=null?W:z.paused.last,U=N+P;L!==void 0&&(U=Math.max(L,U)),V!==void 0&&(U=Math.min(V,U)),r({position:U,autoPlay:!B})}}_createRebufferingController(e,r,n,i){let a=new Va(e,r,n);return a.addEventListener("stalled",o=>this.trigger("stalled",o)),a.addEventListener("unstalled",()=>this.trigger("unstalled",null)),a.addEventListener("warning",o=>this.trigger("warning",o)),i.register(()=>a.destroy()),a.start(),a}};function bVe(t,e,r,n){t.updateRepresentationsDeciperability(i=>{let{representation:a}=i;if(a.contentProtections===void 0)return a.decipherable;let o=a.contentProtections.keyIds;if(o!==void 0)for(let s of o){for(let d of r)if(Ue(d,s.keyId))return!1;for(let d of e)if(Ue(d,s.keyId))return!0;for(let d of n)if(Ue(d,s.keyId))return}return a.decipherable})}function SVe(t,e){t.updateRepresentationsDeciperability(r=>{var a,o;let n=r.representation;if(n.decipherable===!1)return!1;let i=(o=(a=n.contentProtections)==null?void 0:a.initData)!=null?o:[];for(let s of i)if((e.type===void 0||s.type===e.type)&&e.values.getFormattedValues().every(c=>s.values.some(m=>(c.systemId===void 0||m.systemId===c.systemId)&&Ue(m.data,c.data))))return!1;return n.decipherable})}u();l();u();l();u();l();u();l();u();l();u();l();function JP(t,e,r){let{repeatCount:n}=t;if(n>=0)return n;let i;return w(e)?r!==void 0?i=r:i=Number.MAX_VALUE:i=e.start,Math.ceil((i-t.start)/t.duration)-1}function Ct(t,e,r){let{start:n,duration:i}=t;if(i<=0)return n;let a=JP(t,e,r);return n+(a+1)*i}function Ur(t,e){var r;return t*e.timescale+((r=e.indexTimeOffset)!=null?r:0)}function ta(t,e){var r;return(t-((r=e.indexTimeOffset)!=null?r:0))/e.timescale}function _J(t,e,r){return[t*r,(t+e)*r]}function IVe(t,e){let r=0,n=t.length;for(;r>>1;t[i].start<=e?r=i+1:n=i}return r-1}function MI(t,e,r){let{timeline:n}=t,i=Ur(e,t);if(i<0)return null;let a=IVe(n,i);if(a<0||a>=n.length-1)return null;let o=n[a];if(o.duration<=0)return null;let s=n[a+1];if(s===void 0)return null;let d=s.start,c=Ct(o,s,r);return i>=c&&i=e?r:(new Array(e+1).join("0")+r).slice(-e)}function e0(t){return(e,r,n)=>{let i=G(n)?parseInt(n,10):1;return TVe(String(t),i)}}function Xn(t,e,r){return kVe(t,e,r)}function kVe(t,e,r){return t.indexOf("$")===-1?t:t.replace(/\$\$/g,"$").replace(/\$RepresentationID\$/g,String(e)).replace(/\$Bandwidth(\%0(\d+)d)?\$/g,e0(r===void 0?0:r))}function CI(t,e){return function(n){return n.indexOf("$")===-1?n:n.replace(/\$\$/g,"$").replace(/\$Number(\%0(\d+)d)?\$/g,(i,a,o)=>{if(e===void 0)throw new Error("Segment number not defined in a $Number$ scheme");return e0(e)(i,a,o)}).replace(/\$Time(\%0(\d+)d)?\$/g,(i,a,o)=>{if(t===void 0)throw new Error("Segment time not defined in a $Time$ scheme");return e0(t)(i,a,o)})}}function EVe(t,e,r){let n=r-t;return n>0?Math.floor(n/e):0}function og(t,e,r,n,i,a){var I;let o=n.getEstimatedMaximumPosition((I=t.availabilityTimeOffset)!=null?I:0),s=Math.min(e+r,o!=null?o:1/0),d=Ur(e,t),c=Ur(s,t),{timeline:m,timescale:f,segmentUrlTemplate:p,startNumber:y,endNumber:v}=t,b=y!=null?y:1,T=[],S=m.length;for(let E=0;Ev)break;let L=p===null?null:CI(K,P)(p),V=K-t.indexTimeOffset,z=M;V<0&&(z=M+V,V=0);let N={id:String(K),time:V/f,end:(V+z)/f,duration:z/f,isInit:!1,range:A,timescale:1,url:L,number:P,timestampOffset:-(t.indexTimeOffset/f),complete:D,privateInfos:{isEMSGWhitelisted:a}};T.push(N),F++,K=C+F*M}if(K>=c||(b+=O+1,v!==void 0&&b>v))return T}return T}function _Ve(t,e){if(e.timescale!==t.timescale){let{timescale:r}=t;t.timeline.push({start:e.time/e.timescale*r,duration:e.duration/e.timescale*r,repeatCount:e.count===void 0?0:e.count,range:e.range})}else t.timeline.push({start:e.time,duration:e.duration,repeatCount:e.count===void 0?0:e.count,range:e.range});return!0}var Ru=class{constructor(e,r){var v,b,T,S;let{periodStart:n,periodEnd:i,representationId:a,representationBitrate:o,isEMSGWhitelisted:s}=r,d=(v=e.timescale)!=null?v:1,m=((b=e.presentationTimeOffset)!=null?b:0)-n*d,f=((T=e.initialization)==null?void 0:T.media)===void 0?null:Xn(e.initialization.media,a,o),p=e.media===void 0?null:Xn(e.media,a,o),y;e.initialization!==void 0?y=e.initialization.range:e.indexRange!==void 0&&(y=[0,e.indexRange[0]-1]),this._index={indexRange:e.indexRange,indexTimeOffset:m,initialization:{url:f,range:y},segmentUrlTemplate:p,startNumber:e.startNumber,endNumber:e.endNumber,timeline:(S=e.timeline)!=null?S:[],timescale:d},this._manifestBoundsCalculator=r.manifestBoundsCalculator,this._scaledPeriodStart=Ur(n,this._index),this._scaledPeriodEnd=w(i)?void 0:Ur(i,this._index),this._isInitialized=this._index.timeline.length>0,this._isEMSGWhitelisted=s}getInitSegment(){return Ga(this._index,this._isEMSGWhitelisted)}getSegments(e,r){return og(this._index,e,r,this._manifestBoundsCalculator,this._scaledPeriodEnd,this._isEMSGWhitelisted)}shouldRefresh(){return!1}getFirstAvailablePosition(){let e=this._index;return e.timeline.length===0?null:ta(Math.max(this._scaledPeriodStart,e.timeline[0].start),e)}getLastAvailablePosition(){var i;let{timeline:e}=this._index;if(e.length===0)return null;let r=e[e.length-1],n=Math.min(Ct(r,null,this._scaledPeriodEnd),(i=this._scaledPeriodEnd)!=null?i:1/0);return ta(n,this._index)}getEnd(){return this.getLastAvailablePosition()}awaitSegmentBetween(){return!1}isSegmentStillAvailable(){return!0}checkDiscontinuity(){return null}canBeOutOfSyncError(){return!1}isStillAwaitingFutureSegments(){return!1}isInitialized(){return this._isInitialized}initialize(e){if(!this._isInitialized){for(let r=0;r({url:T.media===void 0?null:Xn(T.media,a,o),mediaRange:T.mediaRange}));this._index={list:p,timescale:c,duration:e.duration,indexTimeOffset:m,indexRange:e.indexRange,initialization:w(e.initialization)?void 0:{url:f,range:e.initialization.range}}}getInitSegment(){let e=Ga(this._index);return e.privateInfos===void 0&&(e.privateInfos={}),e.privateInfos.isEMSGWhitelisted=this._isEMSGWhitelisted,e}getSegments(e,r){let n=this._index,{duration:i,list:a,timescale:o}=n,s=i/o,d=e-this._periodStart,[c,m]=_J(d,r,o),f=Math.min(a.length-1,Math.floor(m/i)),p=[],y=Math.floor(c/i);for(;y<=f;){let v=a[y].mediaRange,b=a[y].url,T=y*s+this._periodStart,S={id:String(y),time:T,isInit:!1,range:v,duration:s,timescale:1,end:T+s,url:b,timestampOffset:-(n.indexTimeOffset/o),complete:!0,privateInfos:{isEMSGWhitelisted:this._isEMSGWhitelisted}};p.push(S),y++}return p}shouldRefresh(e,r){return!1}getFirstAvailablePosition(){return this._periodStart}getLastAvailablePosition(){var i;let e=this._index,{duration:r,list:n}=e;return Math.min(n.length*r/e.timescale+this._periodStart,(i=this._periodEnd)!=null?i:1/0)}getEnd(){return this.getLastAvailablePosition()}awaitSegmentBetween(){return!1}isSegmentStillAvailable(){return!0}checkDiscontinuity(){return null}canBeOutOfSyncError(){return!1}isStillAwaitingFutureSegments(){return!1}isInitialized(){return!0}initialize(){k.error("A `ListRepresentationIndex` does not need to be initialized")}addPredictedSegments(){k.warn("Cannot add predicted segments to a `ListRepresentationIndex`")}_replace(e){this._index=e._index}_update(){k.error("A `ListRepresentationIndex` cannot be updated")}};u();l();u();l();function Hd(t){return Q.getCurrent().DEFAULT_MAXIMUM_TIME_ROUNDING_ERROR*t}var Cu=class{constructor(e,r){var S,I,E;let{availabilityTimeOffset:n,manifestBoundsCalculator:i,isDynamic:a,periodEnd:o,periodStart:s,representationId:d,representationBitrate:c,isEMSGWhitelisted:m}=r,f=(S=e.timescale)!=null?S:1;this._availabilityTimeOffset=n,this._manifestBoundsCalculator=i;let p=(I=e.presentationTimeOffset)!=null?I:0,y=s*f,v=p-y;if(e.duration===void 0)throw new Error("Invalid SegmentTemplate: no duration");let b=((E=e.initialization)==null?void 0:E.media)===void 0?null:Xn(e.initialization.media,d,c),T=e.media===void 0?null:Xn(e.media,d,c);this._index={duration:e.duration,timescale:f,indexRange:e.indexRange,indexTimeOffset:v,initialization:w(e.initialization)?void 0:{url:b,range:e.initialization.range},url:T,presentationTimeOffset:p,startNumber:e.startNumber,endNumber:e.endNumber},this._isDynamic=a,this._periodStart=s,this._scaledRelativePeriodEnd=o===void 0?void 0:(o-s)*f,this._isEMSGWhitelisted=m}getInitSegment(){return Ga(this._index,this._isEMSGWhitelisted)}getSegments(e,r){let n=this._index,{duration:i,startNumber:a,endNumber:o,timescale:s,url:d}=n,c=this._periodStart*s,m=this._scaledRelativePeriodEnd,f=e*s-c,p=(e+r)*s-c,y=this._getFirstSegmentStart(),v=this._getLastSegmentStart();if(w(y)||w(v))return[];let b=Math.max(y,f),T=Math.min(v,p);if(T+i<=b)return[];let S=[],I=a!=null?a:1,E=Math.floor(b/i);for(let R=E*i;R<=T;R+=i){let M=E+I;if(o!==void 0&&M>o)return S;let C=!w(m)&&R+i>m?m-R:i,A=R+c,x=R+this._index.presentationTimeOffset,O=d===null?null:CI(x,M)(d),D={id:String(M),number:M,time:A/s,end:(A+C)/s,duration:C/s,timescale:1,isInit:!1,scaledDuration:C/s,url:O,timestampOffset:-(n.indexTimeOffset/s),complete:!0,privateInfos:{isEMSGWhitelisted:this._isEMSGWhitelisted}};S.push(D),E++}return S}getFirstAvailablePosition(){let e=this._getFirstSegmentStart();return w(e)?e:e/this._index.timescale+this._periodStart}getLastAvailablePosition(){let e=this._getLastSegmentStart();if(w(e))return e;let r=this._estimateRelativeScaledEnd();return Math.min(e+this._index.duration,r!=null?r:1/0)/this._index.timescale+this._periodStart}getEnd(){if(!this._isDynamic)return this.getLastAvailablePosition();let e=this._estimateRelativeScaledEnd();if(e===void 0)return;let{timescale:r}=this._index;return(e+this._periodStart*r)/r}awaitSegmentBetween(e,r){if(be(e<=r),!this._isDynamic)return!1;let{timescale:n}=this._index,i=Hd(n),a=this._periodStart*n,o=e*n-a,s=r*n-a,d=this._getLastSegmentStart();if(w(d)){let f=this._estimateRelativeScaledEnd();return f===void 0?s+i>=0:s+i>=0&&oc-i:s>c-i&&othis._periodStart?(n-this._periodStart)*r:0;return Math.floor(i/e)*e}_getLastSegmentStart(){var a,o;let{duration:e,timescale:r,endNumber:n,startNumber:i=1}=this._index;if(this._isDynamic){let s=this._manifestBoundsCalculator.getEstimatedLiveEdge();if(s!==void 0&&this._scaledRelativePeriodEnd!==void 0&&this._scaledRelativePeriodEndm||d<2?c:(d-2)*e}}_estimateRelativeScaledEnd(){var e,r;if(this._index.endNumber!==void 0){let n=this._index.endNumber-((e=this._index.startNumber)!=null?e:1)+1;return Math.max(Math.min(n*this._index.duration,(r=this._scaledRelativePeriodEnd)!=null?r:1/0),0)}if(this._scaledRelativePeriodEnd!==void 0)return Math.max(this._scaledRelativePeriodEnd,0)}};u();l();u();l();u();l();function sg(t,e){let r=0;for(;t.length>0;){let n=t[0];if(n.start>=e||n.repeatCount===-1)return r;if(n.repeatCount===0)t.shift(),r+=1;else{let i=t[1];if(i!==void 0&&i.start<=e)t.shift(),r+=1;else{if(n.duration<=0)return r;let a=n.start+n.duration,o=1;for(;an.repeatCount)t.shift(),r=n.repeatCount+1;else{let s=n.repeatCount-o;return n.start=a,n.repeatCount=s,r+=o,r}}}}return r}u();l();function ug(t,e){if(t.length===0)return t.push(...e),!0;if(e.length===0)return!1;let r=t.length,n=e[0].start,i=t[r-1];if(Ct(i,e[0])=0;m--){let f=t[m].start;if(f===n){let p=r-m;return t.splice(m,p,...e),!1}else if(fn)return k.warn("RepresentationIndex: Manifest update removed all previous segments"),t.splice(0,r,...e),!0;if(p.repeatCount===void 0||p.repeatCount<=0)return p.repeatCount<0&&(p.repeatCount=Math.floor((n-p.start)/p.duration)-1),t.splice(m+1,r-(m+1),...e),!1;if(p.start+p.duration*(p.repeatCount+1)<=n)return t.splice(m+1,r-(m+1),...e),!1;let v=(n-p.start)/p.duration-1;if(v%1===0&&p.duration===e[0].duration){let b=e[0].repeatCount<0?-1:e[0].repeatCount+v+1;return t.splice(m,r-m,...e),t[m].start=p.start,t[m].repeatCount=b,!1}return k.warn("RepresentationIndex: Manifest update removed previous segments"),t[m].repeatCount=Math.floor(v),t.splice(m+1,r-(m+1),...e),!1}}let o=t[t.length-1],s=e[e.length-1];if(o.repeatCount!==void 0&&o.repeatCount<0)return o.start>s.start?(k.warn("RepresentationIndex: The new index is older than the previous one"),!1):(k.warn('RepresentationIndex: The new index is "bigger" than the previous one'),t.splice(0,r,...e),!0);let d=o.start+o.duration*(o.repeatCount+1),c=s.start+s.duration*(s.repeatCount+1);return d>=c?(k.warn("RepresentationIndex: The new index is older than the previous one"),!1):(k.warn('RepresentationIndex: The new index is "bigger" than the previous one'),t.splice(0,r,...e),!0)}u();l();u();l();function lg(t,e,r){let n=t.start,i=t.duration,a=t.repeatCount;return n===void 0&&(e===null?n=0:w(e.duration)||(n=e.start+e.duration*(e.repeatCount+1))),(i===void 0||isNaN(i))&&r!==null&&r.start!==void 0&&!isNaN(r.start)&&n!==void 0&&!isNaN(n)&&(i=r.start-n),n!==void 0&&!isNaN(n)&&i!==void 0&&!isNaN(i)&&(a===void 0||!isNaN(a))?{start:n,duration:i,repeatCount:a===void 0?0:a}:(k.warn('DASH: A "S" Element could not have been parsed.'),null)}u();l();function dg(t){let e={};for(let r of Object.keys(t.attributes)){let n=t.attributes[r];if(!w(n))switch(r){case"t":let i=parseInt(n,10);isNaN(i)?k.warn(`DASH: invalid t ("${n}")`):e.start=i;break;case"d":let a=parseInt(n,10);isNaN(a)?k.warn(`DASH: invalid d ("${n}")`):e.duration=a;break;case"r":let o=parseInt(n,10);isNaN(o)?k.warn(`DASH: invalid r ("${n}")`):e.repeatCount=o;break}}return e}function cg(t){let e={};for(let r=0;r0){let s=i-a.start;if(s%a.duration===0&&s/a.duration<=a.repeatCount)return{repeatNumberInPrevSegments:s/a.duration,prevSegmentsIdx:o,newElementsIdx:0,repeatNumberInNewElements:0}}if(o++,o>=t.length)return null;if(a=t[o],a.start===i)return{prevSegmentsIdx:o,newElementsIdx:0,repeatNumberInPrevSegments:0,repeatNumberInNewElements:0};if(a.start>i)return null}}else{let a=0,o=Array.isArray(e)?e[0]:null,s=Array.isArray(e)?null:e[0],d=i;for(;;){let c=o!==null?o.attributes.d:s==null?void 0:s.getAttribute("d"),m=w(c)?null:parseInt(c,10);if(m===null||Number.isNaN(m))return null;let f=o!==null?o.attributes.r:s==null?void 0:s.getAttribute("r"),p=w(f)?null:parseInt(f,10);if(p!==null){if(Number.isNaN(p)||p<0)return null;if(p>0){let b=r-d;if(b%m===0&&b/m<=p)return{repeatNumberInPrevSegments:0,repeatNumberInNewElements:b/m,prevSegmentsIdx:0,newElementsIdx:a}}d+=m*(p+1)}else d+=m;if(a++,a>=e.length)return null;Array.isArray(e)?o=e[a]:s=e[a];let y=o!==null?o.attributes.t:s==null?void 0:s.getAttribute("t"),v=w(y)?null:parseInt(y,10);if(v!==null){if(Number.isNaN(v))return null;d=v}if(d===r)return{newElementsIdx:a,prevSegmentsIdx:0,repeatNumberInPrevSegments:0,repeatNumberInNewElements:0};if(d>i)return null}}}function r0(t,e){var b;let r=t0(e,t);if(r===null)return k.warn('DASH: Cannot perform "based" update. Common segment not found.'),rs(t);let{prevSegmentsIdx:n,newElementsIdx:i,repeatNumberInPrevSegments:a,repeatNumberInNewElements:o}=r,d=e.length-n+i-1;if(d>=t.length)return k.info('DASH: Cannot perform "based" update. New timeline too short'),rs(t);let c=e.slice(n);if(a>0){let T=c[0];T.start+=T.duration*a,c[0].repeatCount-=a}if(o>0&&i!==0)return k.info('DASH: Cannot perform "based" update. The new timeline has a different form.'),rs(t);let m=c[c.length-1],f=Array.isArray(t)?dg(t[d]):cg(t[d]),p=((b=f.repeatCount)!=null?b:0)-o;if(f.duration!==m.duration||m.repeatCount>p)return k.info('DASH: Cannot perform "based" update. The new timeline has a different form at the beginning.'),rs(t);f.repeatCount!==void 0&&f.repeatCount>m.repeatCount&&(m.repeatCount=f.repeatCount);let y=[],v=[];if(Array.isArray(t))for(let T=d+1;T=Math.min(o,(m=this._scaledPeriodEnd)!=null?m:1/0))return!1;let d=Ur(e,this._index);if(i.length>0&&s!==null&&!s.isLastOfTimeline){let f=i[i.length-1],y=Ct(f,null,this._scaledPeriodEnd)+a;if(dthis._scaledPeriodStart?void 0:!1:d-athis._scaledPeriodStart:!1}isSegmentStillAvailable(e){return e.isInit?!0:(this._refreshTimeline(),this._index.timeline===null&&(this._index.timeline=this._getTimeline()),RVe(e,this._index,this._manifestBoundsCalculator,this._scaledPeriodEnd))}checkDiscontinuity(e){this._refreshTimeline();let r=this._index.timeline;return r===null&&(r=this._getTimeline(),this._index.timeline=r),MI({timeline:r,timescale:this._index.timescale,indexTimeOffset:this._index.indexTimeOffset},e,this._scaledPeriodEnd)}canBeOutOfSyncError(e){return this._isDynamic?e instanceof rn&&e.isHttpError(404):!1}_replace(e){this._parseTimeline=e._parseTimeline,this._index=e._index,this._isDynamic=e._isDynamic,this._scaledPeriodStart=e._scaledPeriodStart,this._scaledPeriodEnd=e._scaledPeriodEnd,this._lastUpdate=e._lastUpdate,this._manifestBoundsCalculator=e._manifestBoundsCalculator,this._isLastPeriod=e._isLastPeriod}_update(e){this._index.timeline===null&&(this._index.timeline=this._getTimeline()),e._index.timeline===null&&(e._index.timeline=e._getTimeline()),ug(this._index.timeline,e._index.timeline)&&(this._index.startNumber=e._index.startNumber),this._index.availabilityTimeOffset=e._index.availabilityTimeOffset,this._index.availabilityTimeComplete=e._index.availabilityTimeComplete,this._index.endNumber=e._index.endNumber,this._isDynamic=e._isDynamic,this._scaledPeriodStart=e._scaledPeriodStart,this._scaledPeriodEnd=e._scaledPeriodEnd,this._lastUpdate=e._lastUpdate,this._isLastPeriod=e._isLastPeriod}isStillAwaitingFutureSegments(){var o;if(!this._isDynamic)return!1;this._refreshTimeline(),this._index.timeline===null&&(this._index.timeline=this._getTimeline());let{timeline:e}=this._index;if(e.length===0){if(this._scaledPeriodEnd!==void 0){let s=this._manifestBoundsCalculator.getEstimatedLiveEdge();if(s!==void 0&&Ur(s,this._index)>this._scaledPeriodEnd)return!1}return this._isLastPeriod}let r=Hd(this._index.timescale),n=wI(this._index,this._manifestBoundsCalculator,this._scaledPeriodEnd);if(n!==null&&!n.isLastOfTimeline){let s=Math.min(n.end,(o=this._scaledPeriodEnd)!=null?o:1/0);return!(this._scaledPeriodEnd!==void 0&&s+r>=this._scaledPeriodEnd)}if(!this._isLastPeriod)return!1;if(this._scaledPeriodEnd===void 0)return!0;let i=e[e.length-1];return Ct(i,null,this._scaledPeriodEnd)+rr){if(n===r+1)return t.slice(0,i+1);{let o=t.slice(0,i),s=je({},a),d=n-a.repeatCount-1;return s.repeatCount=Math.max(0,r-d),o.push(s),o}}}return t}function RVe(t,e,r,n){let i=wI(e,r,n);if(i===null)return!1;for(let a=0;at.time)return!1;if(s===t.time)return o.range===void 0?t.range===void 0:!w(t.range)&&o.range[0]===t.range[0]&&o.range[1]===t.range[1];if(o.repeatCount>=0&&o.duration!==void 0){let c=(s-o.start)/o.duration-1;return c%1===0&&c<=i.newRepeatCount}}return!1}function wI(t,e,r){if(t.timeline.length<=0)return null;if(t.availabilityTimeOffset===1/0){let i=t.timeline.length-1,a=t.timeline[i];return{isLastOfTimeline:!0,timelineIdx:i,newRepeatCount:a.repeatCount,end:Ct(a,null,r)}}let n=e.getEstimatedMaximumPosition(t.availabilityTimeOffset);if(n===void 0){let i=t.timeline.length-1,a=t.timeline[i];return{isLastOfTimeline:!0,timelineIdx:i,newRepeatCount:a.repeatCount,end:Ct(a,null,r)}}for(let i=t.timeline.length-1;i>=t.timeline.length;i--){let a=t.timeline[i],o=a.start+a.duration;if(ta(o,t)<=n){let s=Ct(a,t.timeline[i+1],r);if(ta(s,t)<=n)return{isLastOfTimeline:i===t.timeline.length-1,timelineIdx:i,newRepeatCount:a.repeatCount,end:o};{let c=Ur(n,t)-a.start,m=Math.floor(c/a.duration);return be(m>=1),{isLastOfTimeline:!1,timelineIdx:i,newRepeatCount:m-1,end:a.start+m*a.duration}}}}return null}var xI=fg;u();l();u();l();var MVe=/^(?:[a-z]+:)?\/\//i,CVe=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/;function wu(t){let e=t.lastIndexOf("/");if(e<0)return t.length;if(MVe.test(t)){let n=t.indexOf("/");if(n>=0&&e===n+1)return t.length}let r=t.indexOf("?");return r>=0&&r=xVe&&mg.clear(),mg.set(t,r),r}function i0(t){let e="";return t.scheme&&(e+=t.scheme+":"),t.authority&&(e+="//"+t.authority),e+=t.path,t.query&&(e+="?"+t.query),t.fragment&&(e+="#"+t.fragment),e}function a0(t){let e=t.split(/(?=\/)/),r=[];for(let n=0;no!==""),r=e.length;if(r===0)return"";if(r===1)return(n=e[0])!=null?n:"";{let o=(i=e[0])!=null?i:"",s=(a=e[1])!=null?a:"",d=wVe(o,s),c=e.slice(2);return MJ(d,...c)}}var Gd=MJ;u();l();var pg=class{constructor(){this._refs=new Map,this._stored=[]}addReferences(e){for(let r of e)r.attributes.refId!==void 0&&this._refs.set(r.attributes.refId,r)}add(e,r){this._tryParsing(e,r,!1)||this._stored.push([e,r]),r.attributes.refId!==void 0&&(this._refs.set(r.attributes.refId,r),this._resolveStoredRefs(!1))}finalize(){this._resolveStoredRefs(!0)}_resolveStoredRefs(e){for(let r=this._stored.length-1;r>=0;r--){let[n,i]=this._stored[r];(this._tryParsing(n,i,e)||e)&&this._stored.splice(r,1)}return this._stored.length===0}_tryParsing(e,r,n){if(r.attributes.ref===void 0)return o0(e,r),!0;let i=this._getReferenced(r.attributes.ref);return i===void 0?(n&&(k.warn("DASH: forcing the parsing of a referencing ContentProtection"),o0(e,r)),!1):(r.children.cencPssh.push(...i.children.cencPssh),r.attributes.keyId===void 0&&i.attributes.keyId!==void 0&&(r.attributes.keyId=i.attributes.keyId),r.attributes.schemeIdUri===void 0&&i.attributes.schemeIdUri!==void 0&&(r.attributes.schemeIdUri=i.attributes.schemeIdUri),r.attributes.value===void 0&&i.attributes.value!==void 0&&(r.attributes.value=i.attributes.value),o0(e,r),!0)}_getReferenced(e){return this._refs.get(e)}};function o0(t,e){let r;if(e.attributes.schemeIdUri!==void 0&&e.attributes.schemeIdUri.substring(0,9)==="urn:uuid:"&&(r=e.attributes.schemeIdUri.substring(9).replace(/-/g,"").toLowerCase()),e.attributes.keyId!==void 0&&e.attributes.keyId.length>0){let o={keyId:e.attributes.keyId,systemId:r};t.contentProtections===void 0?t.contentProtections={keyIds:[o],initData:[]}:t.contentProtections.keyIds===void 0?t.contentProtections.keyIds=[o]:t.contentProtections.keyIds.push(o)}if(r===void 0)return;let{cencPssh:n}=e.children,i=[];for(let o of n)i.push({systemId:r,data:o});if(i.length===0)return;if(t.contentProtections===void 0){t.contentProtections={keyIds:[],initData:[{type:"cenc",values:i}]};return}let a=ce(t.contentProtections.initData,o=>o.type==="cenc");a===void 0?t.contentProtections.initData.push({type:"cenc",values:i}):a.values.push(...i)}u();l();function AI(t){let e=Date.parse(t)-re();if(isNaN(e)){k.warn("DASH Parser: Invalid clock received: ",t);return}return e}u();l();function s0(t){let e=t.children.utcTimings.filter(r=>(r.schemeIdUri==="urn:mpeg:dash:utc:http-iso:2014"||r.schemeIdUri==="urn:mpeg:dash:utc:http-xsdate:2014")&&r.value!==void 0);return e.length>0?e[0].value:void 0}u();l();u();l();u();l();function PI(t){let{representations:e}=t,r=null;for(let n=0;n=0;e--){let r=t[e].adaptations,n=r.audio===void 0?void 0:r.audio[0],i=r.video===void 0?void 0:r.video[0];if(n!==void 0||i!==void 0){let a=null,o=null;if(n!==void 0){let s=PI(n);if(s===void 0)return{safe:void 0,unsafe:void 0};a=s}if(i!==void 0){let s=PI(i);if(s===void 0)return{safe:void 0,unsafe:void 0};o=s}if(n!==void 0&&a===null||i!==void 0&&o===null)return k.info("Parser utils: found Period with no segment. ","Going to previous one to calculate last position"),{safe:void 0,unsafe:void 0};if(o!==null)return a!==null?{safe:Math.min(a,o),unsafe:Math.max(a,o)}:{safe:o,unsafe:o};if(a!==null)return{safe:a,unsafe:a}}}return{safe:void 0,unsafe:void 0}}u();l();u();l();function OI(t){let{representations:e}=t,r=null;for(let n=0;nn.start)&&(k.warn("DASH: Updating overlapping Periods.",i==null?void 0:i.start,n.start),i.duration=n.start-i.start,i.end=n.start,!(i.duration>0));){if(e.pop(),e.length===0)break;i=e[e.length-1]}e.push(n)}return e}u();l();function m0(t,e){let r=[];return t.forEach((n,i)=>{let a;if(!w(n.attributes.start))a=n.attributes.start;else if(i===0)a=!e.isDynamic||w(e.availabilityStartTime)?0:e.availabilityStartTime;else{let c=r[r.length-1];if(!w(c)&&!w(c.periodEnd))a=c.periodEnd;else throw new Error("Missing start time when parsing periods.")}let o,s=t[i+1];w(n.attributes.duration)?i===t.length-1?o=e.duration:w(s.attributes.start)||(o=s.attributes.start-a):o=n.attributes.duration;let d=w(o)?void 0:a+o;r.push({periodStart:a,periodDuration:o,periodEnd:d})}),r}u();l();u();l();function PVe(t,e){for(let r of e){let{adaptation:n,trickModeAttachedAdaptationIds:i}=r;for(let a of i)for(let o of Yi){let s=t[o];if(s!==void 0)for(let d of s)d.id===a&&(d.trickModeTracks===void 0&&(d.trickModeTracks=[]),d.trickModeTracks.push(n))}}}var CJ=PVe;u();l();var OVe=["subtitle","caption"];function p0(t,e,r,n){function i(o,s){let d=o.split("/")[0];if(ve(Yi,d))return d;if(o==="application/ttml+xml")return"text";if(o==="application/mp4")return s!==null&&ce(s,c=>c.schemeIdUri==="urn:mpeg:dash:role:2011"&&ve(OVe,c.value))!==void 0?"text":void 0}function a(o){switch(o.substring(0,3)){case"avc":case"hev":case"hvc":case"vp8":case"vp9":case"av1":return"video";case"vtt":return"text"}switch(o.substring(0,4)){case"mp4a":return"audio";case"wvtt":case"stpp":return"text"}}if(e!==null){let o=i(e,n);if(o!==void 0)return o}if(r!==null){let o=a(r);if(o!==void 0)return o}for(let o=0;oc===void 0?!1:c.some(({schemeIdUri:I})=>I===S.schemeIdUri),isLastPeriod:m,manifestBoundsCalculator:n,isDynamic:i,periodEnd:a,periodStart:o,receivedTime:s,representationBitrate:t.attributes.bitrate,representationId:t.attributes.id},y;if(t.children.segmentBase!==void 0){let{segmentBase:S}=t.children;y=new Ru(S,p)}else if(t.children.segmentList!==void 0){let{segmentList:S}=t.children;y=new Mu(S,p)}else if(t.children.segmentTemplate!==void 0||e.parentSegmentTemplates.length>0){let S=e.parentSegmentTemplates.slice(),I=t.children.segmentTemplate;I!==void 0&&S.push(I);let E=le({},...S);(E.availabilityTimeOffset!==void 0||e.availabilityTimeOffset!==void 0)&&(p.availabilityTimeOffset=((v=E.availabilityTimeOffset)!=null?v:0)+((b=e.availabilityTimeOffset)!=null?b:0)),(E.availabilityTimeComplete!==void 0||e.availabilityTimeComplete!==void 0)&&(p.availabilityTimeComplete=(T=E.availabilityTimeComplete)!=null?T:e.availabilityTimeComplete),y=xI.isTimelineIndexArgument(E)?new xI(E,p):new Cu(E,p)}else{let S=e.adaptation.children;if(S.segmentBase!==void 0){let{segmentBase:I}=S;y=new Ru(I,p)}else if(S.segmentList!==void 0){let{segmentList:I}=S;y=new Mu(I,p)}else y=new Cu({duration:Number.MAX_VALUE,timescale:1,startNumber:0,media:""},p)}return y}u();l();function Wa(t,e){var i;if(e.length===0)return t;let r=e.map(a=>({url:a.value}));if(t.length===0)return r;let n=[];for(let a=0;as.schemeIdUri==="urn:mpeg:mpegB:cicp:TransferCharacteristics");if(o!==void 0)switch(o.value){case"15":return;case"16":return{eotf:"pq"};case"18":return{eotf:"hlg"}}if(i!==void 0&&/^vp(08|09|10)/.exec(i))return xJ(i)}function h0(t,e,r){var i,a,o,s,d,c,m;let n=[];for(let f of t){let p=f.attributes.id!==void 0?f.attributes.id:String(f.attributes.bitrate)+(f.attributes.height!==void 0?`-${f.attributes.height}`:"")+(f.attributes.width!==void 0?`-${f.attributes.width}`:"")+(f.attributes.mimeType!==void 0?`-${f.attributes.mimeType}`:"")+(f.attributes.codecs!==void 0?`-${f.attributes.codecs}`:"");for(;n.some(O=>O.id===p);)p+="-dup";let y=(a=(i=r.unsafelyBaseOnPreviousAdaptation)==null?void 0:i.getRepresentation(p))!=null?a:null,v=NVe(f,e),b=(o=f.attributes.availabilityTimeComplete)!=null?o:r.availabilityTimeComplete,T;(f.attributes.availabilityTimeOffset!==void 0||r.availabilityTimeOffset!==void 0)&&(T=((s=f.attributes.availabilityTimeOffset)!=null?s:0)+((d=r.availabilityTimeOffset)!=null?d:0));let S=le({},r,{availabilityTimeOffset:T,availabilityTimeComplete:b,unsafelyBaseOnPreviousRepresentation:y,adaptation:e,inbandEventStreams:v}),I=g0(f,S),E;f.attributes.bitrate===void 0?(k.warn("DASH: No usable bitrate found in the Representation."),E=0):E=f.attributes.bitrate;let R=Wa(r.baseURLs,f.children.baseURLs),M=R.length===0?[{baseUrl:"",id:void 0}]:R.map(O=>({baseUrl:O.url,id:O.serviceLocation})),C={bitrate:E,cdnMetadata:M,index:I,id:p};f.children.supplementalProperties!==void 0&&ce(f.children.supplementalProperties,O=>O.schemeIdUri==="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&O.value==="JOC")&&(C.isSpatialAudio=!0);let A;f.attributes.codecs!==void 0?A=f.attributes.codecs:e.attributes.codecs!==void 0&&(A=e.attributes.codecs),A!==void 0&&(A=A==="mp4a.40.02"?"mp4a.40.2":A,C.codecs=A);let x;f.attributes.supplementalCodecs!==void 0?x=f.attributes.supplementalCodecs:e.attributes.supplementalCodecs!==void 0&&(x=e.attributes.supplementalCodecs),x!==void 0&&(C.supplementalCodecs=wJ(x)),f.attributes.frameRate!==void 0?C.frameRate=f.attributes.frameRate:e.attributes.frameRate!==void 0&&(C.frameRate=e.attributes.frameRate),f.attributes.height!==void 0?C.height=f.attributes.height:e.attributes.height!==void 0&&(C.height=e.attributes.height),f.attributes.mimeType!==void 0?C.mimeType=f.attributes.mimeType:e.attributes.mimeType!==void 0&&(C.mimeType=e.attributes.mimeType),f.attributes.width!==void 0?C.width=f.attributes.width:e.attributes.width!==void 0&&(C.width=e.attributes.width);{let O=[...(c=e.children.contentProtections)!=null?c:[],...(m=f.children.contentProtections)!=null?m:[]];for(let D of O)r.contentProtectionParser.add(C,D)}C.hdrInfo=DVe({adaptationProfiles:e.attributes.profiles,supplementalProperties:e.children.supplementalProperties,essentialProperties:e.children.essentialProperties,manifestProfiles:r.manifestProfiles,codecs:A}),n.push(C)}return n}function qVe(t){if(t===void 0)return!1;let e=t.schemeIdUri==="urn:tva:metadata:cs:AudioPurposeCS:2007"&&t.value==="1",r=t.schemeIdUri==="urn:mpeg:dash:role:2011"&&t.value==="description";return e||r}function BVe(t,e){return!!(t!==void 0&&t.some(n=>n.schemeIdUri==="urn:tva:metadata:cs:AudioPurposeCS:2007"&&n.value==="2")||e!==void 0&&e.some(n=>n.schemeIdUri==="urn:mpeg:dash:role:2011"&&n.value==="caption"))}function UVe(t){return t===void 0?!1:t.schemeIdUri==="urn:mpeg:dash:role:2011"&&t.value==="sign"}function FVe(t,e){if(G(t.attributes.id))return t.attributes.id;let{isClosedCaption:r,isForcedSubtitle:n,isAudioDescription:i,isSignInterpreted:a,isTrickModeTrack:o,type:s}=e,d=s;return G(t.attributes.language)&&(d+=`-${t.attributes.language}`),r===!0&&(d+="-cc"),n===!0&&(d+="-cc"),i===!0&&(d+="-ad"),a===!0&&(d+="-si"),o&&(d+="-trickMode"),G(t.attributes.contentType)&&(d+=`-${t.attributes.contentType}`),G(t.attributes.codecs)&&(d+=`-${t.attributes.codecs}`),G(t.attributes.mimeType)&&(d+=`-${t.attributes.mimeType}`),t.attributes.frameRate!==void 0&&(d+=`-${String(t.attributes.frameRate)}`),d}function KVe(t){if(!w(t.children.supplementalProperties)){let{supplementalProperties:e}=t.children;for(let r of e)if(r.schemeIdUri==="urn:mpeg:dash:adaptation-set-switching:2016"&&!w(r.value))return r.value.split(",").map(n=>n.trim()).filter(n=>n)}return[]}function y0(t,e){var s,d,c,m,f,p,y;let r={video:[],audio:[],text:[]},n=[],i={},a=[];for(let v=0;vne.value==="main")&&I.some(ne=>ne.schemeIdUri==="urn:mpeg:dash:role:2011"),M=b.children.representations,C=(s=b.attributes.availabilityTimeComplete)!=null?s:e.availabilityTimeComplete,A;(b.attributes.availabilityTimeOffset!==void 0||e.availabilityTimeOffset!==void 0)&&(A=((d=b.attributes.availabilityTimeOffset)!=null?d:0)+((c=e.availabilityTimeOffset)!=null?c:0));let x=b.attributes.mimeType,O=b.attributes.codecs,D=p0(M,G(x)?x:null,G(O)?O:null,w(T.roles)?null:T.roles);if(D===void 0)continue;let F=(m=b.attributes.selectionPriority)!=null?m:1,K=b.attributes.id,P=KVe(b),L=[];e.segmentTemplate!==void 0&&L.push(e.segmentTemplate),b.children.segmentTemplate!==void 0&&L.push(b.children.segmentTemplate);let V={availabilityTimeComplete:C,availabilityTimeOffset:A,baseURLs:Wa(e.baseURLs,T.baseURLs),contentProtectionParser:e.contentProtectionParser,manifestBoundsCalculator:e.manifestBoundsCalculator,end:e.end,isDynamic:e.isDynamic,isLastPeriod:e.isLastPeriod,manifestProfiles:e.manifestProfiles,parentSegmentTemplates:L,receivedTime:e.receivedTime,start:e.start,unsafelyBaseOnPreviousAdaptation:null},z=Array.isArray(S)?ce(S,ne=>ne.schemeIdUri==="http://dashif.org/guidelines/trickmode"):void 0,N=(f=z==null?void 0:z.value)==null?void 0:f.split(" "),B=N!==void 0,{accessibilities:U}=T,j;I!==void 0&&I.some(ne=>ne.value==="dub")&&(j=!0);let Y;D!=="text"?Y=!1:Y=BVe(U,I);let W;D==="text"&&I!==void 0&&I.some(ne=>ne.value==="forced-subtitle"||ne.value==="forced_subtitle")&&(W=!0);let se;D!=="audio"?se=!1:U!==void 0&&(se=U.some(qVe));let Z;D!=="video"?Z=!1:U!==void 0&&(Z=U.some(UVe));let $=FVe(b,{isAudioDescription:se,isForcedSubtitle:W,isClosedCaption:Y,isSignInterpreted:Z,isTrickModeTrack:B,type:D});for(;ve(a,$);)$+="-dup";let ue=$;a.push($),V.unsafelyBaseOnPreviousAdaptation=(y=(p=e.unsafelyBaseOnPreviousPeriod)==null?void 0:p.getAdaptation($))!=null?y:null;let Le=h0(M,b,V),Re={id:$,representations:Le,type:D,isTrickModeTrack:B};if(w(b.attributes.language)||(Re.language=b.attributes.language),w(Y)||(Re.closedCaption=Y),w(se)||(Re.audioDescription=se),j===!0&&(Re.isDub=!0),W!==void 0&&(Re.forcedSubtitles=W),Z===!0&&(Re.isSignInterpreted=!0),E!==void 0&&(Re.label=E),N!==void 0)n.push({adaptation:Re,trickModeAttachedAdaptationIds:N});else{let ne=-1;for(let de of P){let Wt=i[de];if(Wt!==void 0&&Wt.newID!==ue&&ve(Wt.adaptationSetSwitchingIDs,K)){ne=et(r[D],Ot=>Ot[0].id===de);let Pt=r[D][ne];if(Pt!==void 0&&Pt[0].audioDescription===Re.audioDescription&&Pt[0].closedCaption===Re.closedCaption&&Pt[0].language===Re.language){k.info('DASH Parser: merging "switchable" AdaptationSets',K,de),Pt[0].representations.push(...Re.representations),Pt[1]={priority:Math.max(F,Pt[1].priority),isMainAdaptation:R||Pt[1].isMainAdaptation,indexInMpd:Math.min(v,Pt[1].indexInMpd)};break}}}ne<0&&r[D].push([Re,{priority:F,isMainAdaptation:R,indexInMpd:v}])}!w(K)&&w(i[K])&&(i[K]={newID:ue,adaptationSetSwitchingIDs:P})}let o=Yi.reduce((v,b)=>{let T=r[b];return T.length>0&&(T.sort(AJ),v[b]=T.map(([S])=>S)),v},{});return r.video.sort(AJ),CJ(o,n),o}function AJ(t,e){let r=e[1].priority-t[1].priority;return r!==0?r:t[1].isMainAdaptation!==e[1].isMainAdaptation?t[1].isMainAdaptation?-1:1:t[1].indexInMpd-e[1].indexInMpd}var zVe=Dt();function v0(t,e){var o,s,d,c,m;let r=[],n=m0(t,e);if(n.length!==t.length)throw new Error("MPD parsing error: the time information are incoherent.");let{isDynamic:i,manifestBoundsCalculator:a}=e;!i&&!w(e.duration)&&a.setLastPosition(e.duration);for(let f=t.length-1;f>=0;f--){let p=f===t.length-1,y=t[f],v=e.xlinkInfos.get(y),b=Wa(e.baseURLs,y.children.baseURLs),{periodStart:T,periodDuration:S,periodEnd:I}=n[f],E;for(w(y.attributes.id)?(k.warn("DASH: No usable id found in the Period. Generating one."),E="gen-dash-period-"+zVe()):E=y.attributes.id;r.some(z=>z.id===E);)E+="-dup";let R=v!==void 0?v.receivedTime:e.receivedTime,M=(s=(o=e.unsafelyBaseOnPreviousManifest)==null?void 0:o.getPeriod(E))!=null?s:null,C=y.attributes.availabilityTimeComplete,A=y.attributes.availabilityTimeOffset,{manifestProfiles:x,contentProtectionParser:O}=e,{segmentTemplate:D}=y.children;O.addReferences((d=y.children.contentProtections)!=null?d:[]);let F={availabilityTimeComplete:C,availabilityTimeOffset:A,baseURLs:b,contentProtectionParser:O,manifestBoundsCalculator:a,end:I,isDynamic:i,isLastPeriod:p,manifestProfiles:x,receivedTime:R,segmentTemplate:D,start:T,unsafelyBaseOnPreviousPeriod:M},K=y0(y.children.adaptations,F),P=((c=e.xmlNamespaces)!=null?c:[]).concat((m=y.attributes.namespaces)!=null?m:[]),L=VVe(y.children.eventStreams,T,P),V={id:E,start:T,end:I,duration:S,adaptations:K,streamEvents:L};if(r.unshift(V),!a.lastPositionIsKnown()){let z=jVe(K);if(!i)typeof z=="number"&&a.setLastPosition(z);else if(typeof z=="number"){let N=re()/1e3;a.setLastPosition(z,N)}else{let N=PJ(e,T);if(N!==void 0){let[B,U]=N;a.setLastPosition(B,U)}}}}if(e.isDynamic&&!a.lastPositionIsKnown()){let f=PJ(e,0);if(f!==void 0){let[p,y]=f;a.setLastPosition(p,y)}}return f0(r)}function PJ(t,e){if(w(t.clockOffset)){let r=Date.now()/1e3;if(r>=e){k.warn("DASH Parser: no clock synchronization mechanism found. Using the system clock instead.");let n=r-t.availabilityStartTime,i=re()/1e3;return[n,i]}}else{let r=t.clockOffset/1e3-t.availabilityStartTime,n=re()/1e3,i=n+r;if(i>=e)return[i,n]}}function jVe(t){let e=null,r=!0,n=Ad(t).filter(a=>!w(a)),i=Ld(n,a=>a);for(let a of i){let o=a.representations;for(let s of o){let d=s.index.getLastAvailablePosition();d!==null&&(r=!1,typeof d=="number"&&(e=w(e)?d:Math.max(e,d)))}}if(w(e)){if(r)return null}else return e}function VVe(t,e,r){var i,a;let n=[];for(let o of t){let{schemeIdUri:s="",timescale:d=1}=o.attributes,c=r.concat((i=o.attributes.namespaces)!=null?i:[]);for(let m of o.children.events)if(m.eventStreamData!==void 0){let f=((a=m.presentationTime)!=null?a:0)/d+e,p=m.duration===void 0?void 0:f+m.duration/d,y,v;if(!Fo&&m.eventStreamData instanceof Element)y=m.eventStreamData;else try{v={namespaces:c,data:typeof m.eventStreamData=="string"?m.eventStreamData:lr(new Uint8Array(m.eventStreamData))}}catch(b){k.error("DASH: Error while parsing event-stream:",b instanceof Error?b.message:"Unknown error")}n.push({start:f,end:p,id:m.id,data:{type:"dash-event-stream",value:{schemeIdUri:s,timescale:d,element:y,xmlData:v}}})}}return n}function Wd(t,e,r,n,i=new WeakMap){let{children:a,attributes:o}=t;if(w(e.externalClockOffset)){let d=o.type==="dynamic",c=ce(a.utcTimings,p=>p.schemeIdUri==="urn:mpeg:dash:utc:direct:2014"&&!w(p.value)),m=!w(c)&&!w(c.value)?AI(c.value):void 0,f=!w(m)&&!isNaN(m)?m:void 0;if(!w(f)&&n!==!0)e.externalClockOffset=f;else if(d&&n!==!0){let p=s0(t);if(!w(p)&&p.length>0)return{type:"needs-clock",value:{url:p,continue:function(v){return v.success?(e.externalClockOffset=AI(v.data),Wd(t,e,r,!0)):(r.push(v.error),k.warn("DASH Parser: Error on fetching the clock ressource",v.error),Wd(t,e,r,!0))}}}}}let s=[];for(let d=0;dd),continue:function(c){if(c.length!==s.length)throw new Error("DASH parser: wrong number of loaded ressources.");for(let m=c.length-1;m>=0;m--){let f=s[m].index,{parsed:p,warnings:y,receivedTime:v,sendingTime:b,url:T}=c[m];y.length>0&&r.push(...y);for(let S of p)i.set(S,{receivedTime:v,sendingTime:b,url:T});a.periods.splice(f,1,...p)}return Wd(t,e,r,n,i)}}}}function HVe(t,e,r,n){var P,L,V,z,N;let{children:i,attributes:a}=t,o=a.type==="dynamic",s=e.url!==void 0?[{url:e.url.substring(0,wu(e.url))}]:[],d=Wa(s,i.baseURLs),c=c0(a,e.referenceDateTime),m=a.timeShiftBufferDepth,{externalClockOffset:f,unsafelyBaseOnPreviousManifest:p}=e,{externalClockOffset:y}=e,v=new gg({availabilityStartTime:c,isDynamic:o,timeShiftBufferDepth:m,serverTimestampOffset:y}),b=new pg;b.addReferences((P=i.contentProtections)!=null?P:[]);let T={availabilityStartTime:c,baseURLs:d,clockOffset:f,contentProtectionParser:b,duration:a.duration,isDynamic:o,manifestBoundsCalculator:v,manifestProfiles:t.attributes.profiles,receivedTime:e.manifestReceivedTime,timeShiftBufferDepth:m,unsafelyBaseOnPreviousManifest:p,xlinkInfos:n,xmlNamespaces:t.attributes.namespaces},S=v0(i.periods,T);b.finalize();let I=a.duration,E,R,M=null,C;a.minimumUpdatePeriod!==void 0&&a.minimumUpdatePeriod>=0&&(E=a.minimumUpdatePeriod===0?Q.getCurrent().DASH_FALLBACK_LIFETIME_WHEN_MINIMUM_UPDATE_PERIOD_EQUAL_0:a.minimumUpdatePeriod);let{minimumSafePosition:A,maximumSafePosition:x,maximumUnsafePosition:O}=d0(S),D=re();if(o){let B;x!==void 0?B=x:y===void 0?(k.warn("DASH Parser: use system clock to define maximum position"),B=Date.now()/1e3-c):B=(re()+y)/1e3-c;let U=v.getEstimatedLiveEdge();U===void 0&&(O!==void 0?U=O:U=B),C={isLinear:!0,maximumSafePosition:B,livePosition:U,time:D},R=A,M=m!=null?m:null,M!==null&&R!==void 0&&U-R>M&&(M=U-R)}else{R=A,R===void 0&&(R=(V=(L=S[0])==null?void 0:L.start)!=null?V:0);let B=I!=null?I:1/0;if(S[S.length-1]!==void 0){let U=S[S.length-1],j=(z=U.end)!=null?z:U.duration!==void 0?U.start+U.duration:void 0;j!==void 0&&j0){let[o,s]=LJ(a,"cenc:pssh");s!==null&&(k.warn(s.message),e.push(s)),o!==null&&r.push(o)}}}return[{cencPssh:r},e]}function YVe(t){let e={};for(let r=0;r0&&(n=n.concat(c));break;case"SegmentList":let[m,f]=hg(a);n=n.concat(f),e.segmentList=m;break;case"SegmentTemplate":let[p,y]=Au(a);n=n.concat(y),e.segmentTemplate=p;break;case"ContentProtection":let[v,b]=Ya(a);b.length>0&&(n=n.concat(b)),v!==void 0&&r.push(v);break;case"SupplementalProperty":w(e.supplementalProperties)?e.supplementalProperties=[_r(a)]:e.supplementalProperties.push(_r(a));break}}return r.length>0&&(e.contentProtections=r),[e,n]}function XVe(t){let e={},r=[],n=zt(e,r);for(let i=0;i0&&(n=n.concat(s));break;case"ContentComponent":e.contentComponent=S0(a);break;case"EssentialProperty":w(e.essentialProperties)?e.essentialProperties=[_r(a)]:e.essentialProperties.push(_r(a));break;case"InbandEventStream":e.inbandEventStreams===void 0&&(e.inbandEventStreams=[]),e.inbandEventStreams.push(_r(a));break;case"Label":let d=a.textContent;d!=null&&(e.label=d);break;case"Representation":let[c,m]=NJ(a);e.representations.push(c),m.length>0&&(n=n.concat(m));break;case"Role":w(e.roles)?e.roles=[_r(a)]:e.roles.push(_r(a));break;case"SupplementalProperty":w(e.supplementalProperties)?e.supplementalProperties=[_r(a)]:e.supplementalProperties.push(_r(a));break;case"SegmentBase":let[f,p]=Qa(a);e.segmentBase=f,p.length>0&&(n=n.concat(p));break;case"SegmentList":let[y,v]=hg(a);e.segmentList=y,v.length>0&&(n=n.concat(v));break;case"SegmentTemplate":let[b,T]=Au(a);e.segmentTemplate=b,T.length>0&&(n=n.concat(T));break;case"ContentProtection":let[S,I]=Ya(a);I.length>0&&(n=n.concat(I)),S!==void 0&&r.push(S);break}}return r.length>0&&(e.contentProtections=r),[e,n]}function JVe(t){let e={},r=[],n=zt(e,r);for(let i=0;i0&&(r=r.concat(s));break}}return[e,r]}function eHe(t){let e={eventStreamData:t},r=[],n=zt(e,r);for(let i=0;i0&&(a=a.concat(T));break;case"ContentProtection":let[S,I]=Ya(d);I.length>0&&(a=a.concat(I)),S!==void 0&&i.push(S);break}}return[{baseURLs:e,adaptations:r,eventStreams:o,segmentTemplate:n,contentProtections:i},a]}function rHe(t){let e={},r=[],n=zt(e,r);for(let i=0;i0&&(o=o.concat(b)),v!==void 0&&a.push(v);break}}return[{baseURLs:e,locations:r,periods:n,utcTimings:i,contentProtections:a},o]}function iHe(t){let e={},r=[],n=zt(e,r);for(let i=0;i",S=new DOMParser().parseFromString(T,"text/xml");if(w(S)||S.children.length===0)throw new Error("DASH parser: Invalid external ressources");let I=S.children[0].children,E=[],R=[];for(let M=0;Mnew Promise((a,o)=>{let s=Date.now()-re(),d=!1,p={reject:b=>{var E,R;if(d||i.isCancelled())return;d=!0,i.deregister(v);let T=b,S=(E=T==null?void 0:T.message)!=null?E:"Unknown error when fetching the Manifest through a custom manifestLoader.",I=new Wn(S,(R=T==null?void 0:T.canRetry)!=null?R:!1,T==null?void 0:T.xhr);o(I)},resolve:b=>{if(d||i.isCancelled())return;d=!0,i.deregister(v);let T=b.receivingTime!==void 0?b.receivingTime-s:void 0,S=b.sendingTime!==void 0?b.sendingTime-s:void 0;a({responseData:b.data,size:b.size,requestDuration:b.duration,url:b.url,receivedTime:T,sendingTime:S})},fallback:()=>{d||i.isCancelled()||(d=!0,i.deregister(v),e(r,n,i).then(a,o))}},y=t({url:r,timeout:n.timeout},p);i.register(v);function v(b){d||(d=!0,typeof y=="function"&&y(),o(b))}})}function aHe(t){return function(r,n,i){if(r===void 0)throw new Error("Cannot perform HTTP(s) request. URL not known");switch(t){case"arraybuffer":return st({url:r,responseType:"arraybuffer",timeout:n.timeout,connectionTimeout:n.connectionTimeout,cancelSignal:i});case"text":return st({url:r,responseType:"text",timeout:n.timeout,connectionTimeout:n.connectionTimeout,cancelSignal:i});case"document":return st({url:r,responseType:"document",timeout:n.timeout,connectionTimeout:n.connectionTimeout,cancelSignal:i});default:ur(t)}}}function vg({customManifestLoader:t},e){let r=aHe(e);return typeof t!="function"?r:yg(t,r)}u();l();function R0(t){let{referenceDateTime:e}=t,r=t.serverSyncInfos!==void 0?t.serverSyncInfos.serverTimestamp-t.serverSyncInfos.clientTime:void 0;return function(i,a,o,s,d){var I;let{responseData:c}=i,m=a.externalClockOffset,f=(I=i.url)!=null?I:a.originalUrl,p=r!=null?r:m,v={unsafelyBaseOnPreviousManifest:a.unsafeMode?a.previousManifest:null,url:f,referenceDateTime:e,externalClockOffset:p},b=Ee.dashParsers;if(b.wasm===null||b.wasm.status==="uninitialized"||b.wasm.status==="failure")return k.debug("DASH: WASM MPD Parser not initialized. Running JS one."),T();{let E=dHe(c);if(!cHe(E))return k.info("DASH: MPD doesn't seem to be UTF-8-encoded. Running JS parser instead of the WASM one."),T();if(b.wasm.status==="initialized"){k.debug("DASH: Running WASM MPD Parser.");let R=b.wasm.runWasmParser(E,v);return S(R)}else return k.debug("DASH: Awaiting WASM initialization before parsing the MPD."),b.wasm.waitForInitialization().catch(()=>{}).then(()=>{if(b.wasm===null||b.wasm.status!=="initialized")return k.warn("DASH: WASM MPD parser initialization failed. Running JS parser instead"),T();k.debug("DASH: Running WASM MPD Parser.");let M=b.wasm.runWasmParser(E,v);return S(M)})}function T(){if(b.fastJs!==null){let E=uHe(c),R=b.fastJs(E,v);return S(R)}else if(b.native!==null){let E=lHe(c),R=b.native(E,v);return S(R)}else throw new Error("No MPD parser is imported")}function S(E){if(E.type==="done"){if(E.value.warnings.length>0&&o(E.value.warnings),s.isCancelled())return Promise.reject(s.cancellationError);let C=[];return{manifest:new Xi(E.value.parsed,t,C),url:f,warnings:C}}let{value:R}=E,M=R.urls.map(C=>d(()=>{let A=Q.getCurrent().DEFAULT_REQUEST_TIMEOUT,x=Q.getCurrent().DEFAULT_CONNECTION_TIMEOUT;return R.format==="string"?st({url:C,responseType:"text",timeout:A,connectionTimeout:x,cancelSignal:s}):st({url:C,responseType:"arraybuffer",timeout:A,connectionTimeout:x,cancelSignal:s})}).then(A=>{if(R.format==="string"){if(typeof A.responseData!="string")throw new Error("External DASH resources should have been a string");return le(A,{responseData:{success:!0,data:A.responseData}})}else{if(!(A.responseData instanceof ArrayBuffer))throw new Error("External DASH resources should have been ArrayBuffers");return le(A,{responseData:{success:!0,data:A.responseData}})}},A=>{let x=er(A,{defaultCode:"PIPELINE_PARSE_ERROR",defaultReason:"An unknown error occured when parsing ressources."});return le({},{size:void 0,requestDuration:void 0,responseData:{success:!1,error:x}})}));return Promise.all(M).then(C=>R.format==="string"?(oHe(C),S(R.continue(C))):(sHe(C),S(R.continue(C))))}}}function oHe(t){g.CURRENT_ENV!==g.PRODUCTION&&t.forEach(e=>{let{responseData:r}=e;if(!(r.success&&typeof r.data=="string")&&r.success)throw new Error("Invalid data given to the LoadedRessource")})}function sHe(t){g.CURRENT_ENV!==g.PRODUCTION&&t.forEach(e=>{let{responseData:r}=e;if(!(r.success&&r.data instanceof ArrayBuffer)&&r.success)throw new Error("Invalid data given to the LoadedRessource")})}function uHe(t){if(t instanceof ArrayBuffer)return lr(new Uint8Array(t));if(typeof t=="string")return t;if(t instanceof Document)return t.documentElement.outerHTML;throw new Error("DASH Manifest Parser: Unrecognized Manifest format")}function lHe(t){if(t instanceof ArrayBuffer)return new DOMParser().parseFromString(lr(new Uint8Array(t)),"text/xml");if(typeof t=="string")return new DOMParser().parseFromString(t,"text/xml");if(t instanceof Document)return t;throw new Error("DASH Manifest Parser: Unrecognized Manifest format")}function dHe(t){if(t instanceof ArrayBuffer)return t;if(typeof t=="string")return Rt(t).buffer;if(t instanceof Document)return Rt(t.documentElement.innerHTML).buffer;throw new Error("DASH Manifest Parser: Unrecognized Manifest format")}function cHe(t){let e=new DataView(t);return e.getUint16(0)===61371&&e.getUint8(2)===191?!0:!(e.getUint16(0)===65279||e.getUint16(0)===65534)}u();l();u();l();function Kr([t,e]){return e===1/0?`bytes=${t}-`:`bytes=${t}-${e}`}u();l();function _i(t,e){if(t==="audio"||t==="video")return e==="video/mp4"||e==="audio/mp4"?"mp4":e==="video/webm"||e==="audio/webm"?"webm":void 0;if(t==="text")return e==="application/mp4"?"mp4":void 0}u();l();u();l();function ns(t,e){if(e){if(Zi(t,1718909296)<0)throw new Jt("INTEGRITY_ERROR","Incomplete `ftyp` box");if(Zi(t,1836019574)<0)throw new Jt("INTEGRITY_ERROR","Incomplete `moov` box")}else{if(Zi(t,1836019558)<0)throw new Jt("INTEGRITY_ERROR","Incomplete `moof` box");if(Zi(t,1835295092)<0)throw new Jt("INTEGRITY_ERROR","Incomplete `mdat` box")}}function bg(t){return(e,r,n,i,a)=>{return new Promise((s,d)=>{let c=new X,m=c.linkToSignal(i);c.signal.register(d),t(e,r,n,c.signal,nt(je({},a),{onNewChunk(p){try{o(p),a.onNewChunk(p)}catch(y){f(),c.cancel(),d(y)}}})).then(p=>{if(f(),!c.isUsed()){if(p.resultType==="segment-loaded")try{o(p.resultData.responseData)}catch(y){d(y);return}s(p)}},p=>{f(),d(p)});function f(){c.signal.deregister(d),m()}});function o(s){!(s instanceof ArrayBuffer)&&!(s instanceof Uint8Array)||_i(r.type,r.mimeType)!=="mp4"||ns(new Uint8Array(s),r.segment.isInit)}}}u();l();function Sg(t,e){return t===null?null:e.url===null?t.baseUrl:Gd(t.baseUrl,e.url)}u();l();function Ig(t,e,r,n,i){if(e.range===void 0)return st({url:t,responseType:"arraybuffer",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:n,onProgress:i.onProgress}).then(s=>({resultType:"segment-loaded",resultData:s}));if(e.indexRange===void 0)return st({url:t,headers:{Range:Kr(e.range)},responseType:"arraybuffer",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:n,onProgress:i.onProgress}).then(s=>({resultType:"segment-loaded",resultData:s}));if(e.range[1]+1===e.indexRange[0])return st({url:t,headers:{Range:Kr([e.range[0],e.indexRange[1]])},responseType:"arraybuffer",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:n,onProgress:i.onProgress}).then(s=>({resultType:"segment-loaded",resultData:s}));let a=st({url:t,headers:{Range:Kr(e.range)},responseType:"arraybuffer",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:n,onProgress:i.onProgress}),o=st({url:t,headers:{Range:Kr(e.indexRange)},responseType:"arraybuffer",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:n,onProgress:i.onProgress});return Promise.all([a,o]).then(([s,d])=>{let c=_e(new Uint8Array(s.responseData),new Uint8Array(d.responseData)),m=Math.min(s.sendingTime,d.sendingTime),f=Math.max(s.receivedTime,d.receivedTime);return{resultType:"segment-loaded",resultData:{url:t,responseData:c,size:s.size+d.size,requestDuration:f-m,sendingTime:m,receivedTime:f}}})}u();l();function Tg(t,e,r,n,i){let{segment:a}=e,o=a.range!==void 0?{Range:Kr(a.range)}:void 0,s=null;function d(c){let m=new Uint8Array(c.chunk),f=s!==null?_e(s,m):m,p=oI(f),y=p[0];s=p[1],!(y!==null&&(y.forEach(v=>{n.onNewChunk(v)}),i.isCancelled()))&&(n.onProgress({duration:c.duration,size:c.size,totalSize:c.totalSize}),i.isCancelled())}return qS({url:t,headers:o,onData:d,timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:i}).then(c=>({resultType:"chunk-complete",resultData:c}))}function UJ(t,e,r,n,i,a){if(e.segment.isInit)return Ig(t,e.segment,n,a,i);let o=_i(e.type,e.mimeType);if(r&&(o==="mp4"||o===void 0)){if(Gm())return Tg(t,e,n,i,a);La("DASH: Your browser does not have the fetch API. You will have a higher chance of rebuffering when playing close to the live edge")}let{segment:s}=e;return st({url:t,responseType:"arraybuffer",headers:s.range!==void 0?{Range:Kr(s.range)}:void 0,timeout:n.timeout,connectionTimeout:n.connectionTimeout,cancelSignal:a,onProgress:i.onProgress}).then(d=>({resultType:"segment-loaded",resultData:d}))}function M0({lowLatencyMode:t,segmentLoader:e,checkMediaSegmentIntegrity:r}){return r!==!0?n:bg(n);function n(i,a,o,s,d){let c=Sg(i,a.segment);return c===null?Promise.resolve({resultType:"segment-created",resultData:null}):t||e===void 0?UJ(c,a,t,o,d,s):new Promise((m,f)=>{let p=!1,S={reject:C=>{var D,F;if(p||s.isCancelled())return;p=!0,s.deregister(M);let A=C,x=(D=A==null?void 0:A.message)!=null?D:"Unknown error when fetching a DASH segment through a custom segmentLoader.",O=new Wn(x,(F=A==null?void 0:A.canRetry)!=null?F:!1,A==null?void 0:A.xhr);f(O)},resolve:C=>{p||s.isCancelled()||(p=!0,s.deregister(M),m({resultType:"segment-loaded",resultData:{responseData:C.data,size:C.size,requestDuration:C.duration}}))},progress:C=>{p||s.isCancelled()||d.onProgress({duration:C.duration,size:C.size,totalSize:C.totalSize})},fallback:()=>{p||s.isCancelled()||(p=!0,s.deregister(M),UJ(c,a,t,o,d,s).then(m,f))}},I;a.segment.range!==void 0&&(I=[a.segment.range],a.segment.indexRange!==void 0&&I.push(a.segment.indexRange));let E={isInit:a.segment.isInit,timeout:o.timeout,byteRanges:I,trackType:a.type,url:c},R=e(E,S);s.register(M);function M(C){p||(p=!0,typeof R=="function"&&R(),f(C))}})}}u();l();u();l();u();l();var w0=408125543,FJ=357149030,fHe=2807729,mHe=17545,pHe=475249515,gHe=187,hHe=179,yHe=183,vHe=241;function is(t,e,r,[n,i]){let a=n;for(;a0){for(let b=0;b=Math.pow(2,8-r))return r}function SHe(t,e){let r=KJ(t,e);if(r===void 0)return k.warn("webm: unrepresentable length"),null;if(e+r>t.length)return k.warn("webm: impossible length"),null;let n=0;for(let i=0;it.length)return k.warn("webm: impossible length"),null;let n=(t[e]&(1<<8-r)-1)*Math.pow(2,(r-1)*8);for(let i=1;i=a)return!0}return!1}function A0(t,e){if(t.length===0)return;let{manifestRefreshEventsFromEMSGs:r,EMSGs:n}=t.reduce((o,s)=>(s.schemeIdUri==="urn:mpeg:dash:event:2012"&&s.value==="1"?(o.manifestRefreshEventsFromEMSGs===void 0&&(o.manifestRefreshEventsFromEMSGs=[]),o.manifestRefreshEventsFromEMSGs.push(s)):(o.EMSGs===void 0&&(o.EMSGs=[]),o.EMSGs.push(s)),o),{manifestRefreshEventsFromEMSGs:void 0,EMSGs:void 0}),i=n==null?void 0:n.map(o=>({type:"emsg",value:o})),a=e===void 0||r===void 0?!1:EHe(r,e);return{inbandEvents:i,needsManifestRefresh:a}}function P0({__priv_patchLastSegmentInSidx:t}){return function(r,n,i){var E,R;let{segment:a,periodStart:o,periodEnd:s}=n,{data:d,isChunked:c}=r,m=[o,s];if(d===null)return a.isInit?{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0}:{segmentType:"media",chunkData:null,chunkSize:0,chunkInfos:null,chunkOffset:0,protectionData:[],appendWindow:m};let f=d instanceof Uint8Array?d:new Uint8Array(d),p=_i(n.type,n.mimeType),y=p==="mp4"||p===void 0,v=[];if(y){let M=sI(f),C;a.isInit&&(C=(E=IZ(f))!=null?E:void 0),(M.length>0||C!==void 0)&&v.push({initDataType:"cenc",keyId:C,initData:M})}if(!a.isInit){let M=y?kg(f,c,a,i):null,C=(R=a.timestampOffset)!=null?R:0;if(y){let A=SZ(f);if(A!==void 0){let x=A.filter(D=>a.privateInfos===void 0||a.privateInfos.isEMSGWhitelisted===void 0?!1:a.privateInfos.isEMSGWhitelisted(D)),O=A0(x,n.manifestPublishTime);if(O!==void 0){let{needsManifestRefresh:D,inbandEvents:F}=O;return{segmentType:"media",chunkData:f,chunkSize:f.length,chunkInfos:M,chunkOffset:C,appendWindow:m,inbandEvents:F,protectionData:v,needsManifestRefresh:D}}}}return{segmentType:"media",chunkData:f,chunkSize:f.length,chunkInfos:M,chunkOffset:C,protectionData:v,appendWindow:m}}let{indexRange:b}=a,T;if(p==="webm")T=x0(f,0);else if(y&&(T=lp(f,Array.isArray(b)?b[0]:0),t===!0&&T!==null&&T.length>0)){let M=T[T.length-1];Array.isArray(M.range)&&(M.range[1]=1/0)}let S;y?S=cp(f):p==="webm"&&(S=DI(f,0));let I=w(S)?void 0:S;return{segmentType:"init",initializationData:f,initializationDataSize:f.length,protectionData:v,initTimescale:I,segmentList:T!=null?T:void 0}}}u();l();function O0({lowLatencyMode:t,checkMediaSegmentIntegrity:e}){return e!==!0?r:bg(r);function r(n,i,a,o,s){let{segment:d}=i,{range:c}=d,m=Sg(n,d);if(m===null)return Promise.resolve({resultType:"segment-created",resultData:null});if(d.isInit)return Ig(m,d,a,o,s);let f=_i(i.type,i.mimeType),p=f==="mp4"||f===void 0;if(t&&p){if(Gm())return Tg(m,i,a,s,o);La("DASH: Your browser does not have the fetch API. You will have a higher chance of rebuffering when playing close to the live edge")}return p?st({url:m,responseType:"arraybuffer",headers:Array.isArray(c)?{Range:Kr(c)}:null,timeout:a.timeout,connectionTimeout:a.connectionTimeout,onProgress:s.onProgress,cancelSignal:o}).then(y=>({resultType:"segment-loaded",resultData:y})):st({url:m,responseType:"text",headers:Array.isArray(c)?{Range:Kr(c)}:null,timeout:a.timeout,connectionTimeout:a.connectionTimeout,onProgress:s.onProgress,cancelSignal:o}).then(y=>({resultType:"segment-loaded",resultData:y}))}}u();l();u();l();function _He(t){let e=sp(t);return e===null?"":lr(e)}function RHe(t){if(t===void 0)throw new Error("Cannot parse subtitles: unknown format");switch(t.toLowerCase()){case"stpp":case"stpp.ttml.im1t":return"ttml";case"wvtt":return"vtt"}throw new Error(`The codec used for the subtitles "${t}" is not managed yet.`)}function MHe(t,e){switch(e){case"application/ttml+xml":return"ttml";case"application/x-sami":case"application/smil":return"sami";case"text/vtt":return"vtt"}if(t!==void 0&&t.toLowerCase()==="srt")return"srt";throw new Error(`could not find a text-track parser for the type ${e!=null?e:""}`)}function zJ({segment:t,language:e,codecs:r},n,i,a){if(t.isInit)return null;let o,s;i===null?a?(o=t.time,s=t.end):k.warn("Transport: Unavailable time data for current text track."):(o=i.time,i.duration!==void 0?s=o+i.duration:!a&&t.complete&&(s=o+t.duration));let d=RHe(r);return{data:_He(n),type:d,language:e,start:o,end:s}}function jJ(t,e,r){let{segment:n}=t;if(n.isInit)return null;let i,a;r?k.warn("Transport: Unavailable time data for current text track."):(i=n.time,n.complete&&(a=n.time+n.duration));let o=MHe(t.codecs,t.mimeType);return{data:e,type:o,language:t.language,start:i,end:a}}function CHe(t,e,r,n,i){var p;let{segment:a}=r,{isInit:o,indexRange:s}=a,d;if(typeof t=="string"?d=Rt(t):t instanceof Uint8Array?d=t:d=new Uint8Array(t),o){let y=lp(d,Array.isArray(s)?s[0]:0);if(i===!0&&y!==null&&y.length>0){let b=y[y.length-1];Array.isArray(b.range)&&(b.range[1]=1/0)}let v=cp(d);return{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:v,segmentList:y!=null?y:void 0}}let c=kg(d,e,a,n),m=zJ(r,d,c,e),f=(p=a.timestampOffset)!=null?p:0;return{segmentType:"media",chunkData:m,chunkSize:d.length,chunkInfos:c,chunkOffset:f,protectionData:[],appendWindow:[r.periodStart,r.periodEnd]}}function wHe(t,e,r){let{periodStart:n,periodEnd:i,segment:a}=r,{timestampOffset:o=0}=a;if(a.isInit)return{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0};let s,d;if(typeof t!="string"){let m=t instanceof Uint8Array?t:new Uint8Array(t);s=lr(m),d=m.length}else s=t;return{segmentType:"media",chunkData:jJ(r,s,e),chunkSize:d,chunkInfos:null,chunkOffset:o,protectionData:[],appendWindow:[n,i]}}function L0({__priv_patchLastSegmentInSidx:t}){return function(r,n,i){var f;let{periodStart:a,periodEnd:o,segment:s}=n,{data:d,isChunked:c}=r;if(d===null)return s.isInit?{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0}:{segmentType:"media",chunkData:null,chunkSize:0,chunkInfos:null,chunkOffset:(f=s.timestampOffset)!=null?f:0,protectionData:[],appendWindow:[a,o]};let m=_i(n.type,n.mimeType);if(m==="webm")throw new Error("Text tracks with a WEBM container are not yet handled.");return m==="mp4"?CHe(d,c,n,i,t):wHe(d,c,n)}}function VJ(t){let e=vg({customManifestLoader:t.manifestLoader},xHe()?"text":"arraybuffer"),r=R0(t),n=M0(t),i=P0(t),a=O0(t),o=L0(t);return{manifest:{loadManifest:e,parseManifest:r},audio:{loadSegment:n,parseSegment:i},video:{loadSegment:n,parseSegment:i},text:{loadSegment:a,parseSegment:o}}}function xHe(){return Ee.dashParsers.wasm!==null&&(Ee.dashParsers.wasm.status==="initialized"||Ee.dashParsers.wasm.status==="initializing")}var qI=VJ;function N0(t){t.transports.dash===void 0&&(t.transports.dash=qI),t.dashParsers.native=BJ,t.mainThreadMediaSourceInit=Ha,t.codecSupportProber=Xo}u();l();u();l();u();l();u();l();u();l();function vt(t,{textContent:e,className:r}={}){let n=document.createElement(t);return r!==void 0&&(n.className=r),e!==void 0&&(n.textContent=e),n}function as(t,e,{className:r}={}){let n=document.createElement(t);r!==void 0&&(n.className=r);for(let i of e)typeof i=="string"?n.appendChild(document.createTextNode(i)):n.appendChild(i);return n}function Eg(t){return t.clientHeight>400}function un(t){let e=vt("span",{textContent:t+"/"});return e.style.fontWeight="bold",e}function BI(){let t=vt("canvas");return t.style.border="1px solid white",t.style.height="15px",t.style.marginLeft="2px",t}function D0(t,e,r){let n=vt("div"),i=vt("div"),a=vt("div");s();let o=setInterval(()=>{s()},1e3);return r.register(()=>{clearInterval(o)}),as("div",[n,i,a]);function s(){var c,m,f,p,y,v;let d=t.getVideoElement();if(d===null){n.innerHTML="",i.innerHTML="",a.innerHTML="",clearInterval(o);return}else{let b=t.getPosition(),T=t.getCurrentBufferGap(),S=T===1/0?"0":T.toFixed(2),I=[["ct",b.toFixed(2)],["bg",S],["rs",String(d.readyState)],["pr",String(d.playbackRate)],["sp",String(t.getPlaybackRate())],["pa",String(d.paused?1:0)],["en",String(d.ended?1:0)],["li",String(t.isLive()?1:0)],["wba",String(t.getWantedBufferAhead())],["st",`"${t.getPlayerState()}"`]];((c=t.getCurrentModeInformation())==null?void 0:c.useWorker)===!0?DS?I.push(["wo","2"]):I.push(["wo","1"]):I.push(["wo","0"]);let E=[],R=t.getKeySystemConfiguration();R!==null&&E.push(["ks",R.keySystem]);let M=t.getMaxBufferBehind();M!==1/0&&E.push(["mbb",String(M)]);let C=t.getMaxBufferAhead();C!==1/0&&E.push(["mba",String(C)]);let A=t.getMaxVideoBufferSize();A!==1/0&&E.push(["mbs",String(A)]);let x=t.getMinimumPosition();x!==null&&(I.push(["mip",x.toFixed(2)]),E.push(["dmi",(b-x).toFixed(2)]));let O=t.getMaximumPosition();O!==null&&(I.push(["map",O.toFixed(2)]),E.push(["dma",(O-b).toFixed(2)]));let D=[],F=t.getError();F!==null&&D.push(["er",`"${String(F)}"`]),n.innerHTML="";for(let K of[I,E,D])if(K.length>0){let P=vt("div");for(let L of K)P.appendChild(un(L[0])),P.appendChild(vt("span",{textContent:L[1]+" "}));n.appendChild(P)}if(Eg(e)){let K=(m=t.getContentUrls())==null?void 0:m[0];if(K!==void 0){let P=K.length>100?K.substring(0,99)+"\u2026":K;n.appendChild(as("div",[un("url"),vt("span",{textContent:P})]))}}}if(Eg(e)){let b=t.getAvailableVideoTracks().map(({id:M,active:C})=>C?`*${M}`:M),T=t.getAvailableAudioTracks().map(({id:M,active:C})=>C?`*${M}`:M),S=t.getAvailableTextTracks().map(({id:M,active:C})=>C?`*${M}`:M);if(i.innerHTML="",b.length>0){let M=`${b.length}:${b.join(" ")} `;M.length>100&&(M=M.substring(0,98)+"\u2026 ");let C=as("div",[un("vt"),vt("span",{textContent:M})]);i.appendChild(C)}if(T.length>0){let M=`${T.length}:${T.join(" ")} `;M.length>100&&(M=M.substring(0,98)+"\u2026 ");let C=as("div",[un("at"),vt("span",{textContent:M})]);i.appendChild(C)}if(S.length>0){let M=`${S.length}:${S.join(" ")} `;M.length>100&&(M=M.substring(0,98)+"\u2026 ");let C=as("div",[un("tt"),vt("span",{textContent:M})]);i.appendChild(C)}let I=t.__priv_getCurrentAdaptation(),E=(p=(f=I==null?void 0:I.video)==null?void 0:f.representations.map(M=>{var C;return String((C=M.bitrate)!=null?C:"N/A")+(M.isSupported!==!1?"":" U!")+(M.decipherable!==!1?"":" E!")}))!=null?p:[],R=(v=(y=I==null?void 0:I.audio)==null?void 0:y.representations.map(M=>{var C;return String((C=M.bitrate)!=null?C:"N/A")+(M.isSupported!==!1?"":" U!")+(M.decipherable!==!1?"":" E!")}))!=null?v:[];a.innerHTML="",E.length>0&&(a.appendChild(un("vb")),a.appendChild(vt("span",{textContent:E.join(" ")+" "}))),R.length>0&&(a.appendChild(un("ab")),a.appendChild(vt("span",{textContent:R.join(" ")+" "})))}else i.innerHTML="",a.innerHTML=""}}u();l();u();l();var GJ=["#2ab7ca","#fed766","#4dd248","#a22c28","#556b2f","#add8e6","#90ee90","#444444","#40bfc1","#57557e","#fbe555"],_g=class{constructor(e){this._colorMap=new Map,this._currNbColors=0,this._canvasElt=e,this._canvasCtxt=this._canvasElt.getContext("2d"),this.clear()}clear(){this._canvasCtxt!==null&&this._canvasCtxt.clearRect(0,0,this._canvasElt.width,this._canvasElt.height)}update(e){var p,y,v,b;let r=new Set;if(e.inventory.forEach(T=>{r.add(T.infos.representation.uniqueId)}),this._colorMap.forEach(T=>{r.has(T)||this._colorMap.delete(T)}),this._canvasCtxt===null)return;let{inventory:n,currentTime:i,width:a,height:o}=e;this._canvasElt.style.width=`${a}px`,this._canvasElt.style.height=`${o}px`,this._canvasElt.width=a,this._canvasElt.height=o,this.clear();let s;e.minimumPosition!==void 0?n.length>0?s=Math.min(e.minimumPosition,n[0].start):s=e.minimumPosition:s=(y=(p=n[0])==null?void 0:p.start)!=null?y:0;let d;e.maximumPosition!==void 0?n.length>0?d=Math.max(e.maximumPosition,n[n.length-1].end):d=e.maximumPosition:d=(b=(v=n[n.length-1])==null?void 0:v.end)!=null?b:1e3,s=Math.min(i,s),d=Math.max(i,d);let c,m;if(d-s>1800?d-i<1800/2?(m=d,c=d-1800):i-s<1800/2?(c=s,m=s+1800):(c=i-1800/2,m=i+1800/2):(c=s,m=d),c>=m){this.clear();return}let f=PHe(n,c,m);for(let T of f)this._paintRange(T,a,o);i!==void 0&&AHe(i,c,m,this._canvasCtxt,a,o)}_paintRange(e,r,n){if(this._canvasCtxt===null)return;let i=e.scaledStart*r,a=e.scaledEnd*r;this._canvasCtxt.fillStyle=this._getColorForRepresentation(e.info.infos.representation),this._canvasCtxt.fillRect(Math.ceil(i),0,Math.ceil(a-i),n)}_getColorForRepresentation(e){let r=this._colorMap.get(e.uniqueId);if(r!==void 0)return r;let n=GJ[this._currNbColors%GJ.length];return this._currNbColors++,this._colorMap.set(e.uniqueId,n),n}};function AHe(t,e,r,n,i,a){if(typeof t=="number"&&t>=e&&te&&d{clearInterval(f)});let p=null;return t.__priv_getSegmentSinkMetrics().then(b=>{p=b!=null?b:null}).catch(()=>{}),a.appendChild(o),a.appendChild(s),a.appendChild(d),a.appendChild(c),a.style.padding="5px 0px",y(),a;function y(){if(t.getVideoElement()===null){a.style.display="none",a.innerHTML="",clearInterval(f);return}t.__priv_getSegmentSinkMetrics().then(b=>{p=b!=null?b:null,v()}).catch(()=>{})}function v(){var S,I,E,R;let b=Eg(n),T=p==null?void 0:p.segmentSinks[e].segmentInventory;if(p===null||T===void 0)a.style.display="none",d.innerHTML="",c.innerHTML="";else{a.style.display="block";let M=t.getPosition(),C=Math.min(n.clientWidth-150,600);if(m.update({currentTime:M,minimumPosition:(S=t.getMinimumPosition())!=null?S:void 0,maximumPosition:(I=t.getMaximumPosition())!=null?I:void 0,inventory:T,width:C,height:10}),!b){d.innerHTML="",c.innerHTML="";return}d.innerHTML="";for(let D of T){let{bufferedStart:F,bufferedEnd:K,infos:P}=D;if(F!==void 0&&K!==void 0&&M>=F&&M0&&(y+=`c:"${p.join(" / ")}" `),r!==void 0&&(y+=`l:"${r}" `),s==="video"&&typeof o=="boolean"&&(y+=`si:${o?1:0} `),s==="video"&&typeof a=="boolean"&&(y+=`tm:${a?1:0} `),s==="audio"&&typeof n=="boolean"&&(y+=`ad:${n?1:0} `),s==="text"&&typeof i=="boolean"&&(y+=`cc:${i?1:0} `),y+=`p:${e.start}-${(v=e.end)!=null?v:"?"}`,y}u();l();u();l();var $J=3e4,OHe=20,Mg=class{constructor(e){this._canvasElt=e,this._canvasCtxt=this._canvasElt.getContext("2d"),this._history=[]}pushBufferSize(e){let r=re();if(this._history.push({timestamp:r,bufferSize:e}),this._history.length>0){let n=r-$J,i;for(i=this._history.length-1;i>=1&&!(this._history[i].timestamp<=n);i--);this._history=this._history.slice(i)}else this._history=[]}clear(){this._canvasCtxt!==null&&this._canvasCtxt.clearRect(0,0,this._canvasElt.width,this._canvasElt.height)}reRender(e,r){this._canvasElt.style.width=`${e}px`,this._canvasElt.style.height=`${r}px`,this._canvasElt.width=e,this._canvasElt.height=r,this.clear();let n=this._history,i=this._canvasCtxt;if(n.length===0)return;let a=c(),o=n[0].timestamp,s=r/a,d=e/$J;m();function c(){let y=Math.max(...n.map(v=>v.bufferSize));return Math.max(y+5,OHe)}function m(){if(i!==null){i.beginPath(),i.fillStyle="rgb(200, 100, 200)";for(let y=1;y{clearInterval(s)}),n.appendChild(i),n.appendChild(a),n.style.padding="7px 0px",d(),n;function d(){if(t.getVideoElement()===null){n.innerHTML="",clearInterval(s);return}let c=t.getCurrentBufferGap();c===1/0?o.pushBufferSize(0):o.pushBufferSize(c);let m=Math.min(e.clientWidth-150,600);o.reRender(m,10)}}function B0(t,e,r){let n=vt("div",{textContent:"RxPlayer Debug Information"});n.style.fontWeight="bold",n.style.borderBottom="1px solid white",n.style.marginBottom="5px",n.style.fontStyle="italic";let i=as("div",[n,D0(e,t,r),Rg(e,"video","vbuf",t,r),Rg(e,"audio","abuf",t,r),Rg(e,"text","tbuf",t,r),q0(e,t,r)]);i.style.backgroundColor="#00000099",i.style.padding="7px",i.style.fontSize="13px",i.style.fontFamily="mono, monospace",i.style.color="white",i.style.display="inline-block",i.style.bottom="0px",t.appendChild(i),r.register(()=>{t.removeChild(i)})}var YJ=B0;function U0(t){t.createDebugElement=YJ}u();l();u();l();var Cg=class extends ts{constructor(e){super(),this._settings=e,this._initCanceller=new X}prepare(){}start(e,r){let n=this._initCanceller.signal,{keySystems:i,speed:a,url:o}=this._settings;Vd(e);let s=new oe(null);s.finish();let d=ng(e,i,s,{onError:m=>this._onFatalError(m),onWarning:m=>this.trigger("warning",m),onBlackListProtectionData:ye,onKeyIdsCompatibilityUpdate:ye},n);_u(e,m=>this._onFatalError(m),n);let c=new Va(r,null,a);c.addEventListener("stalled",m=>this.trigger("stalled",m)),c.addEventListener("unstalled",()=>this.trigger("unstalled",null)),c.addEventListener("warning",m=>this.trigger("warning",m)),n.register(()=>{c.destroy()}),c.start(),d.onUpdate((m,f)=>{m.initializationState.type!=="uninitialized"&&(f(),k.info("Setting URL to HTMLMediaElement",o),e.src=o,n.register(()=>{k.info("Init: Removing directfile src from media element",e.src),Vd(e)}),m.initializationState.type==="awaiting-media-link"?(m.initializationState.value.isMediaLinked.setValue(!0),d.onUpdate((p,y)=>{p.initializationState.type==="initialized"&&(y(),this._seekAndPlay(e,r))},{emitCurrentValue:!0,clearSignal:n})):(be(m.initializationState.type==="initialized"),this._seekAndPlay(e,r)))},{emitCurrentValue:!0,clearSignal:n})}updateContentUrls(e,r){throw new Error("Cannot update content URL of directfile contents")}dispose(){this._initCanceller.cancel()}_onFatalError(e){this._initCanceller.cancel(),this.trigger("error",e)}_seekAndPlay(e,r){let n=this._initCanceller.signal,{autoPlay:i,startAt:a}=this._settings;ku({mediaElement:e,playbackObserver:r,startTime:()=>{k.debug("Init: Calculating initial time");let s=LHe(e,a);return k.debug("Init: Initial time calculated:",s),s},mustAutoPlay:i,onWarning:s=>this.trigger("warning",s),isDirectfile:!0},n).autoPlayResult.then(()=>Tu(r,e,!0,n).onUpdate((s,d)=>{s&&(d(),this.trigger("loaded",{getSegmentSinkMetrics:null}))},{emitCurrentValue:!0,clearSignal:n})).catch(s=>{n.isCancelled()||this._onFatalError(s)})}};function LHe(t,e){if(w(e))return 0;if(w(e.position))if(w(e.wallClockTime)){if(!w(e.fromFirstPosition))return e.fromFirstPosition}else return e.wallClockTime;else return e.position;let r=t.duration;if(typeof e.fromLastPosition=="number")return w(r)||!isFinite(r)?(k.warn("startAt.fromLastPosition set but no known duration, beginning at 0."),0):Math.max(0,r+e.fromLastPosition);if(typeof e.fromLivePosition=="number"){let n=t.seekable.length>0?t.seekable.end(0):r;return w(n)?(k.warn("startAt.fromLivePosition set but no known live position, beginning at 0."),0):Math.max(0,n+e.fromLivePosition)}else if(!w(e.percentage)){if(w(r)||!isFinite(r))return k.warn("startAt.percentage set but no known duration, beginning at 0."),0;let{percentage:n}=e;if(n>=100)return r;if(n<=0)return 0;let i=+n/100;return r*i}return 0}u();l();u();l();function F0(t,e){for(let r=0;r=t.length?!1:(t[e].enabled=!0,!0)}function Yd(t,e){var r;if(e.length!==t.length)return!0;for(let n=0;n({id:e.id,language:e.language,normalized:e.normalized,audioDescription:e.audioDescription,active:r.enabled,representations:e.representations}))}getAvailableTextTracks(){return this._textTracks.map(({track:e,nativeTrack:r})=>({id:e.id,label:e.label,forced:e.forced,language:e.language,normalized:e.normalized,closedCaption:e.closedCaption,active:r.mode==="showing"}))}getAvailableVideoTracks(){return this._videoTracks.map(({track:e,nativeTrack:r})=>({id:e.id,representations:e.representations,active:r.selected}))}dispose(){this._nativeVideoTracks!==void 0&&(this._nativeVideoTracks.onchange=null,this._nativeVideoTracks.onaddtrack=null,this._nativeVideoTracks.onremovetrack=null),this._nativeAudioTracks!==void 0&&(this._nativeAudioTracks.onchange=null,this._nativeAudioTracks.onaddtrack=null,this._nativeAudioTracks.onremovetrack=null),this._nativeTextTracks!==void 0&&(this._nativeTextTracks.onchange=null,this._nativeTextTracks.onaddtrack=null,this._nativeTextTracks.onremovetrack=null),this.removeEventListener()}_getCurrentAudioTrack(){if(this._nativeAudioTracks!==void 0){for(let e=0;e{var e,r;if(this._nativeAudioTracks!==void 0){let n=K0(this._nativeAudioTracks);if(Yd(this._audioTracks,n)){this._audioTracks=n,this._setPreviouslyLockedAudioTrack(),this.trigger("availableAudioTracksChange",this.getAvailableAudioTracks());let i=this._getCurrentAudioTrack();(i==null?void 0:i.nativeTrack)!==this._lastEmittedNativeAudioTrack&&(this.trigger("audioTrackChange",(e=i==null?void 0:i.track)!=null?e:null),this._lastEmittedNativeAudioTrack=(r=i==null?void 0:i.nativeTrack)!=null?r:null)}}},this._nativeAudioTracks.onremovetrack=()=>{var e,r;if(this._nativeAudioTracks!==void 0){let n=K0(this._nativeAudioTracks);if(Yd(this._audioTracks,n)){this._audioTracks=n,this.trigger("availableAudioTracksChange",this.getAvailableAudioTracks());let i=this._getCurrentAudioTrack();(i==null?void 0:i.nativeTrack)!==this._lastEmittedNativeAudioTrack&&(this.trigger("audioTrackChange",(e=i==null?void 0:i.track)!=null?e:null),this._lastEmittedNativeAudioTrack=(r=i==null?void 0:i.nativeTrack)!=null?r:null)}}},this._nativeAudioTracks.onchange=()=>{if(this._audioTracks!==void 0)for(let e=0;e{var e,r;if(this._nativeTextTracks!==void 0){let n=z0(this._nativeTextTracks);if(Yd(this._textTracks,n)){this._textTracks=n,this._setPreviouslyLockedTextTrack(),this.trigger("availableTextTracksChange",this.getAvailableTextTracks());let i=this._getCurrentTextTrack();(i==null?void 0:i.nativeTrack)!==this._lastEmittedNativeTextTrack&&(this.trigger("textTrackChange",(e=i==null?void 0:i.track)!=null?e:null),this._lastEmittedNativeTextTrack=(r=i==null?void 0:i.nativeTrack)!=null?r:null)}}},this._nativeTextTracks.onremovetrack=()=>{var e,r;if(this._nativeTextTracks!==void 0){let n=z0(this._nativeTextTracks);if(Yd(this._textTracks,n)){this._textTracks=n,this._setPreviouslyLockedTextTrack(),this.trigger("availableTextTracksChange",this.getAvailableTextTracks());let i=this._getCurrentTextTrack();(i==null?void 0:i.nativeTrack)!==this._lastEmittedNativeTextTrack&&(this.trigger("textTrackChange",(e=i==null?void 0:i.track)!=null?e:null),this._lastEmittedNativeTextTrack=(r=i==null?void 0:i.nativeTrack)!=null?r:null)}}},this._nativeTextTracks.onchange=()=>{if(this._textTracks!==void 0)for(let e=0;e{var e,r;if(this._nativeVideoTracks!==void 0){let n=j0(this._nativeVideoTracks);if(Yd(this._videoTracks,n)){this._videoTracks=n,this._setPreviouslyLockedVideoTrack(),this.trigger("availableVideoTracksChange",this.getAvailableVideoTracks());let i=this._getCurrentVideoTrack();(i==null?void 0:i.nativeTrack)!==this._lastEmittedNativeVideoTrack&&(this.trigger("videoTrackChange",(e=i==null?void 0:i.track)!=null?e:null),this._lastEmittedNativeVideoTrack=(r=i==null?void 0:i.nativeTrack)!=null?r:null)}}},this._nativeVideoTracks.onremovetrack=()=>{var e,r;if(this._nativeVideoTracks!==void 0){let n=j0(this._nativeVideoTracks);if(Yd(this._videoTracks,n)){this._videoTracks=n,this._setPreviouslyLockedVideoTrack(),this.trigger("availableVideoTracksChange",this.getAvailableVideoTracks());let i=this._getCurrentVideoTrack();(i==null?void 0:i.nativeTrack)!==this._lastEmittedNativeVideoTrack&&(this.trigger("videoTrackChange",(e=i==null?void 0:i.track)!=null?e:null),this._lastEmittedNativeVideoTrack=(r=i==null?void 0:i.nativeTrack)!=null?r:null)}}},this._nativeVideoTracks.onchange=()=>{if(this._videoTracks!==void 0)for(let e=0;er),e)}};function QJ(t){for(let e=0;e{if(c.length===0){k.error("Compat: Resized but no observed element.");return}let m=c[0],{height:f,width:p}=m.contentRect;(f!==o||p!==s)&&(o=f,s=p,a.setValue({height:f,width:p}))});d.observe(t),r.register(()=>{d.disconnect()})}else{let d=setInterval(()=>{let{height:c,width:m}=t.getBoundingClientRect();(c!==o||m!==s)&&(o=c,s=m,a.setValue({height:c,width:m}))},e);r.register(()=>{clearInterval(d)})}return a}u();l();var xg=class{constructor(){this._ranges=[],this.length=0}insert(e,r){g.CURRENT_ENV===g.DEV&&(be(e>=0,"invalid start time"),be(r-e>0,"invalid end time")),Vo(this._ranges,{start:e,end:r}),this.length=this._ranges.length}remove(e,r){g.CURRENT_ENV===g.DEV&&(be(e>=0,"invalid start time"),be(r-e>0,"invalid end time"));let n=[];e>0&&n.push({start:0,end:e}),r<1/0&&n.push({start:r,end:1/0}),this._ranges=iZ(this._ranges,n),this.length=this._ranges.length}start(e){if(e>=this._ranges.length)throw new Error("INDEX_SIZE_ERROR");return this._ranges[e].start}end(e){if(e>=this._ranges.length)throw new Error("INDEX_SIZE_ERROR");return this._ranges[e].end}};u();l();function W0(t,e,r,n){k.debug("HTSB: Finding parser for html text tracks:",t);let i=Ee.htmlTextTracksParsers[t];if(typeof i!="function")throw new Error("no parser found for the given text track");k.debug("HTSB: Parser found, parsing...");let a=i(e,r,n);return k.debug("HTTB: Parsed successfully!",a.length),a}u();l();u();l();function Xa(t,e,r=.2){return Math.abs(t-e)<=Math.min(r,.2)}var DHe=.05;function JJ(t,e){let r=t.end-t.start,n=e.end-e.start,i=Math.abs(t.start-e.start),a=Math.min(r,n,.2);return i/a<=DHe}function Ag(t,e){for(let r=t.length-1;r>=0;r--)if(t[r].starte)return t.slice(r,t.length);return[]}function $0(t,e,r){let n=Math.max(t.start,e),i=Ag(t.cues,e),a={start:t.start,end:n,cues:i},o=Math.min(r,t.end),s=Qd(t.cues,r),d={start:o,end:t.end,cues:s};return[a,d]}var eee=.001,qHe=5,Pg=class{constructor(){this._cuesBuffer=[]}isEmpty(){return this._cuesBuffer.length===0}get(e){let r=this._cuesBuffer,n=[];for(let i=r.length-1;i>=0;i--){let a=r[i];if(e=a.start){let o=a.cues;for(let s of o)e>=s.start&&e0)for(let s of o)(Xa(e,s.start,eee)||Xa(e,s.end,eee))&&n.push(s.element);return n}}return[]}remove(e,r){g.CURRENT_ENV===g.DEV&&(be(e>=0),be(r>=0),be(r>e));let n=Math.max(e,r),i=this._cuesBuffer;for(let a=0;ae){let o=i[a];if(o.start>=n)return;if(o.end>=n){if(e<=o.start)o.cues=Qd(o.cues,n),o.start=n;else{let[s,d]=$0(o,e,n);this._cuesBuffer[a]=s,i.splice(a+1,0,d)}return}o.start>=e?(i.splice(a,1),a--):(o.cues=Ag(o.cues,e),o.end=Math.max(e,o.start))}}insert(e,r,n){let i=this._cuesBuffer,a={start:r,end:n,cues:e},o=Math.abs(r-n)/qHe;function s(d){let c=i[d];c===void 0||Xa(a.end,c.end,o)?i[d]=a:(c.start>=a.end||(c.cues=Qd(c.cues,a.end),c.start=a.end),i.splice(d,0,a))}for(let d=0;dc.end);s(d);return}else if(rc.end);s(d);return}if(Xa(c.end,n,o)){c.cues=Ag(c.cues,r),c.end=r,i.splice(d+1,0,a);return}else if(c.end>n){let[m,f]=$0(c,r,n);this._cuesBuffer[d]=m,i.splice(d+1,0,a),i.splice(d+2,0,f);return}else{c.cues=Ag(c.cues,r),c.end=r;let m=d+1;for(c=i[m];c!==void 0&&n>c.end;)i.splice(m,1),c=i[m];s(m);return}}}if(i.length){let d=i[i.length-1];Xa(d.end,r,o)&&(d.end=r)}i.push(a)}};u();l();function Y0(t,e,r,n){let i=[e/r.columns,t/r.rows],a=n.getElementsByClassName("proportional-style");for(let o=0;o0}function tee(t,e){try{t.removeChild(e)}catch(r){k.warn("HTD: Can't remove text track: not in the element.")}}function BHe(t){let e=t.getAttribute("data-resolution-rows"),r=t.getAttribute("data-resolution-columns");if(e===null||r===null)return null;let n=parseInt(e,10),i=parseInt(r,10);return n===null||i===null?null:{rows:n,columns:i}}var Og=class{constructor(e,r){k.debug("HTD: Creating HTMLTextDisplayer"),this._buffered=new xg,this._videoElement=e,this._textTrackElement=r,this._sizeUpdateCanceller=new X,this._subtitlesIntervalCanceller=new X,this._buffer=new Pg,this._currentCues=[],this._isAutoRefreshing=!1}pushTextData(e){var b,T;k.debug("HTD: Appending new html text tracks");let{timestampOffset:r,appendWindow:n,chunk:i}=e;if(i===null)return Ii(this._buffered);let{start:a,end:o,data:s,type:d,language:c}=i,m=(b=n[0])!=null?b:0,f=(T=n[1])!=null?T:1/0,p=W0(d,s,r,c);if(m!==0&&f!==1/0){let S=0;for(;S=0&&p[S].start>=f;)S--;for(p.splice(S,p.length),S=p.length-1;S>=0&&p[S].end>f;)p[S].end=f,S--}let y;if(a!==void 0)y=Math.max(m,a);else{if(p.length<=0)return k.warn("HTD: Current text tracks have no cues nor start time. Aborting"),Ii(this._buffered);k.warn("HTD: No start time given. Guessing from cues."),y=p[0].start}let v;if(o!==void 0)v=Math.min(f,o);else{if(p.length<=0)return k.warn("HTD: Current text tracks have no cues nor end time. Aborting"),Ii(this._buffered);k.warn("HTD: No end time given. Guessing from cues."),v=p[p.length-1].end}return v<=y?(k.warn("HTD: Invalid text track appended: ","the start time is inferior or equal to the end time."),Ii(this._buffered)):(this._buffer.insert(p,y,v),this._buffered.insert(y,v),!this._isAutoRefreshing&&!this._buffer.isEmpty()&&this.autoRefreshSubtitles(this._subtitlesIntervalCanceller.signal),Ii(this._buffered))}removeBuffer(e,r){return k.debug("HTD: Removing html text track data",e,r),this._buffer.remove(e,r),this._buffered.remove(e,r),this._isAutoRefreshing&&this._buffer.isEmpty()&&(this.refreshSubtitles(),this._isAutoRefreshing=!1,this._subtitlesIntervalCanceller.cancel(),this._subtitlesIntervalCanceller=new X),Ii(this._buffered)}getBufferedRanges(){return Ii(this._buffered)}reset(){k.debug("HTD: Resetting HTMLTextDisplayer"),this.stop(),this._subtitlesIntervalCanceller=new X}stop(){this._subtitlesIntervalCanceller.isUsed()||(k.debug("HTD: Stopping HTMLTextDisplayer"),this._disableCurrentCues(),this._buffer.remove(0,1/0),this._buffered.remove(0,1/0),this._isAutoRefreshing=!1,this._subtitlesIntervalCanceller.cancel())}_disableCurrentCues(){if(this._sizeUpdateCanceller.cancel(),this._currentCues.length>0){for(let e of this._currentCues)tee(this._textTrackElement,e.element);this._currentCues=[]}}_displayCues(e){if(this._currentCues.length===e.length&&this._currentCues.every((i,a)=>i.element===e[a]))return;this._sizeUpdateCanceller.cancel();for(let i of this._currentCues)tee(this._textTrackElement,i.element);this._currentCues=[];for(let i of e){let a=BHe(i);this._currentCues.push({element:i,resolution:a}),this._textTrackElement.appendChild(i)}let n=this._currentCues.filter(i=>i.resolution!==null);if(n.length>0){this._sizeUpdateCanceller=new X,this._sizeUpdateCanceller.linkToSignal(this._subtitlesIntervalCanceller.signal);let{TEXT_TRACK_SIZE_CHECKS_INTERVAL:i}=Q.getCurrent();G0(this._textTrackElement,i,this._sizeUpdateCanceller.signal).onUpdate(({height:o,width:s})=>{for(let d of n){let{resolution:c,element:m}=d;Y0(o,s,c,m)}},{clearSignal:this._sizeUpdateCanceller.signal,emitCurrentValue:!0})}}autoRefreshSubtitles(e){if(this._isAutoRefreshing||e.isCancelled())return;let r=null,{MAXIMUM_HTML_TEXT_TRACK_UPDATE_INTERVAL:n}=Q.getCurrent(),i=()=>{this._isAutoRefreshing=!1,r!==null&&(r.cancel(),r=null)},a=()=>{i(),this._isAutoRefreshing=!0,r=new X,r.linkToSignal(e);let o=setInterval(()=>this.refreshSubtitles(),n);r.signal.register(()=>{clearInterval(o)}),this.refreshSubtitles()};PX(this._videoElement,()=>{i(),this._disableCurrentCues()},e),OX(this._videoElement,a,e),LX(this._videoElement,a,e),a()}refreshSubtitles(){let{MAXIMUM_HTML_TEXT_TRACK_UPDATE_INTERVAL:e}=Q.getCurrent(),r;this._videoElement.paused||this._videoElement.playbackRate<=0?r=this._videoElement.currentTime:r=Math.max(this._videoElement.currentTime+e/1e3/2,0);let n=this._buffer.get(r);n.length===0?this._disableCurrentCues():this._displayCues(n)}};g.CURRENT_ENV===g.DEV&&(UHe=function(e){function r(n){}});var UHe;var ra=Og;u();l();var FHe=/&#([0-9]+);/g,KHe=/
/gi,zHe=/]*>([\s\S]*?)<\/style[^>]*>/i,jHe=/\s*

]+))?>(.*)/i,VHe=/]+?start="?([0-9]*)"?[^0-9]/i;function HHe(t){let e=/\.(\S+)\s*{([^}]*)}/gi,r={},n=e.exec(t);for(;n!==null;){let i=n[1],a=WHe(n[2],"lang");!w(i)&&!w(a)&&(r[a]=i),n=e.exec(t)}return r}function GHe(t){let r=/p\s*{([^}]*)}/gi.exec(t);return r===null?"":r[1]}function WHe(t,e){let r=new RegExp("\\s*"+e+":\\s*(\\S+);","i").exec(t);return Array.isArray(r)?r[1]:null}function $He(t){return t.replace(FHe,(e,r)=>String.fromCharCode(Number(r)))}function YHe(t,e,r){let n=/]/gi,i=/]|<\/body>/gi,a=[],o=zHe.exec(t),s=Array.isArray(o)?o[1]:"",d,c;i.exec(t);let m=HHe(s),f=GHe(s),p;if(G(r)&&(p=m[r],p===void 0))throw new Error(`sami: could not find lang ${r} in CSS`);for(;d=n.exec(t),c=i.exec(t),!(d===null&&c===null);){if(d===null||c===null||d.index>=c.index)throw new Error("parse error");let v=t.slice(d.index,c.index),b=VHe.exec(v);if(!Array.isArray(b))throw new Error("parse error (sync time attribute)");let T=+b[1];if(isNaN(T))throw new Error("parse error (sync time attribute NaN)");y(v.split(` +`),T/1e3)}return a;function y(v,b){let T=v.length;for(;--T>=0;){let S=jHe.exec(v[T]);if(!Array.isArray(S))continue;let[,I,E]=S;if(p===I)if(E===" ")a[a.length-1].end=b;else{let R=document.createElement("DIV");R.className="rxp-texttrack-region";let M=document.createElement("DIV");M.className="rxp-texttrack-div",M.style.position="absolute",M.style.bottom="0",M.style.width="100%",M.style.color="#fff",M.style.textShadow="-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000";let C=document.createElement("div");C.className="rxp-texttrack-p",G(f)&&(C.style.cssText=f);let A=E.split(KHe);for(let x=0;x0&&(i.length===1?i[0].indexOf("-->")>=0&&e.push(i):(i[1].indexOf("-->")>=0||i[0].indexOf("-->")>=0)&&e.push(i)),r=n}return e}u();l();u();l();function UI(t){let e=t.split(":");if(G(e[2])){let r=parseInt(e[0],10),n=parseInt(e[1],10),i=parseFloat(e[2].replace(",","."));return isNaN(r)||isNaN(n)||isNaN(i)?void 0:r*60*60+n*60+i}}function J0(t,e){if(t.length===0)return null;let r,n,i=[];if(G(t[1])&&t[1].indexOf("-->")!==-1&&([r,n]=t[1].split("-->").map(s=>s.trim()),i=t.slice(2,t.length)),(!G(r)||!G(n))&&([r,n]=t[0].split("-->").map(s=>s.trim()),i=t.slice(1,t.length)),!G(r)||!G(n))return null;let a=UI(r),o=UI(n);return a===void 0||o===void 0?null:{start:a+e,end:o+e,payload:i}}function eO(t,e){let r=t.split(/\r\n|\n|\r/),n=Z0(r),i=[];for(let a=0;a0){let m=document.createTextNode(d[c]);a.appendChild(m)}}else if(s.nodeName==="B"){let d=r(s);d.style.fontWeight="bold",a.appendChild(d)}else if(s.nodeName==="I"){let d=r(s);d.style.fontStyle="italic",a.appendChild(d)}else if(s.nodeName==="U"){let d=r(s);d.style.textDecoration="underline",a.appendChild(d)}else if(ZHe(s)&&typeof s.color=="string"){let d=r(s);d.style.color=s.color,a.appendChild(d)}else{let d=r(s);a.appendChild(d)}}return a};return r(e)}function ZHe(t){return t.nodeName==="FONT"&&"color"in t}function tO(t){t.htmlTextTracksParsers.srt=eO,t.htmlTextDisplayer=ra}u();l();function rO(t){t.htmlTextDisplayer=ra}u();l();u();l();u();l();u();l();u();l();var JHe=/(\d+) (\d+)/;function nO(t){let e=t.getAttribute("ttp:frameRate"),r=t.getAttribute("ttp:subFramRate"),n=t.getAttribute("ttp:tickRate"),i=t.getAttribute("ttp:frameRateMultiplier"),a=t.getAttribute("xml:space"),o=t.getAttribute("ttp:cellResolution"),s={columns:32,rows:15};if(o!==null){let b=JHe.exec(o);if(b===null||b.length<3)k.warn("TTML Parser: Invalid cellResolution");else{let T=parseInt(b[1],10),S=parseInt(b[2],10);isNaN(T)||isNaN(S)?k.warn("TTML Parser: Invalid cellResolution"):s={columns:T,rows:S}}}if(G(a)&&a!=="default"&&a!=="preserve")throw new Error("Invalid spacing style");let d=Number(e);(isNaN(d)||d<=0)&&(d=30);let c=Number(r);(isNaN(c)||c<=0)&&(c=1);let m=Number(n);(isNaN(m)||m<=0)&&(m=void 0);let f=d,p=c!=null?c:1,y=a!=null?a:"default",v=m!=null?m:d*c;if(i!==null){let b=/^(\d+) (\d+)$/g.exec(i);if(b!==null){let T=Number(b[1]),S=Number(b[2]),I=T/S;f=d*I}}return{cellResolution:s,tickRate:v,frameRate:f,subFrameRate:p,spaceStyle:y}}u();l();function Pu(t,e,r,n){let i={},a=t.slice();for(let o=0;o<=e.length-1;o++){let s=e[o];if(s!==void 0){let d,c;if(s.nodeType===Node.ELEMENT_NODE){let m=s;for(let f=0;f<=m.attributes.length-1;f++){let p=m.attributes[f],y=p.name;if(y==="style")d=p.value;else if(y==="region")c=p.value;else{let v=y.substring(4);if(ve(a,v)&&(i[v]=p.value,a.splice(f,1),a.length===0))return i}}}if(G(d)){let m=ce(r,f=>f.id===d);if(m!==void 0)for(let f=0;f<=a.length-1;f++){let p=a[f];if(!G(i[p])&&G(m.style[p])){if(i[p]=m.style[p],a.splice(f,1),a.length===0)return i;f--}}}if(G(c)){let m=ce(n,f=>f.id===c);if(m!==void 0)for(let f=0;f<=a.length-1;f++){let p=a[f];if(!G(i[p])&&G(m.style[p])){if(i[p]=m.style[p],a.splice(f,1),a.length===0)return i;f--}}}}}return i}function iO(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};let e=t,r={};for(let n=0;n<=e.attributes.length-1;n++){let i=e.attributes[n];if(on(i.name,"tts")){let a=i.name.substring(4);r[a]=i.value}}return r}u();l();function aO(t){let e=[];function r(n,i){e.push(i);for(let a=0;ad.id===o);if(s<0)k.warn("TTML Parser: unknown style inheritance: "+o);else{let d=t[s];ve(e,s)?k.warn("TTML Parser: infinite style inheritance loop avoided"):r(d,s),n.style=le({},d.style,n.style)}}n.extendsStyles.length=0}for(let n=0;n0&&(e=r)}return e}function iee(t){let e=t.getElementsByTagName("body");if(e.length>0)return e[0];let r=t.getElementsByTagName("tt:body");return r.length>0?r[0]:null}function aee(t){let e=t.getElementsByTagName("style");if(e.length>0)return e;let r=t.getElementsByTagName("tt:style");return r.length>0?r:e}function oee(t){let e=t.getElementsByTagName("region");if(e.length>0)return e;let r=t.getElementsByTagName("tt:region");return r.length>0?r:e}function see(t){let e=t.getElementsByTagName("p");if(e.length>0)return e;let r=t.getElementsByTagName("tt:p");return r.length>0?r:e}function uee(t){return t.nodeName==="br"||t.nodeName==="tt:br"}function lee(t){return t.nodeName==="span"||t.nodeName==="tt:span"}var dee=["align","backgroundColor","color","direction","display","displayAlign","extent","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","opacity","origin","overflow","padding","textAlign","textDecoration","textOutline","unicodeBidi","visibility","wrapOption","writingMode"];function oO(t,e){let r=[],n=new DOMParser().parseFromString(t,"text/xml");if(n!=null){let a=n.getElementsByTagName("tt")[0];if(a===void 0&&(a=n.getElementsByTagNameNS("*","tt")[0],a===void 0))throw new Error("invalid XML");let o=iee(a),s=aee(a),d=oee(a),c=see(a),m=nO(a),f=[];for(let T=0;T<=s.length-1;T++){let S=s[T];if(S instanceof Element){let I=S.getAttribute("xml:id");if(I!==null){let E=S.getAttribute("style"),R=E===null?[]:E.split(" ");f.push({id:I,style:iO(S),extendsStyles:R})}}}aO(f);let p=[];for(let T=0;T<=d.length-1;T++){let S=d[T];if(S instanceof Element){let I=S.getAttribute("xml:id");if(I!==null){let E=iO(S),R=S.getAttribute("style");if(G(R)){let M=ce(f,C=>C.id===R);M!==void 0&&(E=le({},M.style,E))}p.push({id:I,style:E,extendsStyles:[]})}}}let y=Pu(dee,o!==null?[o]:[],f,p),b=(o!==null?o.getAttribute("xml:space"):void 0)==="default"||m.spaceStyle==="default";for(let T=0;T0){let v=y.getAttribute("xml:space"),b=G(v)?v==="default":c,T=le({},s,Pu(i8e,[y],r,e));f.push(...a(y,T,[y,...d],b))}}return f}return a(t,le({},n),[],i)}function IO(t,e,r,n,i,{cellResolution:a,shouldTrimWhiteSpace:o}){let s=FI(t),d=document.createElement("DIV");if(d.className="rxp-texttrack-region",d.setAttribute("data-resolution-columns",String(a.columns)),d.setAttribute("data-resolution-rows",String(a.rows)),o8e(d,i),e!==null){let{bodyBackgroundColor:f}=Pu(["backgroundColor"],[...s,e],n,r);G(f)&&(d.style.backgroundColor=os(f))}let c=document.createElement("p");c.className="rxp-texttrack-p",s8e(c,i);let m=l8e(t,r,n,i,o);for(let f=0;f")<0)}function d8e(t,e){return typeof t[e]=="string"&&/^NOTE( .*)?$/g.test(t[e])&&(t[e+1]===void 0||t[e+1].indexOf("-->")<0)}function c8e(t,e){return typeof t[e]=="string"&&/^REGION( .*)?$/g.test(t[e])&&(t[e+1]===void 0||t[e+1].indexOf("-->")<0)}function bee(t,e){let r=t[e];if(r===void 0||r===""||_O(t,e)||c8e(t,e)||d8e(t,e))return!1;if(r.indexOf("-->")>=0)return!0;let n=t[e+1];return n!==void 0&&n.indexOf("-->")>=0}function See(t,e){let r=e+1;for(;G(t[r]);)r++;return r}function RO(t,e){let r=[];for(let n=e;n{let i=n.split(":");return i.length===2&&(r[i[0]]=i[1]),r},{})}function m8e(t){let r=/^([\d:.]+)[ |\t]+-->[ |\t]+([\d:.]+)[ |\t]*(.*)$/.exec(t);if(r===null)return null;let n=zI(r[1]),i=zI(r[2]);if(n===void 0||i===void 0)return null;let a=f8e(r[3]);return{start:n,end:i,settings:a}}function CO(t,e){let r=/-->/,n,i,a;if(r.test(t[0]))n=t[0],i=t.slice(1,t.length);else{if(!r.test(t[1]))return null;a=t[0],n=t[1],i=t.slice(2,t.length)}let o=m8e(n);if(o===null)return null;let{start:s,end:d,settings:c}=o;return{start:s+e,end:d+e,settings:c,payload:i,header:a}}u();l();u();l();var wO={white:"#ffffff",lime:"#00ff00",cyan:"#00ffff",red:"#ff0000",yellow:"#ffff00",magenta:"#ff00ff",blue:"#0000ff",black:"#000000"};function xO(){return Object.keys(wO).reduce((t,e)=>(t[e]=`color: ${wO[e]};`,t[`bg_${e}`]=`background-color: ${wO[e]};`,t),{})}function AO(t){let e=xO(),r="";return t.forEach(n=>{if(n.length>=2)for(let i=1;i{e[c]===void 0?e[c]=d:e[c]+=d})}}}),{classes:e,global:r}}u();l();u();l();u();l();function Lg(t,e){let r=["u","i","b"],n=["u","i","b","c","#text"],i=t.nodeName.toLowerCase().split(".")[0],a;if(ve(n,i))if(i==="#text"){let o=t.wholeText.split(` +`);a=document.createElement("span");for(let s=0;s0&&a.appendChild(document.createElement("br")),o[s].length>0){let d=document.createTextNode(o[s]);a.appendChild(d)}}else{let o=t.nodeName.toLowerCase().split("."),s=[];if(o.forEach(d=>{G(e[d])&&s.push(e[d])}),s.length!==0){let d=document.createAttribute("style");s.forEach(m=>{d.value+=m});let c=ve(r,i)?i:"span";a=document.createElement(c),a.setAttributeNode(d)}else{let d=ve(r,i)?i:"span";a=document.createElement(d)}for(let d=0;d/,"").replace(/<([u,i,b,c])(\..*?)?(?: .*?)?>(.*?)<\/\1>/g,"<$1$2>$3"),i=new DOMParser().parseFromString(r,"text/html").body.childNodes,a=[];for(let o=0;o{if(!(t!==void 0&&Ad(t).length!==0))return"text-align:center";let r=g8e(t),n=v8e(t);return`position: absolute;margin: 0;transform: translate(${r.offset}%,${n.offset}%);width: ${I8e(t.size)}%;left: ${r.position}%;top: ${n.position!==null?`${n.position}%`:"auto"};text-align: ${LO(t.align)};`};var g8e=t=>({position:h8e(t),offset:y8e(t)}),h8e=t=>{let e=NO(t.position);if(e!==null)return e;let r=LO(t.align);return{left:0,center:50,right:100}[r]},y8e=t=>{let e=o=>{let d=/,(line-left|line-right|center)/.exec(o);return!Array.isArray(d)||d.length<2?null:d[1]},r={"line-left":0,center:-50,"line-right":-100},n=t.position!==void 0?e(t.position):null;if(n!==null)return r[n];let i={left:0,center:-50,right:-100},a=t.align!==void 0?LO(t.align):"center";return i[a]},v8e=t=>({position:b8e(t.line),offset:S8e(t.line)}),b8e=t=>NO(t),S8e=t=>{let e=i=>{let o=/,(start|center|end)/.exec(i);return!Array.isArray(o)||o.length<2?null:o[1]},r={start:0,center:-50,end:-100};if(t===void 0)return r.start;let n=e(t);return n!==null?r[n]:r.start},LO=t=>{switch(t){case"left":case"start":return"left";case"right":case"end":return"right";default:return"center"}},I8e=t=>T8e(t,100),T8e=(t,e)=>{let r=NO(t);return r!==null?r:e},NO=t=>{if(t===void 0)return null;let r=/^([\d.]+)%/.exec(t);return!Array.isArray(r)||r.length<2?null:parseInt(r[1],10)};function DO(t,e){let{start:r,end:n,settings:i,header:a,payload:o}=t,s=document.createElement("div"),d=document.createAttribute("style");d.value="width:100%;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;",s.setAttributeNode(d);let c=document.createElement("p"),m=OO(i);c.setAttributeNode(m);let f=document.createElement("span"),p=document.createAttribute("style");p.value="background-color:rgba(0,0,0,0.8);color:white;",f.setAttributeNode(p);let{global:y,classes:v}=e,b=G(a)?v[a]:void 0,T=[y,b].filter(S=>S!==void 0).join("");return p.value+=T,f.setAttributeNode(p),PO(o.join(` +`),v).forEach(S=>{f.appendChild(S)}),s.appendChild(c),c.appendChild(f),{start:r,end:n,element:s}}function qO(t,e){let r=/\r\n|\n|\r/g,n=t.split(r),i=[];if(/^WEBVTT( |\t|\n|\r|$)/.exec(n[0])===null)throw new Error("Can't parse WebVTT: Invalid File.");let a=vee(n),o=MO(n,a),s=RO(n,a),d=AO(o);for(let c=0;c{let n=r.id;if(ve(e,n)){k.warn("Two periods with the same ID found. Updating.");let o=n+"-dup";r.id=o,Zd(t),e.push(o)}else e.push(n);let{adaptations:i}=r,a=[];Object.keys(i).forEach(o=>{let s=i[o];s!==void 0&&s.forEach(d=>{let c=d.id;if(ve(a,c)){k.warn("Two adaptations with the same ID found. Updating.",c);let f=c+"-dup";d.id=f,Zd(t),a.push(f)}else a.push(c);let m=[];d.representations.forEach(f=>{let p=f.id;if(ve(m,p)){k.warn("Two representations with the same ID found. Updating.",p);let y=`${p}-dup`;f.id=y,Zd(t),m.push(y)}else m.push(p)})})})})}u();l();function Tee(t,e){let r;return e==="AACH"?r=5:r=G(t)?(parseInt(t.substring(0,2),16)&248)>>3:2,r===0?"mp4a.40.2":`mp4a.40.${r}`}function kee(t){let e=/00000001\d7([0-9a-fA-F]{6})/.exec(t);return e===null||!G(e[1])?"avc1.4D401E":"avc1."+e[1]}u();l();function UO(t){return t.reduce((e,r,n)=>{let i=r.getAttribute("d"),a=r.getAttribute("t"),o=r.getAttribute("r"),s=o!==null?+o-1:0,d=a!==null?+a:void 0,c=i!==null?+i:void 0;if(n===0)d=d===void 0||isNaN(d)?0:d;else{let m=e[n-1];if(d===void 0||isNaN(d)){if(m.duration===void 0||isNaN(m.duration))throw new Error("Smooth: Invalid CNodes. Missing timestamp.");d=m.start+m.duration*(m.repeatCount+1)}}if(c===void 0||isNaN(c)){let m=t[n+1];if(m!==void 0){let f=m.getAttribute("t"),p=G(f)?+f:null;if(p===null)throw new Error("Can't build index timeline from Smooth Manifest.");c=p-d}else return e}return e.push({duration:c,start:d,repeatCount:s}),e},[])}u();l();function k8e(t){return[{systemId:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",privateData:_e([8,1,18,16],t)}]}function FO(t,e=k8e){if(t.firstElementChild===null||t.firstElementChild.nodeName!=="ProtectionHeader")throw new Error("Protection should have ProtectionHeader child");let r=t.firstElementChild,n=ki(r.textContent===null?"":r.textContent),i=up(n),a=an(i),o=r.getAttribute("SystemID"),s=(o!==null?o:"").toLowerCase().replace(/\{|\}/g,"");return{keyId:a,keySystems:[{systemId:s,privateData:n}].concat(e(a))}}u();l();u();l();function Eee(t,e,r){return t.replace(/\{bitrate\}/g,String(e)).replace(/{CustomAttributes}/g,r.length>0?r[0]:"")}function _ee(t,e){return t.replace(/\{start time\}/g,String(e))}function E8e(t,e,r){let n=e-t;return n>0?Math.floor(n/r):0}function _8e(t,e,r){let n=t===void 0||t===0?1:t;return{up:e*n,to:(e+r)*n}}function R8e(t,e){let r=t.repeatCount;if(t.duration!==void 0&&r<0){let n=e!==void 0?e.start:1/0;r=Math.ceil((n-t.start)/t.duration)-1}return r}var Ng=class{constructor(e){let{isLive:r,segmentPrivateInfos:n,media:i,sharedSmoothTimeline:a}=e;if(this._sharedSmoothTimeline=a,this._initSegmentInfos={bitsPerSample:n.bitsPerSample,channels:n.channels,codecPrivateData:n.codecPrivateData,packetSize:n.packetSize,samplingRate:n.samplingRate,timescale:a.timescale,height:n.height,width:n.width,protection:n.protection},this._isLive=r,this._media=i,a.timeline.length!==0&&r){let{timeline:o,validityTime:s}=a,d=o[o.length-1],c=Ct(d,null),m=s/1e3*a.timescale;this._scaledLiveGap=m-c}}getInitSegment(){return{id:"init",isInit:!0,privateInfos:{smoothInitSegment:this._initSegmentInfos},url:null,time:0,end:0,duration:0,timescale:1,complete:!0}}getSegments(e,r){this._refreshTimeline();let{timescale:n,timeline:i}=this._sharedSmoothTimeline,{up:a,to:o}=_8e(n,e,r),s=this._media,d,c=[],m=i.length,f=this._scaledLiveGap===void 0?void 0:re()/1e3*n-this._scaledLiveGap;for(let p=0;p=o)return c;d!==void 0&&(d+=T+1)}return c}shouldRefresh(e,r){if(this._refreshTimeline(),!this._isLive)return!1;let{timeline:n,timescale:i}=this._sharedSmoothTimeline,a=n[n.length-1];if(a===void 0)return!1;let o=a.repeatCount,s=a.start+(o+1)*a.duration;if(r*i=s)return!0;let d=a.start+o*a.duration;return e*i>d}getFirstAvailablePosition(){this._refreshTimeline();let{timeline:e,timescale:r}=this._sharedSmoothTimeline;return e.length===0?null:e[0].start/r}getLastAvailablePosition(){this._refreshTimeline();let{timeline:e,timescale:r}=this._sharedSmoothTimeline;if(this._scaledLiveGap===void 0){let n=e[e.length-1];return Ct(n,null)/r}for(let n=e.length-1;n>=0;n--){let i=e[n],a=re()/1e3*r,{start:o,duration:s,repeatCount:d}=i;for(let c=d;c>=0;c--){let m=o+s*(c+1);if(m<=a-this._scaledLiveGap)return m/r}}}getEnd(){if(!this._isLive)return this.getLastAvailablePosition()}awaitSegmentBetween(e,r){var i;if(be(e<=r),this.isStillAwaitingFutureSegments())return!1;let n=this.getLastAvailablePosition();return n!==void 0&&r((i=this.getFirstAvailablePosition())!=null?i:0)?void 0:!1}checkDiscontinuity(e){return this._refreshTimeline(),MI(this._sharedSmoothTimeline,e,void 0)}isSegmentStillAvailable(e){if(e.isInit)return!0;this._refreshTimeline();let{timeline:r,timescale:n}=this._sharedSmoothTimeline;for(let i=0;ie.time)return!1;if(o===e.time)return!0;if(a.repeatCount>=0&&a.duration!==void 0){let d=(o-a.start)/a.duration-1;return d%1===0&&d<=a.repeatCount}}return!1}canBeOutOfSyncError(e){return this._isLive?e instanceof rn&&(e.isHttpError(404)||e.isHttpError(412)):!1}_replace(e){this._initialScaledLastPosition=e._initialScaledLastPosition,this._scaledLiveGap=e._scaledLiveGap,this._sharedSmoothTimeline.replace(e._sharedSmoothTimeline)}_update(e){this._scaledLiveGap=e._scaledLiveGap,this._sharedSmoothTimeline.update(e._sharedSmoothTimeline)}isStillAwaitingFutureSegments(){return this._isLive}isInitialized(){return!0}initialize(){k.error("A `SmoothRepresentationIndex` does not need to be initialized")}addPredictedSegments(e,r){this._sharedSmoothTimeline.addPredictedSegments(e,r)}_refreshTimeline(){this._sharedSmoothTimeline.refresh()}};u();l();u();l();function KO(t,e,r,n){let i=t.length,a=t[i-1],o=r.timescale===e?{time:r.time,duration:r.duration}:{time:r.time/r.timescale*e,duration:r.duration/r.timescale*e};return n.time===o.time?!1:o.time>=Ct(a,null)?(a.duration===o.duration?a.repeatCount++:t.push({duration:o.duration,start:o.time,repeatCount:0}),!0):!1}var Dg=class{constructor(e){let{timeline:r,timescale:n,timeShiftBufferDepth:i,manifestReceivedTime:a}=e;this.timeline=r,this.timescale=n;let o=a!=null?a:re();if(this.validityTime=o,this._timeShiftBufferDepth=i,r.length!==0){let s=r[r.length-1],d=Ct(s,null);this._initialScaledLastPosition=d}}refresh(){if(this._initialScaledLastPosition===void 0)return;let e=this._timeShiftBufferDepth,n=(re()-this.validityTime)/1e3+this._initialScaledLastPosition/this.timescale;if(e!==void 0){let i=(n-e)*this.timescale;sg(this.timeline,i)}}replace(e){let r=this.timeline,n=e.timeline,i=this.timescale,a=e.timescale;if(this._initialScaledLastPosition=e._initialScaledLastPosition,this.validityTime=e.validityTime,r.length===0||n.length===0||i!==a)return;let o=r[r.length-1],s=n[n.length-1],d=Ct(s,null);if(!(Ct(o,null)<=d))for(let c=0;cd){if(m.duration!==s.duration)return;let p=d-m.start;if(p===0){k.warn("Smooth Parser: a discontinuity detected in the previous manifest has been resolved."),this.timeline=this.timeline.concat(r.slice(c));return}if(p<0||p%m.duration!==0)return;let y=p/m.duration-1,v=m.repeatCount-y;if(v<0)return;s.repeatCount+=v;let b=r.slice(c+1);this.timeline=this.timeline.concat(b);return}}}update(e){ug(this.timeline,e.timeline),this._initialScaledLastPosition=e._initialScaledLastPosition,this.validityTime=e.validityTime}addPredictedSegments(e,r){var n;if(((n=r.privateInfos)==null?void 0:n.smoothMediaSegment)===void 0){k.warn("Smooth Parser: should only encounter SmoothRepresentationIndex");return}this.refresh();for(let i=0;i(y==="CustomAttributes"&&p.push(...Jd(v,(b,T,S)=>{if(T==="Attribute"){let I=S.getAttribute("Name"),E=S.getAttribute("Value");I!==null&&E!==null&&b.push(I+"="+E)}return b},[])),p),[]);function f(p){let y=d.getAttribute(p);return y===null?void 0:y}switch(c){case"audio":{let p=f("AudioTag"),y=f("BitsPerSample"),v=f("Channels"),b=f("CodecPrivateData"),T=f("FourCC"),S=f("PacketSize"),I=f("SamplingRate"),E=f("Bitrate"),R=E===void 0?0:parseInt(E,10);if(R=isNaN(R)?0:R,T!==void 0&&qg[T]===void 0||b===void 0)return k.warn("Smooth parser: Unsupported audio codec. Ignoring quality level."),null;let M=Tee(b,T);return{audiotag:p!==void 0?parseInt(p,10):p,bitrate:R,bitsPerSample:y!==void 0?parseInt(y,10):y,channels:v!==void 0?parseInt(v,10):v,codecPrivateData:b,codecs:M,customAttributes:m,mimeType:T!==void 0?qg[T]:T,packetSize:S!==void 0?parseInt(S,10):S,samplingRate:I!==void 0?parseInt(I,10):I}}case"video":{let p=f("CodecPrivateData"),y=f("FourCC"),v=f("MaxWidth"),b=f("MaxHeight"),T=f("Bitrate"),S=T===void 0?0:parseInt(T,10);if(S=isNaN(S)?0:S,y!==void 0&&qg[y]===void 0||p===void 0)return k.warn("Smooth parser: Unsupported video codec. Ignoring quality level."),null;let I=kee(p);return{bitrate:S,customAttributes:m,mimeType:y!==void 0?qg[y]:y,codecPrivateData:p,codecs:I,width:v!==void 0?parseInt(v,10):void 0,height:b!==void 0?parseInt(b,10):void 0}}case"text":{let p=f("CodecPrivateData"),y=f("FourCC"),v=f("Bitrate"),b=v===void 0?0:parseInt(v,10);return b=isNaN(b)?0:b,{bitrate:b,customAttributes:m,mimeType:y!==void 0?qg[y]:y,codecPrivateData:p!=null?p:""}}default:return k.error("Smooth Parser: Unrecognized StreamIndex type: "+c),null}}function o(d){let{root:c,timescale:m,baseUrl:f,protections:p,timeShiftBufferDepth:y,manifestReceivedTime:v,isLive:b}=d,T=c.getAttribute("Timescale"),S=T===null?m:+T;isNaN(S)&&(S=m);let I=c.getAttribute("Type");if(I===null)throw new Error("StreamIndex without type.");ve(Yi,I)||k.warn("Smooth Parser: Unrecognized adaptation type:",I);let E=I,R=c.getAttribute("Subtype"),M=c.getAttribute("Language"),C=c.getAttribute("Url"),A=C===null?"":C;g.CURRENT_ENV===g.DEV&&be(A!=="");let{qualityLevels:x,cNodes:O}=Jd(c,(L,V,z)=>{switch(V){case"QualityLevel":let N=a(z,E);if(N===null)return L;(E!=="video"||N.bitrate>r)&&L.qualityLevels.push(N);break;case"c":L.cNodes.push(z);break}return L},{qualityLevels:[],cNodes:[]}),D=new Dg({timeline:UO(O),timescale:S,timeShiftBufferDepth:y,manifestReceivedTime:v});be(x.length!==0,"Adaptation should have at least one playable representation.");let F=E+(G(M)?"_"+M:""),K=x.map(L=>{let V=Eee(A,L.bitrate,L.customAttributes),z=G(L.mimeType)?L.mimeType:M8e[E],N=L.codecs,B=F+"_"+(w(E)?"":E+"-")+(w(z)?"":z+"-")+(w(N)?"":N+"-")+String(L.bitrate),U=[],j;p.length>0&&(j=p[0],p.forEach(Z=>{let $=Z.keyId;Z.keySystems.forEach(ue=>{U.push({keyId:$,systemId:ue.systemId})})}));let Y={bitsPerSample:L.bitsPerSample,channels:L.channels,codecPrivateData:L.codecPrivateData,packetSize:L.packetSize,samplingRate:L.samplingRate,height:L.height,width:L.width,protection:w(j)?void 0:{keyId:j.keyId}},W=new Ng({isLive:b,sharedSmoothTimeline:D,media:V,segmentPrivateInfos:Y}),se=le({},L,{index:W,cdnMetadata:[{baseUrl:f}],mimeType:z,codecs:N,id:B});if(U.length>0||j!==void 0){let Z=j===void 0?[]:j.keySystems.map($=>{let{systemId:ue,privateData:Le}=$,Re=ue.replace(/-/g,""),ne=w8e(Re,Le);return{systemId:Re,data:ne}});if(Z.length>0){let $=[{type:"cenc",values:Z}];se.contentProtections={keyIds:U,initData:$}}else se.contentProtections={keyIds:U,initData:[]}}return se});if(R==="ADVT")return null;let P={id:F,type:E,representations:K,language:M===null?void 0:M};return E==="text"&&R==="DESC"&&(P.closedCaption=!0),P}function s(d,c,m){let f="";if(c!==void 0){let W=wu(c);f=c.substring(0,W)}let p=d.documentElement;if(w(p)||p.nodeName!=="SmoothStreamingMedia")throw new Error("document root should be SmoothStreamingMedia");let y=p.getAttribute("MajorVersion"),v=p.getAttribute("MinorVersion");if(y===null||v===null||!/^[2]-[0-2]$/.test(y+"-"+v))throw new Error("Version should be 2.0, 2.1 or 2.2");let b=p.getAttribute("Timescale"),T=G(b)?+b:1e7;isNaN(T)&&(T=1e7);let{protections:S,adaptationNodes:I}=Jd(p,(W,se,Z)=>{switch(se){case"Protection":{W.protections.push(FO(Z,t.keySystems));break}case"StreamIndex":W.adaptationNodes.push(Z);break}return W},{adaptationNodes:[],protections:[]}),E={},R=zO(p.getAttribute("IsLive")),M;if(R){let W=p.getAttribute("DVRWindowLength");W!==null&&!isNaN(+W)&&+W!=0&&(M=+W/T)}let C=I.reduce((W,se)=>{let Z=o({root:se,baseUrl:f,timescale:T,protections:S,isLive:R,timeShiftBufferDepth:M,manifestReceivedTime:m});if(Z===null)return W;let $=Z.type,ue=W[$];return ue===void 0?W[$]=[Z]:ue.push(Z),W},E),A,x,O,D=null,F,K=C.video!==void 0?C.video[0]:void 0,P=C.audio!==void 0?C.audio[0]:void 0,L,V,z;if(K!==void 0||P!==void 0){let W=[],se=[];if(K!==void 0){let Z=K.representations[0];if(Z!==void 0){let $=Z.index.getFirstAvailablePosition(),ue=Z.index.getLastAvailablePosition();w($)||W.push($),w(ue)||se.push(ue)}}if(P!==void 0){let Z=P.representations[0];if(Z!==void 0){let $=Z.index.getFirstAvailablePosition(),ue=Z.index.getLastAvailablePosition();w($)||W.push($),w(ue)||se.push(ue)}}W.length>0&&(L=Math.max(...W)),se.length>0&&(V=Math.min(...se),z=Math.max(...se))}let N=p.getAttribute("Duration"),B=N!==null&&+N!=0?+N/T:void 0;if(R){A=t.suggestedPresentationDelay,x=e,O=L!=null?L:x;let W=z;W===void 0&&(W=Date.now()/1e3-x);let se=V;se===void 0&&(se=W),F={isLinear:!0,maximumSafePosition:se,livePosition:W,time:re()},D=M!=null?M:null}else{O=L!=null?L:0;let W=V;W===void 0&&(W=B!==void 0?O+B:1/0),F={isLinear:!1,maximumSafePosition:W,livePosition:void 0,time:re()}}let U=R?0:O,j=R?void 0:F.maximumSafePosition,Y={availabilityStartTime:x===void 0?0:x,clockOffset:i,isLive:R,isDynamic:R,isLastPeriodKnown:!0,timeBounds:{minimumSafePosition:O,timeshiftDepth:D,maximumTimeData:F},periods:[{adaptations:C,duration:j!==void 0?j-U:B,end:j,id:"gen-smooth-period-0",start:U}],suggestedPresentationDelay:A,transportType:"smooth",uris:w(c)?[]:[c]};return Zd(Y),Y}return s}function w8e(t,e){if(t.length!==32)throw new Error("HSS: wrong system id length");return Oe("pssh",_e([0,0,0,0],an(t),ut(e.length),e))}var Ree=C8e;var Mee=Ree;u();l();u();l();u();l();u();l();function Cee(t,e,r,n,i,a,o){return Oe("avc1",_e(6,He(1),16,He(t),He(e),He(r),2,He(n),6,[0,1,i.length],Rt(i),31-i.length,He(a),[255,255],o))}function wee(t,e,r,n,i,a,o,s){return Oe("encv",_e(6,He(1),16,He(t),He(e),He(r),2,He(n),6,[0,1,i.length],Rt(i),31-i.length,He(a),[255,255],o,s))}function xee(t,e,r,n,i,a){return Oe("mp4a",_e(6,He(t),8,He(e),He(r),2,He(n),He(i),2,a))}function Aee(t,e,r,n,i,a,o){return Oe("enca",_e(6,He(t),8,He(e),He(r),2,He(n),He(i),2,a,o))}function Pee(t){return Oe("dref",_e(7,[1],t))}function Oee(t,e){let r=_e(...[Rt(t),[0,0,0,1]].concat(e.map(Rt)));return Oe("ftyp",r)}function jI(t,e){return Oe("schm",_e(4,Rt(t),ut(e)))}function Lee(t){return Oe("tfdt",_e([1,0,0,0],Wo(t)))}function Nee(){let t=new Uint8Array(12);return t[3]=1,Oe("vmhd",t)}function Dee(t){return Oe("trex",_e(4,ut(t),[0,0,0,1],12))}function qee(t){return Oe("free",new Uint8Array(t-8))}function Bee(t,e){return Oe("esds",_e(4,[3,25],He(t),[0,4,17,64,21],11,[5,2],an(e),[6,1,2]))}function VI(t){return Oe("frma",Rt(t))}function Uee(t,e,r){let n;r===2?n=1:r===4?n=3:n=0;let i=t[1],a=t[2],o=t[3];return Oe("avcC",_e([1,i,a,o,252|n,225],He(t.length),t,[1],He(e.length),e))}function Fee(t){let e,r;switch(t){case"video":e="vide",r="VideoHandler";break;case"audio":e="soun",r="SoundHandler";break;default:e="hint",r="";break}return Oe("hdlr",_e(8,Rt(e),12,Rt(r),1))}function Kee(t){return Oe("mdhd",_e(12,ut(t),8))}function zee(t,e){return Oe("mvhd",_e(12,ut(t),4,[0,1],2,[1,0],10,[0,1],14,[0,1],14,[64,0,0,0],26,He(e+1)))}function jee(t,e,r,n){return Oe("saio",_e(4,[0,0,0,1],ut(t.length+e.length+r.length+n.length+8+8+8+8)))}function Vee(t){if(t.length===0)return Oe("saiz",new Uint8Array(0));let e=Te(t,0),r=Te(t,4),n=new Uint8Array(r+9);n.set(ut(r),5);let i=9,a=8,o,s;for(;a{if(o===void 0){let T=xee(1,e,r,n,i,d);return ec([T])}let m=HI(1,8,o),f=Kt("schi",[m]),p=jI("cenc",65536),y=VI("mp4a"),v=Kt("sinf",[y,p,f]),b=Aee(1,e,r,n,i,d,v);return ec([b])})();return Bg(t,"audio",c,Hee(),0,0)}u();l();function WI(t,e,r,n,i,a,o,s){let[,d,c]=o.split("00000001");if(d===void 0||c===void 0)throw new Error("Smooth: unsupported codec private data.");let m=an(d),f=an(c),p=Uee(m,f,a),y;if(s===void 0){let v=Cee(e,r,n,i,"AVC Coding",24,p);y=ec([v])}else{let v=HI(1,8,s),b=Kt("schi",[v]),T=jI("cenc",65536),S=VI("avc1"),I=Kt("sinf",[S,T,b]),E=wee(e,r,n,i,"AVC Coding",24,p,I);y=ec([E])}return Bg(t,"video",y,Nee(),e,r)}u();l();function $I(t){let e=vu(t,3565190898,3392751253,2387879627,2655430559);if(e===void 0)return[];let r=[],n=e[0],i=e[4];for(let a=0;a0)return t;let n=new Uint8Array(t.length+4);return n.set(t.subarray(0,e+8),0),n[e+3]=n[e+3]|1,n.set([0,0,0,0],e+8),n.set(t.subarray(e+8,t.length),e+12),BA(n)}function XI(t,e,r,n,i){var y;let a=[],o,s,d;if(i){let v=op(t);v!==null?(d=$I(v),s=YI(v)):k.warn("smooth: could not find traf atom")}if(d!==void 0)for(let v=0;v=0}u();l();function Wee(t,e,r,n,i,a){let o,s=e.segment.range;return Array.isArray(s)&&(o={Range:Kr(s)}),st({url:t,responseType:"arraybuffer",headers:o,timeout:n.timeout,connectionTimeout:n.connectionTimeout,cancelSignal:i,onProgress:r.onProgress}).then(d=>{if(!Ou(e.mimeType)||a!==!0)return{resultType:"segment-loaded",resultData:d};let m=new Uint8Array(d.responseData);return ns(m,e.segment.isInit),{resultType:"segment-loaded",resultData:nt(je({},d),{responseData:m})}})}var O8e=({checkMediaSegmentIntegrity:t,segmentLoader:e})=>(r,n,i,a,o)=>{let{segment:s}=n;if(s.isInit){if(s.privateInfos===void 0||s.privateInfos.smoothInitSegment===void 0)throw new Error("Smooth: Invalid segment format");let d=s.privateInfos.smoothInitSegment,c,{codecPrivateData:m,timescale:f,height:p,width:y,protection:v={keyId:void 0,keySystems:void 0}}=d;if(m===void 0)throw new Error("Smooth: no codec private data.");switch(n.type){case"video":{c=WI(f,y!=null?y:0,p!=null?p:0,72,72,4,m,v.keyId);break}case"audio":{let{channels:b=0,bitsPerSample:T=0,packetSize:S=0,samplingRate:I=0}=d;c=GI(f,b,T,S,I,m,v.keyId);break}default:g.CURRENT_ENV===g.DEV&&be(!1,"responseData should have been set"),c=new Uint8Array(0)}return Promise.resolve({resultType:"segment-created",resultData:c})}else return r===null?Promise.resolve({resultType:"segment-created",resultData:null}):typeof e!="function"?Wee(r,n,o,i,a,t):new Promise((d,c)=>{let m=!1,b={reject:R=>{var x,O;if(m||a.isCancelled())return;m=!0,a.deregister(E);let M=R,C=(x=M==null?void 0:M.message)!=null?x:"Unknown error when fetching a Smooth segment through a custom segmentLoader.",A=new Wn(C,(O=M==null?void 0:M.canRetry)!=null?O:!1,M==null?void 0:M.xhr);c(A)},resolve:R=>{if(m||a.isCancelled())return;m=!0,a.deregister(E),(!Ou(n.mimeType)||t!==!0)&&d({resultType:"segment-loaded",resultData:{responseData:R.data,size:R.size,requestDuration:R.duration}});let C=R.data instanceof Uint8Array?R.data:new Uint8Array(R.data);ns(C,n.segment.isInit),d({resultType:"segment-loaded",resultData:{responseData:C,size:R.size,requestDuration:R.duration}})},fallback:()=>{m||a.isCancelled()||(m=!0,a.deregister(E),Wee(r,n,o,i,a,t).then(d,c))},progress:R=>{m||a.isCancelled()||o.onProgress({duration:R.duration,size:R.size,totalSize:R.totalSize})}},T;n.segment.range!==void 0&&(T=[n.segment.range],n.segment.indexRange!==void 0&&T.push(n.segment.indexRange));let S={isInit:n.segment.isInit,timeout:i.timeout,byteRanges:T,trackType:n.type,url:r},I=e(S,b);a.register(E);function E(R){m||(m=!0,!m&&typeof I=="function"&&I(),c(R))}})},$ee=O8e;u();l();function GO(t,e){return t===null?null:e.url===null?t.baseUrl:Gd(t.baseUrl,e.url)}function Yee(t){let e=Mee(t),r=$ee(t),n={customManifestLoader:t.manifestLoader},a={loadManifest:vg(n,"text"),parseManifest(d,c){var S;let m=(S=d.url)!=null?S:c.originalUrl,{receivedTime:f,responseData:p}=d,y=typeof p=="string"?new DOMParser().parseFromString(p,"text/xml"):p,v=e(y,m,f),b=[];return{manifest:new Xi(v,{representationFilter:t.representationFilter},b),url:m,warnings:b}}},o={loadSegment(d,c,m,f,p){let y=GO(d,c.segment);return r(y,c,m,f,p)},parseSegment(d,c,m){var M,C;let{segment:f}=c,{data:p,isChunked:y}=d;if(p===null)return f.isInit?{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0}:{segmentType:"media",chunkData:null,chunkInfos:null,chunkOffset:0,chunkSize:0,protectionData:[],appendWindow:[void 0,void 0]};let v=p instanceof Uint8Array?p:new Uint8Array(p);if(f.isInit){let A=(C=(M=f.privateInfos)==null?void 0:M.smoothInitSegment)==null?void 0:C.timescale;return{segmentType:"init",initializationData:p,initializationDataSize:p.byteLength,initTimescale:A,protectionData:[]}}let b=m!==void 0?XI(v,y,m,f,c.isLive):null;if(b===null||b.chunkInfos===null||b.scaledSegmentTime===void 0)throw new Error("Smooth Segment without time information");let{nextSegments:T,chunkInfos:S,scaledSegmentTime:I}=b,E=QI(v,I),R=T.length>0?T:void 0;return{segmentType:"media",chunkData:E,chunkInfos:S,chunkOffset:0,chunkSize:E.length,protectionData:[],predictedSegments:R,appendWindow:[void 0,void 0]}}};return{manifest:a,audio:o,video:o,text:{loadSegment(d,c,m,f,p){let{segment:y}=c,v=GO(d,y);return y.isInit||v===null?Promise.resolve({resultType:"segment-created",resultData:null}):Ou(c.mimeType)?st({url:v,responseType:"arraybuffer",timeout:m.timeout,connectionTimeout:m.connectionTimeout,cancelSignal:f,onProgress:p.onProgress}).then(T=>{if(t.checkMediaSegmentIntegrity!==!0)return{resultType:"segment-loaded",resultData:T};let S=new Uint8Array(T.responseData);return ns(S,c.segment.isInit),{resultType:"segment-loaded",resultData:nt(je({},T),{responseData:S})}}):st({url:v,responseType:"text",timeout:m.timeout,connectionTimeout:m.connectionTimeout,cancelSignal:f,onProgress:p.onProgress}).then(T=>({resultType:"segment-loaded",resultData:T}))},parseSegment(d,c,m){var F;let{segment:f,language:p,mimeType:y="",codecs:v=""}=c,b=Ou(c.mimeType),{data:T,isChunked:S}=d,I;if(f.isInit)return{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0};if(T===null)return{segmentType:"media",chunkData:null,chunkInfos:null,chunkOffset:0,chunkSize:0,protectionData:[],appendWindow:[void 0,void 0]};let E,R=null,M,C,A,x;if(b){let K;typeof T=="string"?K=Rt(T):K=T instanceof Uint8Array?T:new Uint8Array(T),I=K.length;let P=m!==void 0?XI(K,S,m,f,c.isLive):null;E=P==null?void 0:P.nextSegments,R=(F=P==null?void 0:P.chunkInfos)!=null?F:null,R===null?S?k.warn("Smooth: Unavailable time data for current text track."):(M=f.time,C=f.end):(M=R.time,C=R.duration!==void 0?R.time+R.duration:f.end);let L=v.toLowerCase();if(y==="application/ttml+xml+mp4"||L==="stpp"||L==="stpp.ttml.im1t")x="ttml";else if(L==="wvtt")x="vtt";else throw new Error(`could not find a text-track parser for the type ${y}`);let V=sp(K);A=V===null?"":lr(V)}else{M=f.time,C=f.end;let K;if(typeof T!="string"){let P=T instanceof Uint8Array?T:new Uint8Array(T);I=P.length,K=lr(P)}else K=T;switch(y){case"application/x-sami":case"application/smil":x="sami";break;case"application/ttml+xml":x="ttml";break;case"text/vtt":x="vtt";break}if(x===void 0)if(v.toLowerCase()==="srt")x="srt";else throw new Error(`could not find a text-track parser for the type ${y}`);A=K}let O=Array.isArray(E)&&E.length>0?E:void 0,D=M!=null?M:0;return{segmentType:"media",chunkData:{type:x,data:A,start:M,end:C,language:p},chunkSize:I,chunkInfos:R,chunkOffset:D,protectionData:[],predictedSegments:O,appendWindow:[void 0,void 0]}}}}}var Qee=Yee;function WO(t){t.transports.smooth===void 0&&(t.transports.smooth=Qee),t.mainThreadMediaSourceInit=Ha,t.codecSupportProber=Xo}u();l();u();l();u();l();u();l();u();l();u();l();u();l();var Ug=class t{constructor(e,r,n,i){this._wrappedIndex=e,this._timeOffset=r[0],this._contentEnd=r[1],this._transport=n,this._baseContentMetadata=i}getInitSegment(){let e=this._wrappedIndex.getInitSegment();return e===null?null:this._cloneWithPrivateInfos(e)}getSegments(e,r){return this._wrappedIndex.getSegments(e-this._timeOffset,r).map(n=>{let i=this._cloneWithPrivateInfos(n);return i.time+=this._timeOffset,i.end+=this._timeOffset,i})}shouldRefresh(){return!1}getFirstAvailablePosition(){let e=this._wrappedIndex.getFirstAvailablePosition();return w(e)?void 0:e+this._timeOffset}getLastAvailablePosition(){let e=this._wrappedIndex.getLastAvailablePosition();return w(e)?void 0:e+this._timeOffset}getEnd(){let e=this._wrappedIndex.getEnd();return w(e)?void 0:e+this._timeOffset}awaitSegmentBetween(e,r){return this._wrappedIndex.awaitSegmentBetween(e-this._timeOffset,r-this._timeOffset)}isSegmentStillAvailable(e){var n;if(((n=e.privateInfos)==null?void 0:n.metaplaylistInfos)===void 0)return!1;let{originalSegment:r}=e.privateInfos.metaplaylistInfos;return this._wrappedIndex.isSegmentStillAvailable(r)}canBeOutOfSyncError(e,r){var i;if(((i=r.privateInfos)==null?void 0:i.metaplaylistInfos)===void 0)return!1;let{originalSegment:n}=r.privateInfos.metaplaylistInfos;return this._wrappedIndex.canBeOutOfSyncError(e,n)}checkDiscontinuity(e){return this._wrappedIndex.checkDiscontinuity(e-this._timeOffset)}isStillAwaitingFutureSegments(){return this._wrappedIndex.isStillAwaitingFutureSegments()}isInitialized(){return this._wrappedIndex.isInitialized()}initialize(e){return this._wrappedIndex.initialize(e)}addPredictedSegments(e,r){return this._wrappedIndex.addPredictedSegments(e,r)}_replace(e){if(!(e instanceof t))throw new Error("A MetaPlaylist can only be replaced with another MetaPlaylist");this._wrappedIndex._replace(e._wrappedIndex)}_update(e){if(!(e instanceof t))throw new Error("A MetaPlaylist can only be updated with another MetaPlaylist");this._wrappedIndex._update(e._wrappedIndex)}_cloneWithPrivateInfos(e){let r=le({},e);return r.privateInfos===void 0&&(r.privateInfos={}),r.privateInfos.metaplaylistInfos={transportType:this._transport,contentStart:this._timeOffset,contentEnd:this._contentEnd,originalSegment:e,isLive:this._baseContentMetadata.isLive,manifestPublishTime:this._baseContentMetadata.manifestPublishTime,periodStart:this._baseContentMetadata.periodStart,periodEnd:this._baseContentMetadata.periodEnd},r}};function $O(t,e){let r;if(typeof t=="object"&&t!==null)r=t;else if(typeof t=="string")try{r=JSON.parse(t)}catch(d){throw new Error("MPL Parser: Bad MetaPlaylist file. Expected JSON.")}else throw new Error("MPL Parser: Parser input must be either a string or the MetaPlaylist data directly.");let{contents:n,version:i,type:a}=r;if(a!=="MPL")throw new Error("MPL Parser: Bad MetaPlaylist. The `type` property is not set to `MPL`");if(i!=="0.1")throw new Error("MPL Parser: Bad MetaPlaylist version");if(w(n)||n.length===0)throw new Error("MPL Parser: No content found.");let o=[];for(let d=0;d0?d[0].startTime:0,m=d.length>0?d[d.length-1].endTime:0,f=t.dynamic===!0,p=null,y=null,v=[];for(let I=0;I{let z=O.adaptations[V];if(w(z))return L;let N=[];for(let B=0;B1&&(W.codecs.length>2&&k.warn("MP: MetaPlaylist relying on more than 2 groups of codecs with retro-compatibility"),$=W.codecs[0]);let ue=W.codecs[W.codecs.length-1];j.push({bitrate:W.bitrate,index:Z,cdnMetadata:W.cdnMetadata,id:W.id,height:W.height,width:W.width,mimeType:W.mimeType,frameRate:W.frameRate,codecs:ue,supplementalCodecs:$,isSpatialAudio:W.isSpatialAudio,contentProtections:W.contentProtections})}N.push({id:U.id,representations:j,type:U.type,audioDescription:U.isAudioDescription,closedCaption:U.isClosedCaption,isDub:U.isDub,language:U.language,isSignInterpreted:U.isSignInterpreted}),L[V]=N}return L},{}),K=(E.textTracks===void 0?[]:E.textTracks).map(L=>{let V="gen-text-ada-"+o(),z="gen-text-rep-"+s(),N=wu(L.url),B=L.url.substring(0,N),U=L.url.substring(N);return{id:V,type:"text",language:L.language,closedCaption:L.closedCaption,manuallyAdded:!0,representations:[{bitrate:0,cdnMetadata:[{baseUrl:B}],id:z,mimeType:L.mimeType,codecs:L.codecs,index:new gu({media:U})}]}},[]);K.length>0&&(w(D.text)?D.text=K:D.text.push(...K));let P={id:Xee(R.id)+"_"+Xee(O.id),adaptations:D,duration:O.duration,start:M+O.start};A.push(P)}for(let x=A.length-1;x>=0;x--){let O=A[x];O.start>=E.endTime?A.splice(x,1):w(O.duration)?x===A.length-1&&(O.duration=E.endTime-O.start):O.start+O.duration>E.endTime&&(O.duration=E.endTime-O.start)}v.push(...A)}let b=re(),T=!f||t.pollInterval===void 0&&(e.length<=0||e[e.length-1].isLastPeriodKnown);return{availabilityStartTime:0,clockOffset:a,suggestedPresentationDelay:10,periods:v,transportType:"metaplaylist",isLive:f,isDynamic:f,isLastPeriodKnown:T,uris:w(n)?[]:[n],timeBounds:{minimumSafePosition:c,timeshiftDepth:null,maximumTimeData:{isLinear:!1,maximumSafePosition:m,livePosition:void 0,time:b}},lifetime:t.pollInterval}}function Xee(t){return t.replace(/_/g,"_")}var Zee=$O;u();l();function Jee(t,e,r){if(t===void 0)throw new Error("Cannot perform HTTP(s) request. URL not known");return st({url:t,responseType:"text",timeout:e.timeout,connectionTimeout:e.connectionTimeout,cancelSignal:r})}function YO({customManifestLoader:t}){return typeof t!="function"?Jee:yg(t,Jee)}function tc(t){var s;let{segment:e}=t;if(((s=e.privateInfos)==null?void 0:s.metaplaylistInfos)===void 0)throw new Error("MetaPlaylist: missing private infos");let{isLive:r,periodStart:n,periodEnd:i,manifestPublishTime:a}=e.privateInfos.metaplaylistInfos,{originalSegment:o}=e.privateInfos.metaplaylistInfos;return{segment:o,type:t.type,language:t.language,mimeType:t.mimeType,codecs:t.codecs,isLive:r,periodStart:n,periodEnd:i,manifestPublishTime:a}}function ete(t,e,r){let n=t[e];if(n!==void 0)return n;let i=Ee.transports[e];if(i===void 0)throw new Error(`MetaPlaylist: Unknown transport ${e}.`);let a=i(r);return t[e]=a,a}function ZI(t){let{privateInfos:e}=t;if((e==null?void 0:e.metaplaylistInfos)===void 0)throw new Error("MetaPlaylist: Undefined transport for content for metaplaylist.");return e.metaplaylistInfos}function tte(t){let e={},r=YO({customManifestLoader:t.manifestLoader}),n=le({},t,{manifestLoader:void 0}),i={loadManifest:r,parseManifest(m,f,p,y,v){var R;let b=(R=m.url)!=null?R:f.originalUrl,{responseData:T}=m,S={url:b,serverSyncInfos:t.serverSyncInfos},I=Zee(T,S);return E(I);function E(M){if(M.type==="done"){let x=[],O=new Xi(M.value,t,x);return Promise.resolve({manifest:O,warnings:x})}let A=M.value.ressources.map(x=>{let O=ete(e,x.transportType,n);return v(D).then(F=>O.manifest.parseManifest(F,nt(je({},f),{originalUrl:x.url}),p,y,v));function D(){let F={timeout:Q.getCurrent().DEFAULT_REQUEST_TIMEOUT,connectionTimeout:Q.getCurrent().DEFAULT_CONNECTION_TIMEOUT};return O.manifest.loadManifest(x.url,F,y)}});return Promise.all(A).then(x=>{let O=x.map(D=>D.manifest);return E(M.value.continue(O))})}}};function a(m){let{transportType:f}=ZI(m);return ete(e,f,n)}function o(m,f,p){let y=p.chunkOffset+m;if(w(p.chunkData))return{chunkInfos:p.chunkInfos,chunkOffset:y,appendWindow:[void 0,void 0]};let{chunkInfos:v,appendWindow:b}=p,T=v===null?null:le({},v);T!==null&&(T.time+=m);let S=b[0]!==void 0?Math.max(b[0]+m,m):m,I;return b[1]!==void 0?I=f!==void 0?Math.min(b[1]+m,f):b[1]+m:f!==void 0&&(I=f),{chunkInfos:T,chunkOffset:y,appendWindow:[S,I]}}return{manifest:i,audio:{loadSegment(m,f,p,y,v){let{segment:b}=f,{audio:T}=a(b),S=tc(f);return T.loadSegment(m,S,p,y,v)},parseSegment(m,f,p){let{segment:y}=f,{contentStart:v,contentEnd:b}=ZI(y),{audio:T}=a(y),S=tc(f),I=T.parseSegment(m,S,p);if(I.segmentType==="init")return I;let E=o(v,b,I);return le({},I,E)}},video:{loadSegment(m,f,p,y,v){let{segment:b}=f,{video:T}=a(b),S=tc(f);return T.loadSegment(m,S,p,y,v)},parseSegment(m,f,p){let{segment:y}=f,{contentStart:v,contentEnd:b}=ZI(y),{video:T}=a(y),S=tc(f),I=T.parseSegment(m,S,p);if(I.segmentType==="init")return I;let E=o(v,b,I);return le({},I,E)}},text:{loadSegment(m,f,p,y,v){let{segment:b}=f,{text:T}=a(b),S=tc(f);return T.loadSegment(m,S,p,y,v)},parseSegment(m,f,p){let{segment:y}=f,{contentStart:v,contentEnd:b}=ZI(y),{text:T}=a(y),S=tc(f),I=T.parseSegment(m,S,p);if(I.segmentType==="init")return I;let E=o(v,b,I);return le({},I,E)}}}}var rte=tte;function QO(t){t.transports.metaplaylist=rte,t.mainThreadMediaSourceInit=Ha,t.codecSupportProber=Xo}u();l();u();l();u();l();function Ye(t,e,r){k.debug("---> Sending to Worker:",e.type),r===void 0?t.postMessage(e):t.postMessage(e,r)}var N8e=Dt(),Fg=class extends ts{constructor(e){super(),this._settings=e,this._initCanceller=new X,this._currentMediaSourceCanceller=new X,this._currentMediaSourceCanceller.linkToSignal(this._initCanceller.signal),this._currentContentInfo=null,this._segmentMetrics={lastMessageId:0,resolvers:{}}}prepare(){var y,v;if(this._currentContentInfo!==null||this._initCanceller.isUsed())return;let e=N8e(),{adaptiveOptions:r,transportOptions:n,worker:i}=this._settings,{wantedBufferAhead:a,maxVideoBufferSize:o,maxBufferAhead:s,maxBufferBehind:d}=this._settings.bufferOptions,c=r.initialBitrates.video,m=r.initialBitrates.audio;if(this._currentContentInfo={contentId:e,manifest:null,mainThreadMediaSource:null,rebufferingController:null,streamEventsEmitter:null,initialTime:void 0,autoPlay:void 0,initialPlayPerformed:null},Ye(i,{type:"prepare",value:{contentId:e,url:this._settings.url,hasText:this._hasTextBufferFeature(),transportOptions:n,initialVideoBitrate:c,initialAudioBitrate:m,manifestRetryOptions:this._settings.manifestRequestSettings,segmentRetryOptions:this._settings.segmentRequestOptions}}),this._initCanceller.signal.register(()=>{Ye(i,{type:"stop",contentId:e,value:null})}),this._initCanceller.isUsed())return;let f=(y=r.throttlers.throttleBitrate.video)!=null?y:new oe(1/0);D8e(i,this._initCanceller.signal,[a,"wantedBufferAhead"],[o,"maxVideoBufferSize"],[s,"maxBufferAhead"],[d,"maxBufferBehind"],[f,"throttleVideoBitrate"]),((v=r.throttlers.limitResolution.video)!=null?v:new oe({height:void 0,width:void 0,pixelRatio:1})).onUpdate(b=>{Ye(i,{type:"ref-update",value:{name:"limitVideoResolution",newVal:b}})},{clearSignal:this._initCanceller.signal,emitCurrentValue:!0})}updateContentUrls(e,r){this._currentContentInfo!==null&&Ye(this._settings.worker,{type:"urls-update",contentId:this._currentContentInfo.contentId,value:{urls:e,refreshNow:r}})}start(e,r){if(this.prepare(),this._initCanceller.isUsed())return;let n=null;this._settings.textTrackOptions.textTrackMode==="html"&&Ee.htmlTextDisplayer!==null?(be(this._hasTextBufferFeature()),n=new Ee.htmlTextDisplayer(e,this._settings.textTrackOptions.textTrackElement)):Ee.nativeTextDisplayer!==null?(be(this._hasTextBufferFeature()),n=new Ee.nativeTextDisplayer(e)):be(!this._hasTextBufferFeature()),this._initCanceller.signal.register(()=>{n==null||n.stop()}),_u(e,m=>this._onFatalError(m),this._initCanceller.signal);let i=new oe(null),a=new oe(0),o=this._initializeContentDecryption(e,i,a,()=>d(0,void 0,void 0),this._initCanceller.signal),s={mediaElement:e,textDisplayer:n,playbackObserver:r,drmInitializationStatus:o,mediaSourceStatus:a};a.onUpdate((m,f)=>{m===2&&(f(),this._startPlaybackIfReady(s))},{clearSignal:this._initCanceller.signal,emitCurrentValue:!0}),o.onUpdate((m,f)=>{m.initializationState.type==="initialized"&&(f(),this._startPlaybackIfReady(s))},{emitCurrentValue:!0,clearSignal:this._initCanceller.signal});let d=(m,f,p)=>{var I;let y=this._currentContentInfo;if(y===null){k.warn("MTCI: Asked to reload when no content is loaded.");return}let v=r.getReference().getValue(),b=v.position.getWanted(),T=((I=y.initialPlayPerformed)==null?void 0:I.getValue())===!0||y.autoPlay===void 0?v.paused:!y.autoPlay,S=b+m;f!==void 0&&(S=Math.max(f,S)),p!==void 0&&(S=Math.min(p,S)),this._reload(e,n,r,a,S,!T)},c=m=>{var p,y,v,b,T,S,I,E,R,M,C,A,x,O,D,F,K,P,L,V,z,N,B,U,j,Y,W,se,Z,$,ue,Le,Re,ne,de,Wt,Pt,Ot,Rr,Mr,sh,uh,lh,dh,ch,fc,fh,mh,ph,gh,hh,yh;let f=m.data;switch(f.type){case"attach-media-source":{if(((p=this._currentContentInfo)==null?void 0:p.contentId)!==f.contentId)return;let H=f.value;a.onUpdate((ae,ge)=>{ae===1&&(ge(),k.info("MTCI: Attaching MediaSource URL to the media element"),H.type==="handle"?(e.srcObject=H.value,this._currentMediaSourceCanceller.signal.register(()=>{e.srcObject=null})):(e.src=H.value,this._currentMediaSourceCanceller.signal.register(()=>{ea(e,H.value)})),a.setValue(2))},{emitCurrentValue:!0,clearSignal:this._initCanceller.signal});break}case"warning":if(((y=this._currentContentInfo)==null?void 0:y.contentId)!==f.contentId)return;this.trigger("warning",XO(f.value));break;case"error":if(((v=this._currentContentInfo)==null?void 0:v.contentId)!==f.contentId)return;this._onFatalError(XO(f.value));break;case"create-media-source":this._onCreateMediaSourceMessage(f,e,a,this._settings.worker);break;case"add-source-buffer":{if(((T=(b=this._currentContentInfo)==null?void 0:b.mainThreadMediaSource)==null?void 0:T.id)!==f.mediaSourceId)return;this._currentContentInfo.mainThreadMediaSource.addSourceBuffer(f.value.sourceBufferType,f.value.codec)}break;case"source-buffer-append":{if(((I=(S=this._currentContentInfo)==null?void 0:S.mainThreadMediaSource)==null?void 0:I.id)!==f.mediaSourceId)return;let H=this._currentContentInfo.mainThreadMediaSource,ae=ce(H.sourceBuffers,ge=>ge.type===f.sourceBufferType);if(ae===void 0)return;ae.appendBuffer(f.value.data,f.value.params).then(ge=>{Ye(this._settings.worker,{type:"sb-success",mediaSourceId:H.id,sourceBufferType:ae.type,operationId:f.operationId,value:{buffered:ge}})}).catch(ge=>{Ye(this._settings.worker,{type:"sb-error",mediaSourceId:H.id,sourceBufferType:ae.type,operationId:f.operationId,value:ge instanceof yt?{errorName:"CancellationError"}:ite(ge).serialize()})})}break;case"source-buffer-remove":{if(((R=(E=this._currentContentInfo)==null?void 0:E.mainThreadMediaSource)==null?void 0:R.id)!==f.mediaSourceId)return;let H=this._currentContentInfo.mainThreadMediaSource,ae=ce(H.sourceBuffers,ge=>ge.type===f.sourceBufferType);if(ae===void 0)return;ae.remove(f.value.start,f.value.end).then(ge=>{Ye(this._settings.worker,{type:"sb-success",mediaSourceId:H.id,sourceBufferType:ae.type,operationId:f.operationId,value:{buffered:ge}})}).catch(ge=>{Ye(this._settings.worker,{type:"sb-error",mediaSourceId:H.id,sourceBufferType:ae.type,operationId:f.operationId,value:ge instanceof yt?{errorName:"CancellationError"}:ite(ge).serialize()})})}break;case"abort-source-buffer":{if(((C=(M=this._currentContentInfo)==null?void 0:M.mainThreadMediaSource)==null?void 0:C.id)!==f.mediaSourceId)return;let H=this._currentContentInfo.mainThreadMediaSource,ae=ce(H.sourceBuffers,ge=>ge.type===f.sourceBufferType);if(ae===void 0)return;ae.abort()}break;case"update-media-source-duration":{if(((x=(A=this._currentContentInfo)==null?void 0:A.mainThreadMediaSource)==null?void 0:x.id)!==f.mediaSourceId)return;let H=this._currentContentInfo.mainThreadMediaSource;if((H==null?void 0:H.id)!==f.mediaSourceId)return;H.setDuration(f.value.duration,f.value.isRealEndKnown)}break;case"stop-media-source-duration":{if(((D=(O=this._currentContentInfo)==null?void 0:O.mainThreadMediaSource)==null?void 0:D.id)!==f.mediaSourceId)return;let H=this._currentContentInfo.mainThreadMediaSource;if((H==null?void 0:H.id)!==f.mediaSourceId)return;H.interruptDurationSetting()}break;case"end-of-stream":{if(((K=(F=this._currentContentInfo)==null?void 0:F.mainThreadMediaSource)==null?void 0:K.id)!==f.mediaSourceId)return;this._currentContentInfo.mainThreadMediaSource.maintainEndOfStream()}break;case"stop-end-of-stream":{if(((L=(P=this._currentContentInfo)==null?void 0:P.mainThreadMediaSource)==null?void 0:L.id)!==f.mediaSourceId)return;this._currentContentInfo.mainThreadMediaSource.stopEndOfStream()}break;case"dispose-media-source":{if(((z=(V=this._currentContentInfo)==null?void 0:V.mainThreadMediaSource)==null?void 0:z.id)!==f.mediaSourceId)return;this._currentContentInfo.mainThreadMediaSource.dispose()}break;case"needs-buffer-flush":{if(((N=this._currentContentInfo)==null?void 0:N.contentId)!==f.contentId)return;let H=e.currentTime,ae=(U=(B=f.value)==null?void 0:B.relativeResumingPosition)!=null?U:0,ge=!!((j=f.value)!=null&&j.relativePosHasBeenDefaulted),$e;ae===0&&ge?$e=H+.001:$e=H+ae,r.setCurrentTime($e);break}case"active-period-changed":{if(((Y=this._currentContentInfo)==null?void 0:Y.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let H=ce(this._currentContentInfo.manifest.periods,ae=>ae.id===f.value.periodId);H!==void 0&&this.trigger("activePeriodChanged",{period:H});break}case"adaptation-changed":{if(((W=this._currentContentInfo)==null?void 0:W.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let H=ce(this._currentContentInfo.manifest.periods,$e=>$e.id===f.value.periodId);if(H===void 0)return;if(f.value.adaptationId===null){this.trigger("adaptationChange",{period:H,adaptation:null,type:f.value.type});return}let ae=(se=H.adaptations[f.value.type])!=null?se:[],ge=ce(ae,$e=>$e.id===f.value.adaptationId);ge!==void 0&&this.trigger("adaptationChange",{period:H,adaptation:ge,type:f.value.type});break}case"representation-changed":{if(((Z=this._currentContentInfo)==null?void 0:Z.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let H=ce(this._currentContentInfo.manifest.periods,kt=>kt.id===f.value.periodId);if(H===void 0)return;if(f.value.representationId===null){this.trigger("representationChange",{period:H,type:f.value.type,representation:null});return}let ae=($=H.adaptations[f.value.type])!=null?$:[],ge=ce(ae,kt=>kt.id===f.value.adaptationId);if(ge===void 0)return;let $e=ce(ge.representations,kt=>kt.id===f.value.representationId);$e!==void 0&&this.trigger("representationChange",{period:H,type:f.value.type,representation:$e});break}case"encryption-data-encountered":if(((ue=this._currentContentInfo)==null?void 0:ue.contentId)!==f.contentId)return;i.setValue(f.value);break;case"manifest-ready":{if(((Le=this._currentContentInfo)==null?void 0:Le.contentId)!==f.contentId)return;let H=f.value.manifest;try{let ae=nte(H);ae.length>0&&Ye(this._settings.worker,{type:"codec-support-update",value:ae})}catch(ae){this._onFatalError(ae)}this._currentContentInfo.manifest=H,this._startPlaybackIfReady(s);break}case"manifest-update":if(((Re=this._currentContentInfo)==null?void 0:Re.contentId)!==f.contentId)return;let ms=(ne=this._currentContentInfo)==null?void 0:ne.manifest;if(w(ms)){k.error("MTCI: Manifest update but no Manifest loaded");return}HX(ms,f.value.manifest,f.value.updates),(Wt=(de=this._currentContentInfo)==null?void 0:de.streamEventsEmitter)==null||Wt.onManifestUpdate(ms);try{let H=nte(ms);H.length>0&&Ye(this._settings.worker,{type:"codec-support-update",value:H})}catch(H){this._onFatalError(H)}this.trigger("manifestUpdate",f.value.updates);break;case"update-playback-rate":if(((Pt=this._currentContentInfo)==null?void 0:Pt.contentId)!==f.contentId)return;r.setPlaybackRate(f.value);break;case"bitrate-estimate-change":if(((Ot=this._currentContentInfo)==null?void 0:Ot.contentId)!==f.contentId)return;this.trigger("bitrateEstimateChange",{type:f.value.bufferType,bitrate:f.value.bitrate});break;case"inband-event":if(((Rr=this._currentContentInfo)==null?void 0:Rr.contentId)!==f.contentId)return;this.trigger("inbandEvents",f.value);break;case"locked-stream":{if(((Mr=this._currentContentInfo)==null?void 0:Mr.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let H=ce(this._currentContentInfo.manifest.periods,ae=>ae.id===f.value.periodId);if(H===void 0)return;(sh=this._currentContentInfo.rebufferingController)==null||sh.onLockedStream(f.value.bufferType,H);break}case"period-stream-ready":{if(((uh=this._currentContentInfo)==null?void 0:uh.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let H=ce(this._currentContentInfo.manifest.periods,ge=>ge.id===f.value.periodId);if(H===void 0)return;let ae=new oe(void 0);ae.onUpdate(ge=>{if(this._currentContentInfo===null){ae.finish();return}w(ge)||ge.representations.onUpdate(($e,kt)=>{if(this._currentContentInfo===null){kt();return}Ye(this._settings.worker,{type:"rep-update",contentId:this._currentContentInfo.contentId,value:{periodId:f.value.periodId,adaptationId:ge.adaptationId,bufferType:f.value.bufferType,choice:$e}})}),Ye(this._settings.worker,{type:"track-update",contentId:this._currentContentInfo.contentId,value:{periodId:f.value.periodId,bufferType:f.value.bufferType,choice:w(ge)?ge:{adaptationId:ge.adaptationId,switchingMode:ge.switchingMode,initialRepresentations:ge.representations.getValue(),relativeResumingPosition:ge.relativeResumingPosition}}})}),this.trigger("periodStreamReady",{period:H,type:f.value.bufferType,adaptationRef:ae});break}case"period-stream-cleared":{if(((lh=this._currentContentInfo)==null?void 0:lh.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let H=ce(this._currentContentInfo.manifest.periods,ae=>ae.id===f.value.periodId);if(H===void 0)return;this.trigger("periodStreamCleared",{period:H,type:f.value.bufferType});break}case"discontinuity-update":if(((dh=this._currentContentInfo)==null?void 0:dh.contentId)!==f.contentId||this._currentContentInfo.manifest===null)return;let mc=ce(this._currentContentInfo.manifest.periods,H=>H.id===f.value.periodId);if(mc===void 0){k.warn("MTCI: Discontinuity's Period not found",f.value.periodId);return}(ch=this._currentContentInfo.rebufferingController)==null||ch.updateDiscontinuityInfo({period:mc,bufferType:f.value.bufferType,discontinuity:f.value.discontinuity,position:f.value.position});break;case"push-text-data":{if(((fc=this._currentContentInfo)==null?void 0:fc.contentId)!==f.contentId)return;if(n===null)k.warn("Init: Received AddTextData message but no text displayer exists");else try{let H=n.pushTextData(f.value);Ye(this._settings.worker,{type:"add-text-success",contentId:f.contentId,value:{ranges:H}})}catch(H){let ae=H instanceof Error?H.message:"Unknown error";Ye(this._settings.worker,{type:"push-text-error",contentId:f.contentId,value:{message:ae}})}break}case"remove-text-data":{if(((fh=this._currentContentInfo)==null?void 0:fh.contentId)!==f.contentId)return;if(n===null)k.warn("Init: Received RemoveTextData message but no text displayer exists");else try{let H=n.removeBuffer(f.value.start,f.value.end);Ye(this._settings.worker,{type:"remove-text-success",contentId:f.contentId,value:{ranges:H}})}catch(H){let ae=H instanceof Error?H.message:"Unknown error";Ye(this._settings.worker,{type:"remove-text-error",contentId:f.contentId,value:{message:ae}})}break}case"reset-text-displayer":{if(((mh=this._currentContentInfo)==null?void 0:mh.contentId)!==f.contentId)return;n===null?k.warn("Init: Received ResetTextDisplayer message but no text displayer exists"):n.reset();break}case"stop-text-displayer":{if(((ph=this._currentContentInfo)==null?void 0:ph.contentId)!==f.contentId)return;n===null?k.warn("Init: Received StopTextDisplayer message but no text displayer exists"):n.stop();break}case"reloading-media-source":{if(((gh=this._currentContentInfo)==null?void 0:gh.contentId)!==f.contentId)return;d(f.value.timeOffset,f.value.minimumPosition,f.value.maximumPosition)}break;case"needs-decipherability-flush":{if(((hh=this._currentContentInfo)==null?void 0:hh.contentId)!==f.contentId)return;let H=Yo(e);if(Mp(H==null?void 0:H[0]))d(0,void 0,void 0);else{let ae=r.getReference().getValue(),ge=ae.position.getWanted();ge+.001{switch(typeof ae){case"string":case"number":case"boolean":case"undefined":return ae;case"object":return ae===null?null:XO(ae);default:ur(ae)}});switch(f.value.logLevel){case"NONE":break;case"ERROR":k.error(...H);break;case"WARNING":k.warn(...H);break;case"INFO":k.info(...H);break;case"DEBUG":k.debug(...H);break;default:ur(f.value.logLevel)}break}case"init-success":case"init-error":break;case"segment-sink-store-update":{if(((yh=this._currentContentInfo)==null?void 0:yh.contentId)!==f.contentId)return;let H=this._segmentMetrics.resolvers[f.value.messageId];H!==void 0?(H(f.value.segmentSinkMetrics),delete this._segmentMetrics.resolvers[f.value.messageId]):k.error("MTCI: Failed to send segment sink store update");break}default:ur(f)}};this._settings.worker.addEventListener("message",c),this._initCanceller.signal.register(()=>{this._settings.worker.removeEventListener("message",c)})}dispose(){var e;this._initCanceller.cancel(),this._currentContentInfo!==null&&((e=this._currentContentInfo.mainThreadMediaSource)==null||e.dispose(),this._currentContentInfo=null)}_onFatalError(e){this._initCanceller.isUsed()||(this._initCanceller.cancel(),this.trigger("error",e))}_initializeContentDecryption(e,r,n,i,a){let{keySystems:o}=this._settings,s=f=>{n.setValue(1),r.onUpdate((y,v)=>{if(y===null)return;v();let b=new ze("MEDIA_IS_ENCRYPTED_ERROR",f);this._onFatalError(b)},{clearSignal:a});let p=new oe({initializationState:{type:"initialized",value:null},drmSystemId:void 0});return p.finish(),p};if(o.length===0)return s("No `keySystems` option given.");if(Ee.decrypt===null)return s("EME feature not activated.");let d=new oe({initializationState:{type:"uninitialized",value:null},drmSystemId:void 0},a),c=Ee.decrypt;if(!c.hasEmeApis())return s("EME API not available on the current page.");k.debug("MTCI: Creating ContentDecryptor");let m=new c(e,o);return m.addEventListener("keyIdsCompatibilityUpdate",f=>{if(this._currentContentInfo===null||this._currentContentInfo.manifest===null)return;let p=zX(this._currentContentInfo.manifest,f);Rp&&p.some(y=>y.representation.decipherable!==!0)?i():Ye(this._settings.worker,{type:"decipherability-update",contentId:this._currentContentInfo.contentId,value:p.map(y=>({representationUniqueId:y.representation.uniqueId,decipherable:y.representation.decipherable}))}),this.trigger("decipherabilityUpdate",p)}),m.addEventListener("blackListProtectionData",f=>{if(this._currentContentInfo===null||this._currentContentInfo.manifest===null)return;let p=jX(this._currentContentInfo.manifest,f);Rp&&p.some(y=>y.representation.decipherable!==!0)?i():Ye(this._settings.worker,{type:"decipherability-update",contentId:this._currentContentInfo.contentId,value:p.map(y=>({representationUniqueId:y.representation.uniqueId,decipherable:y.representation.decipherable}))}),this.trigger("decipherabilityUpdate",p)}),m.addEventListener("stateChange",f=>{f===1?n.onUpdate((p,y)=>{p===0?n.setValue(1):p===2&&(y(),f===1&&m.attach())},{clearSignal:a,emitCurrentValue:!0}):f===2&&(d.setValue({initializationState:{type:"initialized",value:null},drmSystemId:m.systemId}),m.removeEventListener("stateChange"))}),m.addEventListener("error",f=>{this._onFatalError(f)}),m.addEventListener("warning",f=>{this.trigger("warning",f)}),r.onUpdate(f=>{f!==null&&m.onInitializationData(f)},{clearSignal:a}),a.register(()=>{m.dispose()}),d}_hasTextBufferFeature(){return this._settings.textTrackOptions.textTrackMode==="html"&&Ee.htmlTextDisplayer!==null||Ee.nativeTextDisplayer!==null}_reload(e,r,n,i,a,o){this._currentMediaSourceCanceller.cancel(),this._currentMediaSourceCanceller=new X,this._currentMediaSourceCanceller.linkToSignal(this._initCanceller.signal),i.setValue(1),this.trigger("reloadingMediaSource",{position:a,autoPlay:o}),i.onUpdate((s,d)=>{if(s!==2)return;d();let c=this._setUpModulesOnNewMediaSource({initialTime:a,autoPlay:o,mediaElement:e,textDisplayer:r,playbackObserver:n},this._currentMediaSourceCanceller.signal);if(!this._currentMediaSourceCanceller.isUsed()&&c!==null&&this._currentContentInfo!==null){let m=this._currentContentInfo.contentId;c.listen(f=>{Ye(this._settings.worker,{type:"observation",contentId:m,value:le(f,{position:f.position.serialize()})})},{includeLastObservation:!0,clearSignal:this._currentMediaSourceCanceller.signal})}},{clearSignal:this._currentMediaSourceCanceller.signal,emitCurrentValue:!0})}_setUpModulesOnNewMediaSource(e,r){if(r.isCancelled())return null;if(this._currentContentInfo===null)return k.error("MTCI: Setting up modules without a contentId"),null;if(this._currentContentInfo.manifest===null)return k.error("MTCI: Setting up modules without a loaded Manifest"),null;let{manifest:n,mainThreadMediaSource:i}=this._currentContentInfo,{speed:a}=this._settings,{initialTime:o,autoPlay:s,mediaElement:d,textDisplayer:c,playbackObserver:m}=e;this._currentContentInfo.initialTime=o,this._currentContentInfo.autoPlay=s;let{autoPlayResult:f,initialPlayPerformed:p}=ku({mediaElement:d,playbackObserver:m,startTime:o,mustAutoPlay:s,onWarning:S=>this.trigger("warning",S),isDirectfile:!1},r);this._currentContentInfo.initialPlayPerformed=p;let y=Zp(m,{autoPlay:s,initialPlayPerformed:p,manifest:n,mediaSource:i,speed:a,textDisplayer:c},r);if(r.isCancelled())return null;let v=new Va(m,n,a);v.addEventListener("stalled",S=>this.trigger("stalled",S)),v.addEventListener("unstalled",()=>this.trigger("unstalled",null)),v.addEventListener("warning",S=>this.trigger("warning",S)),r.register(()=>{v.destroy()}),v.start(),this._currentContentInfo.rebufferingController=v;let b=this._currentContentInfo;p.onUpdate((S,I)=>{if(S){I();let E=new Eu(n,d,m);b.streamEventsEmitter=E,E.addEventListener("event",R=>{this.trigger("streamEvent",R)},r),E.addEventListener("eventSkip",R=>{this.trigger("streamEventSkip",R)},r),E.start(),r.register(()=>{E.stop()})}},{clearSignal:r,emitCurrentValue:!0});let T=async()=>{this._segmentMetrics.lastMessageId++;let S=this._segmentMetrics.lastMessageId;return Ye(this._settings.worker,{type:"pull-segment-sink-store-infos",value:{messageId:S}}),new Promise((I,E)=>{this._segmentMetrics.resolvers[S]=I;let R=M=>(delete this._segmentMetrics.resolvers[S],E(M));r.register(R)})};return f.then(()=>{Tu(m,d,!1,r).onUpdate((S,I)=>{S&&(I(),this.trigger("loaded",{getSegmentSinkMetrics:T}))},{emitCurrentValue:!0,clearSignal:r})}).catch(S=>{r.isCancelled()||this._onFatalError(S)}),y}_startPlaybackIfReady(e){if(this._currentContentInfo===null||this._currentContentInfo.manifest===null)return!1;let r=e.drmInitializationStatus.getValue();if(r.initializationState.type!=="initialized"||e.mediaSourceStatus.getValue()!==2)return!1;let{contentId:i,manifest:a}=this._currentContentInfo;k.debug("MTCI: Calculating initial time");let o=tg(a,this._settings.lowLatencyMode,this._settings.startAt);k.debug("MTCI: Initial time calculated:",o);let{enableFastSwitching:s,onCodecSwitch:d}=this._settings.bufferOptions,c=this._setUpModulesOnNewMediaSource({initialTime:o,autoPlay:this._settings.autoPlay,mediaElement:e.mediaElement,textDisplayer:e.textDisplayer,playbackObserver:e.playbackObserver},this._currentMediaSourceCanceller.signal);if(this._currentMediaSourceCanceller.isUsed()||c===null)return!0;let m=c.getReference().getValue(),f=le(m,{position:m.position.serialize()});return Ye(this._settings.worker,{type:"start",contentId:i,value:{initialTime:o,initialObservation:f,drmSystemId:r.drmSystemId,enableFastSwitching:s,onCodecSwitch:d}}),c.listen(p=>{Ye(this._settings.worker,{type:"observation",contentId:i,value:le(p,{position:p.position.serialize()})})},{includeLastObservation:!1,clearSignal:this._currentMediaSourceCanceller.signal}),this.trigger("manifestReady",a),!0}_onCreateMediaSourceMessage(e,r,n,i){var a;if(((a=this._currentContentInfo)==null?void 0:a.contentId)!==e.contentId)k.info("MTCI: Ignoring MediaSource attachment due to wrong `contentId`");else{let{mediaSourceId:o}=e;try{n.onUpdate((s,d)=>{if(this._currentContentInfo===null){d();return}if(s===1){d();let c=new ja(o);this._currentContentInfo.mainThreadMediaSource=c,c.addEventListener("mediaSourceOpen",()=>{Ye(i,{type:"media-source-ready-state-change",mediaSourceId:o,value:"open"})}),c.addEventListener("mediaSourceEnded",()=>{Ye(i,{type:"media-source-ready-state-change",mediaSourceId:o,value:"ended"})}),c.addEventListener("mediaSourceClose",()=>{Ye(i,{type:"media-source-ready-state-change",mediaSourceId:o,value:"closed"})});let m=null;c.handle.type==="handle"?r.srcObject=c.handle.value:(m=URL.createObjectURL(c.handle.value),r.src=m),this._currentMediaSourceCanceller.signal.register(()=>{c.dispose(),ea(r,m)}),n.setValue(2)}},{emitCurrentValue:!0,clearSignal:this._currentMediaSourceCanceller.signal})}catch(s){let d=new Jt("NONE","Unknown error when creating the MediaSource");this._onFatalError(d)}}}};function D8e(t,e,...r){for(let n of r)n[0].onUpdate(i=>{Ye(t,{type:"ref-update",value:{name:n[1],newVal:i}})},{clearSignal:e,emitCurrentValue:!0})}function XO(t){var e;switch(t.name){case"NetworkError":return new rn(t.code,new ht(t.baseError.url,t.baseError.status,t.baseError.type));case"MediaError":return new he(t.code,t.reason,{tracks:t.tracks});case"EncryptedMediaError":return t.code==="KEY_STATUS_CHANGE_ERROR"?new ze(t.code,t.reason,{keyStatuses:(e=t.keyStatuses)!=null?e:[]}):new ze(t.code,t.reason);case"OtherError":return new Jt(t.code,t.reason)}}function nte(t){let e=[],r=new Map;return t.periods.forEach(i=>{var a,o,s;[...(a=i.adaptations.audio)!=null?a:[],...(o=i.adaptations.video)!=null?o:[],...(s=i.adaptations.text)!=null?s:[]].forEach(d=>{let c=!1;d.representations.forEach(m=>{var v,b;if(m.isSupported!==void 0){!c&&m.isSupported&&(c=!0);return}let f=!1,p=(v=m.mimeType)!=null?v:"",y=(b=m.codecs)!=null?b:[];y.length===0&&(y=[""]);for(let T of y)if(f=n(p,T),f){m.codecs=[T];break}m.isSupported=f,m.isSupported&&(c=!0),c?d.isSupported=!0:d.isSupported!==!1&&(d.isSupported=!1)})}),["audio","video"].forEach(d=>{let c=i.adaptations[d];if(c!==void 0&&c.every(m=>m.isSupported===!1))throw new he("MANIFEST_INCOMPATIBLE_CODECS_ERROR","No supported "+d+" adaptations",{tracks:void 0})})}),e;function n(i,a){var d;let o=(d=r.get(i))==null?void 0:d.get(a),s;if(o!==void 0)s=o;else{let c=`${i};codecs="${a}"`;s=Ep(c),e.push({mimeType:i,codec:a,result:s});let m=r.get(i);if(m!==void 0)m.set(a,s);else{let f=new Map;f.set(a,s),r.set(i,f)}}return s}}function ite(t){return t instanceof Ir?t:t instanceof Error?new Ir(t.name,t.message,t.name==="QuotaExceededError"):new Ir("Error","Unknown SourceBufferError Error",!1)}function ZO(t){t.multithread={init:Fg}}u();l();function ate(t,e,r){p("textTrackChange","subtitle"),p("videoRepresentationChange","videoRepresentation"),p("audioRepresentationChange","audioRepresentation"),p("error","error"),p("volumeChange","volumeInfo"),p("audioTrackChange","audioTrack"),p("videoTrackChange","videoTrack"),p("availableAudioTracksChange","availableAudioTracks"),p("availableVideoTracksChange","availableVideoTracks"),p("availableTextTracksChange","availableSubtitles");let n=null;function i(){a(),n=window.setInterval(v,100),v();function v(){let b=t.getPosition(),T=t.getMediaDuration(),S=t.getVideoTrack(),I=t.getLivePosition(),E=t.getMaximumPosition(),R=t.getCurrentBufferGap();R=!isFinite(R)||isNaN(R)?0:R;let M=I!=null?I:E;e.updateBulk({currentTime:t.getPosition(),wallClockDiff:t.getWallClockTime()-b,bufferGap:R,duration:Number.isNaN(T)?void 0:T,livePosition:I,minimumPosition:t.getMinimumPosition(),maximumPosition:E,liveGap:typeof M=="number"?M-t.getPosition():void 0,playbackRate:t.getPlaybackRate(),videoTrackHasTrickMode:S!=null&&S.trickModeTracks!==void 0&&S.trickModeTracks.length>0})}}function a(){n!==null&&(clearInterval(n),n=null)}r.addEventListener("abort",a),t.addEventListener("playerStateChange",y),r.addEventListener("abort",()=>{t.removeEventListener("playerStateChange",y)});async function o(){var v,b,T;if(t.getPlayerState()!=="STOPPED")try{let S=await t.__priv_getSegmentSinkMetrics(),I=(v=S==null?void 0:S.segmentSinks.audio.segmentInventory)!=null?v:null;Array.isArray(I)&&(I=I.slice());let E=(b=S==null?void 0:S.segmentSinks.text.segmentInventory)!=null?b:null;Array.isArray(E)&&(E=E.slice());let R=(T=S==null?void 0:S.segmentSinks.video.segmentInventory)!=null?T:null;Array.isArray(R)&&(R=R.slice()),e.update("bufferedData",{audio:I,video:R,text:E})}catch(S){}}let s=setInterval(o,100);o().catch(()=>{}),r.addEventListener("abort",()=>{clearInterval(s)}),t.addEventListener("warning",f),r.addEventListener("abort",()=>{t.removeEventListener("warning",f)}),t.addEventListener("brokenRepresentationsLock",d),r.addEventListener("abort",()=>{t.removeEventListener("brokenRepresentationsLock",d)}),t.addEventListener("videoTrackChange",c),r.addEventListener("abort",()=>{t.removeEventListener("videoTrackChange",c)}),t.addEventListener("audioTrackChange",m),r.addEventListener("abort",()=>{t.removeEventListener("audioTrackChange",m)});function d(v){let b=t.getCurrentPeriod();v.period.id===(b==null?void 0:b.id)&&(v.trackType==="video"?e.update("videoRepresentationsLocked",!1):v.trackType==="audio"&&e.update("audioRepresentationsLocked",!1))}function c(v){let b=t.getLockedVideoRepresentations()!==null;e.updateBulk({videoRepresentationsLocked:b,videoTrackHasTrickMode:v!=null&&v.trickModeTracks!==void 0&&v.trickModeTracks.length>0})}function m(){let v=t.getLockedAudioRepresentations()!==null;e.update("audioRepresentationsLocked",v)}function f(v){if("code"in v)switch(v.code){case"MEDIA_ERR_NOT_LOADED_METADATA":e.update("cannotLoadMetadata",!0);break;case"MEDIA_ERR_BLOCKED_AUTOPLAY":e.update("autoPlayBlocked",!0);break}}function p(v,b){t.addEventListener(v,T);function T(S){e.update(b,S)}r.addEventListener("abort",()=>{t.removeEventListener(v,T)})}function y(v){var T;let b={cannotLoadMetadata:!1,hasEnded:v==="ENDED",hasCurrentContent:!["STOPPED","LOADING"].includes(v),isContentLoaded:!["STOPPED","LOADING","RELOADING"].includes(v),isBuffering:v==="BUFFERING"||v==="FREEZING",isLoading:v==="LOADING",isReloading:v==="RELOADING",isSeeking:v==="SEEKING",isStopped:v==="STOPPED"};switch(v){case"LOADING":b.useWorker=((T=t.getCurrentModeInformation())==null?void 0:T.useWorker)===!0;break;case"ENDED":b.autoPlayBlocked=!1,b.isPaused=!0;break;case"PAUSED":b.isPaused=!0;break;case"PLAYING":b.autoPlayBlocked=!1,b.isPaused=!1;break;case"LOADED":i(),b.isPaused=!0,b.isLive=t.isLive();break;case"STOPPED":a(),b.audioRepresentation=void 0,b.autoPlayBlocked=!1,b.videoRepresentation=void 0,b.availableVideoTracks=[],b.availableAudioTracks=[],b.availableSubtitles=[],b.lowLatencyMode=!1,b.subtitle=null,b.audioTrack=null,b.videoTrack=null,b.currentTime=void 0,b.wallClockDiff=void 0,b.bufferGap=0,b.bufferedData=null,b.duration=void 0,b.minimumPosition=void 0,b.maximumPosition=void 0,b.livePosition=void 0,b.useWorker=!1;break}v!=="STOPPED"&&(b.error=null),e.updateBulk(b)}}u();l();u();l();u();l();function JI(t,e,r,n){let i=[];return r(t,{onChunk(a){let o=a(void 0),s,d,c=t.representation.getMimeTypeString();o.segmentType==="init"?(s=o.initializationData,d=0):(s=o.chunkData,d=o.chunkOffset);let m;s===null?m=Promise.resolve(null):m=e.appendBuffer(s,{appendWindow:[t.period.start,t.period.end],timestampOffset:d,codec:c}),i.push(m)},onAllChunksReceived(){},onRetry(a){k.warn("Retrying segment request",a)}},n).then(()=>Promise.all(i))}u();l();var q8e=Dt();function JO(t,e,r){return nn(r,(n,i)=>{if(w(Ka))throw new Error("No MediaSource Object was found in the current browser.");let a=G(t.src)?t.src:null;ea(t,a),k.info("Init: Creating MediaSource");let o=new ja(q8e());if(o.handle.type==="handle")t.srcObject=o.handle.value,r.register(()=>{ea(t,null)});else{let d=URL.createObjectURL(o.handle.value);k.info("Init: Attaching MediaSource URL to the media element",d),t.src=d,r.register(()=>{ea(t,d)})}return o.addEventListener("mediaSourceOpen",s),()=>{o.removeEventListener("mediaSourceOpen",s)};function s(){try{o.removeEventListener("mediaSourceOpen",s),n(o.addSourceBuffer("video",e))}catch(d){i(d)}}})}u();l();function eL(t,e,r,n){let i=n!=null?n:600;if(t.buffered.length===0)return Promise.resolve();let a=[];return r-i>0&&a.push(e.remove(0,r-i)),r+i=y){i.splice(d,1),d--;break}}if(i.length===0)return this._videoElement.currentTime=e,k.debug("VTL: Thumbnails already loaded.",e),Promise.resolve(e);k.hasLevel("DEBUG")&&k.debug("VTL: Found thumbnail for time",e,i.map(d=>`start: ${d.time} - end: ${d.end}`).join(", "));let a=ote[n.manifest.transport];if(a===void 0)return this._lastRepresentationInfo!==null&&(this._lastRepresentationInfo.cleaner.cancel(),this._lastRepresentationInfo=null),Promise.reject(new na("NO_LOADER","VideoThumbnailLoaderError: No imported loader for this transport type: "+n.manifest.transport));let o;if(this._lastRepresentationInfo===null){let d=new X,c=qp("video",a.video,null,{},{baseDelay:0,maxDelay:0,maxRetry:0,requestTimeout:Q.getCurrent().DEFAULT_REQUEST_TIMEOUT,connectionTimeout:Q.getCurrent().DEFAULT_CONNECTION_TIMEOUT}),m=n.representation.index.getInitSegment(),f=m!==null?n.representation.uniqueId:null,p=JO(this._videoElement,n.representation.getMimeTypeString(),d.signal).then(async y=>{if(m===null||f===null)return o.initSegmentUniqueId=null,y;let v=le({segment:m},n);return await JI(v,y,o.segmentFetcher,d.signal),y});o={cleaner:d,sourceBuffer:p,content:n,initSegmentUniqueId:f,segmentFetcher:c,pendingRequests:[]},this._lastRepresentationInfo=o}else o=this._lastRepresentationInfo;tL(o.pendingRequests,i);let s=new X;return o.sourceBuffer.catch(d=>{throw this._lastRepresentationInfo!==null&&(this._lastRepresentationInfo.cleaner.cancel(),this._lastRepresentationInfo=null),new na("LOADING_ERROR","VideoThumbnailLoaderError: Error when initializing buffers: "+String(d))}).then(async d=>{if(tL(o.pendingRequests,i),k.debug("VTL: Removing buffer around time.",e),await eL(this._videoElement,d,e,void 0),s.signal.cancellationError!==null)throw s.signal.cancellationError;tL(o.pendingRequests,i);let c=[];for(let m of i){let f=ce(o.pendingRequests,({segmentId:p})=>p===m.id);if(f!==void 0)c.push(f.promise);else{let p=new X,y=p.linkToSignal(o.cleaner.signal),v=le({segment:m},n),b=JI(v,d,o.segmentFetcher,p.signal).then(y,I=>{throw y(),I}),T={segmentId:m.id,canceller:p,promise:b};o.pendingRequests.push(T);let S=()=>{let I=o.pendingRequests.indexOf(T);I>=0&&o.pendingRequests.splice(I,1)};b.then(S,S),c.push(b)}}return await Promise.all(c),this._videoElement.currentTime=e,e}).catch(d=>{throw d instanceof yt?new na("ABORTED","VideoThumbnailLoaderError: Aborted job."):d})}dispose(){this._lastRepresentationInfo!==null&&(this._lastRepresentationInfo.cleaner.cancel(),this._lastRepresentationInfo=null)}};function U8e(t,e){return t.representation.id===e.representation.id&&t.adaptation.id===e.adaptation.id&&t.period.id===e.period.id&&t.manifest.id===e.manifest.id}function F8e(t,e){var n,i;let r=e.getPeriodForTime(t);if(r===void 0||r.adaptations.video===void 0||r.adaptations.video.length===0)return null;for(let a of r.adaptations.video){let o=(i=(n=a.trickModeTracks)==null?void 0:n[0].representations)==null?void 0:i[0];if(!w(o))return{manifest:e,period:r,adaptation:a,representation:o}}return null}function tL(t,e){t.filter(r=>!e.some(({id:n})=>n===r.segmentId)).forEach(r=>{r.canceller.cancel()})}var rL=zg;u();l();var jg=class{constructor(e,r){this._rxPlayer=e,this._state=r,this._catchUpAborter=null}enableCatchUp(){var n;if(this._catchUpAborter!==null)return;this._catchUpAborter=new AbortController;let e=null,r=()=>{var o;e!==null&&(clearInterval(e),e=null);let i=this._rxPlayer.getPlayerState(),a=i==="LOADED"||i==="PLAYING"||i==="PAUSED"||i==="BUFFERING"||i==="FREEZING"||i==="SEEKING";if(!this._rxPlayer.isLive())this.stopCatchUp();else if(!a)this._rxPlayer.setPlaybackRate(1),this._state.updateBulk({isCatchingUp:!1,playbackRate:1});else{let s=()=>{var v;let d=(v=this._rxPlayer.getLivePosition())!=null?v:this._rxPlayer.getMaximumPosition();if(d===null){this._rxPlayer.setPlaybackRate(1),this._state.updateBulk({isCatchingUp:!1,playbackRate:1});return}let c=this._rxPlayer.getPosition(),m=d-c;if(m>=15){this._rxPlayer.seekTo(d-3.5),this._rxPlayer.setPlaybackRate(1),this._state.updateBulk({isCatchingUp:!1,playbackRate:1});return}if(this._state.get("isCatchingUp")){if(m<=3.5){this._rxPlayer.setPlaybackRate(1),this._state.updateBulk({isCatchingUp:!1,playbackRate:1});return}}else if(m<6)return;let f=(m-3.5)/4,p=Math.round(Math.min(5,1.1+f)*10)/10;if(p<=1){this._rxPlayer.setPlaybackRate(1),this._state.updateBulk({isCatchingUp:!1,playbackRate:1});return}let y=this._rxPlayer.getPlaybackRate();p!==y&&this._rxPlayer.setPlaybackRate(p),this._state.updateBulk({isCatchingUp:!0,playbackRate:p})};e=window.setInterval(s,200),s(),(o=this._catchUpAborter)==null||o.signal.addEventListener("abort",()=>{e!==null&&(clearInterval(e),e=null)})}};this._rxPlayer.addEventListener("playerStateChange",r),(n=this._catchUpAborter)==null||n.signal.addEventListener("abort",()=>{this._rxPlayer.removeEventListener("playerStateChange",r)})}stopCatchUp(){this._catchUpAborter!==null&&(this._catchUpAborter.abort(),this._catchUpAborter=null,this._rxPlayer.setPlaybackRate(1),this._state.updateBulk({isCatchUpEnabled:!1,isCatchingUp:!1,playbackRate:1}))}};u();l();function eT(t,e){return class{constructor(r){this._listeners={};let n=t();this._stateObject=n,this._abortController=new AbortController;let i=o=>{let s=this._listeners[o];Array.isArray(s)&&s.slice().forEach(d=>{try{d(n[o])}catch(c){console.error("EventEmitter: listener error",c instanceof Error?c:null)}})},a={get(o){return n[o]},update(o,s){n[o]=s,i(o)},updateBulk(o){Object.assign(n,o);for(let s of Object.keys(o))i(s)}};this.actions=e(r,a,this._abortController.signal)}getState(r){return this._stateObject[r]}listenToState(r,n){let i=this._listeners[r];return Array.isArray(i)?i.push(n):this._listeners[r]=[n],()=>{let a=this._listeners[r];if(!Array.isArray(a))return;let o=a.indexOf(n);o!==-1&&a.splice(o,1),a.length===0&&delete this._listeners[r]}}destroy(){return this._listeners={},this._abortController.abort()}}}Fd.addFeatures([N0,V0,H0,Q0,tO,rO,EO,BO,WO,QO,U0,ZO]);window.RxPlayer=Fd;rL.addLoader(Kg);var K8e=eT(()=>({audioRepresentation:void 0,audioRepresentationsLocked:!1,autoPlayBlocked:!1,availableAudioTracks:[],availableSubtitles:[],availableVideoTracks:[],bufferGap:0,bufferedData:null,cannotLoadMetadata:!1,currentTime:void 0,defaultAudioRepresentationsSwitchingMode:"reload",defaultVideoRepresentationsSwitchingMode:"reload",duration:void 0,error:null,hasCurrentContent:!1,hasEnded:!1,isBuffering:!1,isCatchUpEnabled:!1,isCatchingUp:!1,isContentLoaded:!1,isLive:!1,isLoading:!1,isPaused:!1,isReloading:!1,isSeeking:!1,isStopped:!0,audioTrack:void 0,liveGap:void 0,loadedVideo:null,lowLatencyMode:!1,livePosition:void 0,maximumPosition:void 0,minimumPosition:void 0,playbackRate:1,relyOnWorker:!1,useWorker:!1,subtitle:void 0,videoRepresentation:void 0,videoRepresentationsLocked:!1,videoTrack:void 0,volumeInfo:{volume:1,muted:!1},wallClockDiff:void 0,videoTrackHasTrickMode:!1,videoThumbnailsElement:null,videoThumbnailLoader:null}),(t,e,r)=>{let n=!1,p=t,{debugElement:i,textTrackElement:a}=p,o=AL(p,["debugElement","textTrackElement"]),s=new Fd(o),d;window.player=window.rxPlayer=s,ate(s,e,r);let c=new jg(s,e);return r.addEventListener("abort",()=>{s.dispose(),d!==void 0&&d.dispose()}),{attachVideoThumbnailLoader(){let y=e.get("videoThumbnailLoader");y!==null&&y.dispose();let v=document.createElement("video"),b=new rL(v,s);e.updateBulk({videoThumbnailLoader:b,videoThumbnailsElement:v})},dettachVideoThumbnailLoader(){m()},setVolume(y){s.setVolume(y)},updateWorkerMode(y){y&&!n&&f(s),e.update("relyOnWorker",y)},load(y){m(),s.loadVideo(Object.assign({mode:e.get("relyOnWorker")?"auto":"main",textTrackElement:a,transportOptions:{checkMediaSegmentIntegrity:!0}},y));let v={loadedVideo:y,lowLatencyMode:y.lowLatencyMode===!0};e.updateBulk(v)},play(){s.play().catch(()=>{});let y=e.get("isStopped"),v=e.get("hasEnded");!y&&!v&&e.update("isPaused",!1)},pause(){s.pause();let y=e.get("isStopped"),v=e.get("hasEnded");!y&&!v&&e.update("isPaused",!0)},stop(){m(),s.stop()},seek(y){s.seekTo({position:y})},mute(){s.mute()},unmute(){s.unMute()},setDefaultVideoRepresentationSwitchingMode(y){e.update("defaultVideoRepresentationsSwitchingMode",y)},setDefaultAudioRepresentationSwitchingMode(y){e.update("defaultAudioRepresentationsSwitchingMode",y)},lockVideoRepresentations(y){s.lockVideoRepresentations({representations:y.map(v=>v.id),switchingMode:e.get("defaultVideoRepresentationsSwitchingMode")}),e.update("videoRepresentationsLocked",s.getLockedVideoRepresentations()!==null)},unlockVideoRepresentations:()=>{s.unlockVideoRepresentations(),e.update("videoRepresentationsLocked",s.getLockedVideoRepresentations()!==null)},lockAudioRepresentations(y){s.lockAudioRepresentations({representations:y.map(v=>String(v.id)),switchingMode:e.get("defaultAudioRepresentationsSwitchingMode")}),e.update("audioRepresentationsLocked",s.getLockedAudioRepresentations()!==null)},unlockAudioRepresentations:()=>{s.unlockAudioRepresentations(),e.update("audioRepresentationsLocked",s.getLockedAudioRepresentations()!==null)},setAudioTrack(y){s.setAudioTrack(y.id)},setVideoTrack(y){s.setVideoTrack(y.id)},disableVideoTrack(){s.disableVideoTrack()},setTextTrack(y){s.setTextTrack(y.id)},disableSubtitlesTrack(){s.disableTextTrack()},setPlaybackRate(y){s.setPlaybackRate(y),e.update("playbackRate",y)},enableLiveCatchUp(){c.enableCatchUp()},disableLiveCatchUp(){c.stopCatchUp()},showDebugElement(){d!==void 0&&d.dispose(),d=s.createDebugElement(i)},hideDebugElement(){d!==void 0&&(d.dispose(),d=void 0)},isDebugElementShown(){return d!==void 0}};function m(){let y=e.get("videoThumbnailLoader");y!==null&&(y.dispose(),e.updateBulk({videoThumbnailLoader:null,videoThumbnailsElement:null}))}function f(y){n=!0,y.attachWorker({workerUrl:"./worker.js",dashWasmUrl:"./mpd-parser.wasm"}).catch(v=>{console.error("Error when attaching worker:",v)})}}),ste=K8e;u();l();var wt=Se(Ie());u();l();var Vg=Se(Ie());function z8e({ariaLabel:t,className:e="",onClick:r,value:n,disabled:i,title:a}){return i?Vg.createElement("button",{"aria-label":t,disabled:!0,className:e+" disabled",title:a},n):Vg.createElement("button",{"aria-label":t,className:e,tabIndex:0,onClick:r,title:a},n)}var jt=Vg.memo(z8e);u();l();var Lu=Se(Ie());u();l();var ute=t=>{let e=Math.floor(t);if(!e)return"00:00";if(e<60)return"00:"+String(e).padStart(2,"0");let r=Math.floor(e/60),n=e%60;return String(r).padStart(2,"0")+":"+String(n).padStart(2,"0")},lte=t=>{let e=Math.floor(t);if(!e)return"00:00";if(e<60)return"00:"+String(e).padStart(2,"0");let r=Math.floor(e/60),n=e%60;if(r<60)return String(r).padStart(2,"0")+":"+String(n).padStart(2,"0");let i=Math.floor(r/60),a=r%60;return String(i).padStart(2,"0")+":"+String(a).padStart(2,"0")+":"+String(n).padStart(2,"0")};function j8e({className:t="",position:e=0,duration:r=0}){let n=r>=3600?lte:ute;return Lu.createElement("div",{className:"position-infos "+t},Lu.createElement("span",{className:"current-position"},n(e)),Lu.createElement("span",{className:"separator"}," / "),Lu.createElement("span",{className:"duration"},n(r)))}var dte=Lu.memo(j8e);u();l();var tT=Se(Ie());function V8e({className:t=""}){return tT.createElement("div",{className:"position-infos live "+t},"Live")}var cte=tT.memo(V8e);u();l();var Za=Se(Ie());function H8e({isStickingToTheLiveEdge:t,changeStickToLiveEdge:e}){let r=Za.useCallback(()=>{e(!t)},[e,t]);return Za.createElement("button",{className:"running"+(t?" clicked":""),"aria-label":"Stay close to the live edge",title:"Stick to the live edge",onClick:r},Za.createElement("svg",{version:"1.1",viewBox:"0 0 21.803 21.803"},Za.createElement("path",{d:"m18.374 16.605l-4.076-2.101-1.107-1.773-0.757-4.503 2.219 1.092-0.375 1.494c-0.13 0.519 0.185 1.041 0.699 1.17 0.077 0.021 0.157 0.03 0.235 0.03 0.432-2e-3 0.823-0.293 0.935-0.729l0.565-2.25c0.11-0.439-0.103-0.897-0.511-1.101 0 0-5.303-2.603-5.328-2.612-0.406-0.188-0.868-0.267-1.342-0.198-0.625 0.088-1.158 0.407-1.528 0.86-0.029 0.027-2.565 3.15-2.565 3.15l-1.95 0.525c-0.514 0.141-0.818 0.668-0.679 1.184 0.116 0.43 0.505 0.713 0.93 0.713 0.083 0 0.168-0.011 0.252-0.033l2.252-0.606c0.196-0.055 0.37-0.167 0.498-0.324l1.009-1.247 0.725 4.026-1.27 1.01c-0.379 0.304-0.541 0.802-0.411 1.269l1.469 5.271c0.148 0.532 0.633 0.881 1.16 0.881 0.107 0 0.216-0.015 0.324-0.045 0.641-0.178 1.016-0.842 0.837-1.482l-1.254-4.502 1.948-1.498 1.151 1.791c0.115 0.186 0.277 0.334 0.471 0.436l4.371 2.25c0.177 0.092 0.363 0.135 0.552 0.135 0.438 0 0.856-0.238 1.072-0.653 0.303-0.6 0.07-1.325-0.521-1.63z"}),Za.createElement("circle",{cx:"8.602",cy:"2.568",r:"2.568"})))}var fte=Za.memo(H8e);u();l();var Nu=Se(Ie());u();l();var rT=Se(Ie());function fe(t,e){let[r,n]=(0,rT.useState)(t.getState(e));return(0,rT.useEffect)(()=>(n(t.getState(e)),t.listenToState(e,a=>n(a))),[t]),r}function G8e({className:t="",player:e}){let r=fe(e,"cannotLoadMetadata"),n=fe(e,"isPaused"),i=fe(e,"isContentLoaded"),a=fe(e,"hasEnded"),o=!i&&!r,s=!n&&i&&!a,d="play-pause-button "+t+(o?" disabled":""),c=Nu.useCallback(()=>{e.actions.play()},[e]),m=Nu.useCallback(()=>{e.actions.disableLiveCatchUp(),e.actions.pause()},[e]);return Nu.createElement(jt,{ariaLabel:"Pause/Resume the content",className:d,disabled:o,onClick:s?m:c,value:String.fromCharCode(s?61516:61515)})}var mte=Nu.memo(G8e);u();l();var Gg=Se(Ie());u();l();function pte(t){document.addEventListener("webkitfullscreenchange",t,!1),document.addEventListener("mozfullscreenchange",t,!1),document.addEventListener("fullscreenchange",t,!1),document.addEventListener("MSFullscreenChange",t,!1)}function gte(t){document.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),document.removeEventListener("fullscreenchange",t,!1),document.removeEventListener("MSFullscreenChange",t,!1)}function Hg(){return!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)}function hte(t){Hg()||(t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT))}function yte(){Hg()&&(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen())}var{useCallback:W8e,useEffect:$8e,useMemo:Y8e,useState:Q8e}=Gg;function X8e({playerWrapperElementRef:t,player:e,className:r}){let n=fe(e,"hasCurrentContent"),i=Y8e(()=>Hg(),[]),[a,o]=Q8e(i);$8e(()=>{let d=()=>{let c=Hg();!c&&t.current!==null&&t.current.classList.remove("fullscreen"),o(c)};return pte(d),()=>{gte(d)}},[t]);let s=W8e(()=>{t.current!==null&&(hte(t.current),t.current.classList.add("fullscreen"))},[t]);return Gg.createElement(jt,{ariaLabel:"Go/Quit fullscreen",className:"fullscreen-button "+r,onClick:a?yte:s,disabled:!n,value:String.fromCharCode(a?61542:61541)})}var vte=Gg.memo(X8e);u();l();var Qe=Se(Ie());u();l();var Zn=Se(Ie());function Z8e({seek:t,position:e,bufferGap:r,minimumPosition:n,maximumPosition:i,onMouseOut:a,onMouseMove:o}){let s=Zn.useRef(null),d=n!=null?n:0,c=i!=null?i:300,m=Math.max(c-d,0),f=Zn.useCallback(I=>{if(s.current===null)return null;let E=s.current.getBoundingClientRect(),R=E.left,M=Math.max(I.clientX-R,0),C=Math.max(E.right-R,0);return C?M/C*m+d:0},[m,d]),p=isFinite(r)?r:0,y=Math.max(e-d,0),v=Math.min((p+y)/m,1)*100,b=Math.min(y/m,1)*100,T=Zn.useCallback(I=>{let E=f(I);E!==null&&t(E)},[f,t]),S=Zn.useCallback(I=>{let E=f(I);E!==null&&o(E,I)},[f,o]);return Zn.createElement("div",{className:"progress-bar-wrapper",ref:s,onClick:T,onMouseOut:a,onMouseMove:S},Zn.createElement("div",{className:"progress-bar-current",style:{width:`${b}%`}}),Zn.createElement("div",{className:"progress-bar-buffered",style:{width:`${v}%`}}))}var bte=Zn.memo(Z8e);u();l();var rc=Se(Ie()),{useEffect:J8e,useRef:e5e}=rc;function t5e({className:t,offset:e,text:r,xPosition:n}){let i=e5e(null);return J8e(()=>{if(isNaN(+n)||!i.current)return;let a=i.current.getBoundingClientRect(),o=a.width,d=-a.height-11,c=n-e-o/2;i.current.style.transform=`translate(${c}px, ${d}px)`}),rc.createElement("div",{className:"tooltip-wrapper",ref:i},rc.createElement("pre",{className:"tooltip "+t},r))}var nT=rc.memo(t5e);u();l();var Jn=Se(Ie());var r5e={backgroundColor:"gray",position:"absolute",width:"100%",height:"100%",opacity:"50%",display:"flex",justifyContent:"center",alignItems:"center"},n5e={width:"50%",margin:"auto"};function nL({xPosition:t,time:e,player:r}){let n=fe(r,"videoThumbnailLoader"),i=fe(r,"videoThumbnailsElement");Jn.useEffect(()=>(r.actions.attachVideoThumbnailLoader(),()=>{r.actions.dettachVideoThumbnailLoader()}),[]);let a=Jn.useRef(null),[o,s]=Jn.useState(!0),d=Math.round(e);return Jn.useEffect(()=>(i!==null&&a.current!==null&&a.current.appendChild(i),()=>{i!==null&&a.current!==null&&a.current.contains(i)&&a.current.removeChild(i)}),[i]),Jn.useEffect(()=>{let c=null,m=null;if(n===null)return;return f(),m!==null&&clearTimeout(m),m=window.setTimeout(()=>{m=null,n.setTime(d).then(p).catch(y=>{typeof y=="object"&&y!==null&&y.code==="ABORTED"||(p(),console.error("Error while loading thumbnails:",y))})},40),()=>{m!==null&&clearTimeout(m),p()};function f(){c===null&&(c=window.setTimeout(()=>{c=null,s(!0)},150))}function p(){c!==null&&(clearTimeout(c),c=null),s(!1)}},[d,n]),Jn.createElement("div",{className:"thumbnail-wrapper",style:t!==null?{transform:`translate(${t}px, -136px)`}:{},ref:a},o?Jn.createElement("div",{style:r5e},Jn.createElement("img",{src:"./assets/spinner.gif",style:n5e})):null)}function i5e({player:t,enableVideoThumbnails:e,onSeek:r}){let n=fe(t,"bufferGap"),i=fe(t,"currentTime"),a=fe(t,"isContentLoaded"),o=fe(t,"isLive"),s=fe(t,"minimumPosition"),d=fe(t,"livePosition"),c=fe(t,"maximumPosition"),[m,f]=Qe.useState(!1),[p,y]=Qe.useState(0),[v,b]=Qe.useState(""),[T,S]=Qe.useState(!1),[I,E]=Qe.useState(0),[R,M]=Qe.useState(null),C=Qe.useRef(null),A=Qe.useCallback((N,B)=>{let U,j,Y;if(o){let se=new Date(N*1e3);U=se.getHours(),j=se.getMinutes(),Y=se.getSeconds()}else U=Math.floor(N/3600),j=Math.floor((N-U*3600)/60),Y=Math.floor(N-(j*60+U*3600));let W=U.toString().padStart(2,"0")+":"+j.toString().padStart(2,"0")+":"+Y.toString().padStart(2,"0");f(!0),y(B),b(W)},[o]),x=Qe.useCallback(()=>{f(!1),y(0),b("")},[o]),O=Qe.useCallback((N,B)=>{let U=N;S(!0),E(B),M(U)},[]),D=Qe.useCallback((N,B)=>{e&&O(N,B)},[O,e]),F=Qe.useCallback(()=>{S(!1),E(0),M(null)},[]),K=Qe.useCallback(N=>{t.actions.seek(N),r()},[t]),P=Qe.useCallback(()=>{x(),F()},[F,x]),L=Qe.useCallback((N,B)=>{let U=t.getState("wallClockDiff"),j=N+(U!=null?U:0);A(j,B.clientX),D(N,B.clientX)},[t,A,D]),V=C.current!==null?C.current.getBoundingClientRect().left:0;if(!a)return Qe.createElement("div",{className:"progress-bar-parent",ref:C},Qe.createElement("div",{className:"progress-bar-wrapper"}));let z=null;if(T){let N=I-V;e&&R!==null&&(z=Qe.createElement(nL,{xPosition:N,time:R,player:t}))}return Qe.createElement("div",{className:"progress-bar-parent",ref:C},m?Qe.createElement(nT,{className:"progress-tip",text:v,xPosition:p,offset:V}):null,z,i===void 0?null:Qe.createElement(bte,{seek:K,onMouseOut:P,onMouseMove:L,position:i,minimumPosition:s,maximumPosition:d!=null?d:c,bufferGap:n}))}var Ste=Qe.memo(i5e);u();l();var nc=Se(Ie());function a5e({className:t="",player:e}){let{muted:r,volume:n}=fe(e,"volumeInfo"),i,a;r||n===0?(i="muted",a=61478):n<=.5?(i="low",a=61479):(i="high",a=61480);let o=nc.useCallback(()=>{r?e.actions.unmute():e.actions.mute(),n===0&&e.actions.setVolume(.3)},[n,r]);return nc.createElement(jt,{ariaLabel:"Mute/Unmute audio",className:`volume-button ${t} ${i}`,onClick:o,value:String.fromCharCode(a),disabled:!1})}var Ite=nc.memo(a5e);u();l();var ia=Se(Ie());function o5e({player:t}){let{volume:e,muted:r}=fe(t,"volumeInfo"),n=ia.useRef(null),i=ia.useCallback(o=>{if(n.current===null)return;let s=n.current.getBoundingClientRect(),d=s.left,c=Math.max(o.clientX-d,0),m=Math.max(s.right-d,0);return m?Math.min(c/m,1):0},[]),a=ia.useCallback(o=>{let s=i(o);s!==void 0&&(s===0?t.actions.mute():(t.actions.setVolume(s),t.actions.unmute()))},[t]);return ia.createElement("div",{className:"volume-bar-wrapper",ref:n,tabIndex:0,onKeyDown:o=>{o.keyCode===39||o.code==="ArrowRight"?t.actions.setVolume(Math.min(1,e+.1)):(o.keyCode===37||o.code==="ArrowLeft")&&t.actions.setVolume(Math.max(0,e-.1))},onClick:a},ia.createElement("div",{className:"volume-bar-current",style:{width:r?"0%":`${e*100}%`}}))}var Tte=ia.memo(o5e);var{useCallback:iL,useMemo:s5e}=wt;function u5e({enableVideoThumbnails:t,player:e,stopVideo:r,toggleSettings:n,playerWrapperElementRef:i}){let a=fe(e,"currentTime"),o=fe(e,"duration"),s=fe(e,"isCatchUpEnabled"),d=fe(e,"isCatchingUp"),c=fe(e,"isContentLoaded"),m=fe(e,"isLive"),f=fe(e,"isPaused"),p=fe(e,"isStopped"),y=fe(e,"liveGap"),v=fe(e,"lowLatencyMode"),b=fe(e,"livePosition"),T=fe(e,"maximumPosition"),S=fe(e,"playbackRate"),I=iL(O=>{O?e.actions.enableLiveCatchUp():e.actions.disableLiveCatchUp()},[e]),E;m&&v!=null&&y!=null&&(E=v?y<7:y<18);let R=s5e(()=>c?m?wt.createElement(cte,null):wt.createElement(dte,{position:a,duration:o}):null,[c,m,a,o]),M=iL(()=>{I(!1)},[I]),C=iL(()=>{I(!s)},[I,s]),A=m&&E&&!d,x=wt.useCallback(()=>{let O=b!=null?b:T;if(O==null){console.error("Cannot go back to live: live position not found");return}A||e.actions.seek(O-(v?4:10))},[A,e,b,T,v]);return wt.createElement("div",{className:"controls-bar-container"},wt.createElement(Ste,{player:e,enableVideoThumbnails:t,onSeek:M}),wt.createElement("div",{className:"controls-bar"},wt.createElement(mte,{className:"control-button",player:e}),wt.createElement(jt,{className:"control-button",ariaLabel:"Stop playback",onClick:r,value:"\uF04D",disabled:p}),c&&m&&v?wt.createElement(fte,{isStickingToTheLiveEdge:s,changeStickToLiveEdge:C}):null,R,m&&c?wt.createElement(jt,{ariaLabel:A?"We're playing live":"Go back to live",className:"dot"+(A?" live":""),onClick:x,disabled:!!A,value:""}):null,wt.createElement("div",{className:"controls-right-side"},!f&&d&&S>1?wt.createElement("div",{className:"catch-up"},"Catch-up playback rate: "+String(S)):null,wt.createElement(jt,{ariaLabel:"Display/Hide controls",disabled:!c,className:"control-button",onClick:n,value:"\uF013"}),wt.createElement("div",{className:"volume"},wt.createElement(Ite,{className:"control-button",player:e}),wt.createElement(Tte,{player:e})),wt.createElement(vte,{className:"control-button",player:e,playerWrapperElementRef:i}))))}var kte=wt.memo(u5e);u();l();var ee=Se(Ie());u();l();var{localStorage:aL}=window,Wg=!!aL;Wg||console.warn("`localStorage` is not available. You will not be able to store content information.");var Ete=[];function iT(){if(!Wg)return Ete;let t=[],e=aL.getItem("rxPlayerLocalContents");if(e!==null)try{let r=JSON.parse(e);t.push(...r)}catch(r){console.warn("Demo: Can't parse local storage content.")}return t}function _te(t){if(!Wg){Ete=t;return}aL.setItem("rxPlayerLocalContents",JSON.stringify(t))}function Rte(t){let e=iT(),r,n;t.id!=null?(n=e.findIndex(a=>a.id===r),r=t.id):(r=e.reduce((o,s)=>{let d=s.id||0;return Math.max(o,d)},0)+1,n=-1);let i={drmInfos:t.drmInfos,fallbackKeyError:t.fallbackKeyError,fallbackLicenseRequest:t.fallbackLicenseRequest,id:r,localContent:!0,lowLatency:t.lowLatency,name:t.name,transport:t.transport,url:t.url};return n>-1?e.splice(n,1,i):e.push(i),_te(e),i}function Mte(t){let e=iT(),r=e.findIndex(n=>n.id===t);return r<0?!1:(e.splice(r,1),_te(e),!0)}u();l();u();l();function wte(t){let e="";for(let r=0;r=e?r:new Array(e-r.length+1).join("0")+r}function Ate(t){let e=t;e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3));let r=l5e(e),n;if(typeof window.escape!="function")n=escape(r);else{let i=/[A-Za-z0-9*_+-./]/;n="";for(let a=0;a=256?"%u"+Cte(o,4):"%"+Cte(o,2)}}return decodeURIComponent(n)}async function oL(t){return(await Promise.all(t.map(r=>{let{drm:n,fallbackKeyError:i,fallbackLicenseRequest:a,licenseServerUrl:o,serverCertificateUrl:s}=r;if(!o)return;let d=n.toLowerCase(),c={type:d,getLicense:f5e(o,d,!!a),onKeyInternalError:i?"fallback":"error",onKeyOutputRestricted:i?"fallback":"error"};return s?d5e(s).then(m=>(c.serverCertificate=m,c)):c}))).filter(r=>r!==void 0)}function d5e(t){return new Promise((e,r)=>{let n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{if(n.status>=200&&n.status<300){let i=n.response;e(i)}else r()},n.onerror=i=>{r(i)},n.send()})}function c5e(t){let e;t instanceof Uint8Array?e=t:t instanceof ArrayBuffer?e=new Uint8Array(t):e=new Uint8Array(t.buffer);let r=wte(e),n=/(.*)<\/Challenge>/.exec(r);return n?atob(n[1]):Ate(e)}function f5e(t,e,r){let n=e.indexOf("playready")!==-1;return i=>{let a=n?c5e(i):i,o=new XMLHttpRequest;return o.open("POST",t,!0),new Promise((s,d)=>{o.onerror=()=>{let c=new Error("getLicense's request failed on an error");c.fallbackOnLastTry=r,d(c)},o.onload=c=>{if(o.status>=200&&o.status<300){if(c.target===null){s(null);return}let m=o.response;s(m)}else{let m=new Error(`getLicense's request finished with a ${o.status} HTTP error`);m.noRetry=r,m.fallbackOnLastTry=r,d(m)}},n?o.setRequestHeader("content-type","text/xml; charset=utf-8"):o.responseType="arraybuffer",o.send(a)}).then(s=>n&&typeof s=="string"?xte(s):s)}}u();l();function Pte(t){if(t.length<=1)return null;let e={},r=t[1],n=2,i=t.length;for(;n+1<=i;){let a=t.substring(n),o=a.indexOf(r),s=a.indexOf("_");if(s<=0||o>=0&&s>o){let d=o>=0?o:a.length,c=a.substring(0,d);n+=d,e[c]=!0}else{let d=a.substring(0,s);n+=s+1;let c=a.substring(s+1).split("=");if(!c.length)return null;let m=c[0],f=c[0].length+1;n+=f;let p=parseInt(m,36);if(isNaN(p))return null;let y=n;n+=p;let v=t.substring(y,n);e[d]=v}n+=1}return e}function sL({chosenDRMType:t,customKeySystem:e,fallbackKeyError:r,fallbackLicenseRequest:n,licenseServerUrl:i,lowLatency:a,manifestURL:o,serverCertificateUrl:s,transport:d}){let c="",m="",f="",p="",y="",v="";return o&&(c="!manifest_"+o.length.toString(36)+"="+o),d&&(m="!tech_"+d.length.toString(36)+"="+d),t&&(y="!drm_"+t.length.toString(36)+"="+t),e&&(v="!customKeySystem_"+e.length.toString(36)+"="+e),i&&(f="!licenseServ_"+i.length.toString(36)+"="+i),s&&(p="!certServ_"+s.length.toString(36)+"="+s),m?location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")+location.pathname+(location.search?location.search:"")+"#"+(a?"!lowLatency":"")+(r?"!fallbackKeyError":"")+(n?"!fallbackLicenseRequest":"")+m+c+y+v+f+p:null}u();l();var ss=Se(Ie());u();l();function m5e(t){return t.type==="checkbox"?!!t.checked:!!t.value}var Ote=m5e;function p5e({ariaLabel:t,name:e,checked:r,disabled:n,onChange:i,children:a,className:o}){let s=ss.useCallback(d=>{i(Ote(d.target))},[i]);return ss.createElement("div",{className:(o!=null?o:"")+(n?" disabled":"")},ss.createElement("label",{className:"switch"},ss.createElement("input",{type:"checkbox","aria-label":t,name:e,id:e,checked:r,disabled:n,onChange:s}),ss.createElement("span",{className:"slider round"})),ss.createElement("label",{htmlFor:e},a))}var xt=p5e;u();l();var Du=Se(Ie()),{useEffect:g5e,useRef:h5e}=Du;function y5e({ariaLabel:t,className:e="",onChange:r,value:n="",placeholder:i=""}){let a=h5e(null);g5e(()=>{a.current!=null&&a.current.focus()},[]);let o=Du.useCallback(s=>{r(s.target.value)},[r]);return Du.createElement("input",{ref:a,className:"input "+e,"aria-label":t,type:"text",placeholder:i,onChange:o,value:n})}var Lte=Du.memo(y5e);u();l();var ic=Se(Ie());function v5e({ariaLabel:t,className:e="",onChange:r,value:n="",placeholder:i=""}){let a=ic.useCallback(o=>{r(o.target.value)},[r]);return ic.createElement("input",{"aria-label":t,className:"input "+e,type:"text",placeholder:i,onChange:a,value:n})}var $g=ic.memo(v5e);u();l();var Ri=Se(Ie());function b5e({ariaLabel:t,children:e,className:r="",name:n,onChange:i,selected:a,options:o=[],disabled:s}){let d=typeof a.index=="number"?a.index:void 0,c=o.map((p,y)=>{let v,b=!1;return typeof p=="object"?(v=p.name,b=p.disabled):v=p,d===void 0&&a.value===v&&(d=y),Ri.createElement("option",{key:y,value:y,disabled:b},v)});d=d||0;let m=Ri.useCallback(p=>{let y=+p.target.value,v=o[y],b=typeof v=="object"?v.name:v;i({index:y,value:b})},[o,i]),f=s?Ri.createElement("select",{"aria-label":t,name:n,value:d,disabled:!0,onChange:m},c):Ri.createElement("select",{name:n,"aria-label":t,value:d,onChange:m},c);return e?Ri.createElement("section",{className:"select "+r},Ri.createElement("label",{htmlFor:n},e),f):Ri.createElement("section",{className:"select "+r},f)}var Rn=Ri.memo(b5e);u();l();u();l();var S5e={type:"MPL",version:"0.1",dynamic:!1,contents:[{url:"https://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd",startTime:0,endTime:733.3,transport:"dash"},{url:"https://amssamples.streaming.mediaservices.windows.net/683f7e47-bd83-4427-b0a3-26a6c4547782/BigBuckBunny.ism/manifest",startTime:733.3,endTime:1368,transport:"smooth"}]},I5e=new Blob([JSON.stringify(S5e)],{type:"application/json"}),Nte=URL.createObjectURL(I5e);var T5e=[{name:"Tears of Steel (clear)",url:"https://www.bok.net/dash/tears_of_steel/cleartext/stream.mpd",transport:"dash",live:!1},{name:"Axinom CMAF multiple Audio and Text tracks Tears of steel",url:"https://media.axprod.net/TestVectors/Cmaf/clear_1080p_h264/manifest.mpd",transport:"dash",live:!1},{name:"Multiple audio language",url:"https://dash.akamaized.net/dash264/TestCasesIOP41/MultiTrack/alternative_content/6/manifest_alternative_lang.mpd",transport:"dash",live:!1},{name:"DASH-IF - Trickmode",url:"https://dash.akamaized.net/dash264/TestCases/9b/qualcomm/1/MultiRate.mpd",transport:"dash",live:!1},{name:"DASH-IF - Multi-Subtitles",url:"https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd",transport:"dash",live:!1},{name:"DASH-IF - Audio-only",url:"https://dash.akamaized.net/dash264/TestCases/3a/fraunhofer/aac-lc_stereo_without_video/Sintel/sintel_audio_only_aaclc_stereo_sidx.mpd",transport:"dash",live:!1},{name:"DASH IF - SegmentTemplate",url:"https://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd",transport:"dash",live:!0},{name:"DASH IF - SegmentTimeline",url:"https://livesim.dashif.org/livesim/segtimeline_1/testpic_2s/Manifest.mpd",transport:"dash",live:!0},{name:"Super SpeedWay",url:"https://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest",transport:"smooth",live:!1},{name:"Big Buck Bunny",url:"https://amssamples.streaming.mediaservices.windows.net/683f7e47-bd83-4427-b0a3-26a6c4547782/BigBuckBunny.ism/manifest",transport:"smooth",live:!1},{name:"Taxi 3 SoundTrack (Audio-Only)",url:"https://playready.directtaps.net/smoothstreaming/ISMAAACLC/Taxi3_AACLC.ism/Manifest",transport:"smooth",live:!1},{name:"Multi-Period (5 Periods of 2 min)",url:"https://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-live-periods/mp4-live-periods-mpd.mpd",transport:"dash",live:!1},{name:"Big Buck Bunny WEBM",url:"https://upload.wikimedia.org/wikipedia/commons/transcoded/8/88/Big_Buck_Bunny_alt.webm/Big_Buck_Bunny_alt.webm.360p.webm",transport:"directfile",live:!1},{name:"Big Buck Bunny MP4",url:"http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4",transport:"directfile",live:!1},{name:"Wikipedia test OGG (AUDIO ONLY)",url:"https://upload.wikimedia.org/wikipedia/commons/f/f2/Median_test.ogg",transport:"directfile",live:!1},{name:"Google - Sintel webm only",url:"https://storage.googleapis.com/shaka-demo-assets/sintel-webm-only/dash.mpd",transport:"dash",live:!1},{name:"Multi Video Tracks",url:"https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd",transport:"dash",live:!1},{name:"Mix of DASH and Smooth VOD Contents",url:Nte,transport:"metaplaylist",live:!1}],Dte=T5e;u();l();var qu=Se(Ie());function k5e({url:t}){return t==null||t===""?qu.createElement("span",null,"URL: ",qu.createElement("a",{className:"generated-url-link none"},"Not a valid content!")):qu.createElement("span",null,"URL: ",qu.createElement("a",{className:"generated-url-link",href:t},t))}var qte=qu.memo(k5e);u();l();var ac=Se(Ie());function E5e({enabled:t,onClick:e}){return ac.createElement("button",{"aria-label":"Generate link for the current custom button",className:"link"+(t?" enabled":""),onClick:e},ac.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ac.createElement("path",{fill:"currentColor",d:"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"})))}var Bte=ac.memo(E5e);var aT=window,uL=aT.MediaKeys||aT.MozMediaKeys||aT.WebKitMediaKeys||aT.MSMediaKeys||null,Kte=typeof navigator.requestMediaKeySystemAccess=="function"||uL!=null&&uL.prototype&&typeof uL.isTypeSupported=="function"||typeof HTMLVideoElement.prototype.webkitGenerateKeyRequest=="function",cL=window.location.protocol.startsWith("https"),fL="Other",Qg=["DASH","Smooth","DirectFile","MetaPlaylist"],Yg=["Widevine","Playready","Clearkey",fL],lL=!Kte&&!cL,_5e={DASH:"URL to the MPD",Smooth:"URL to the Manifest",DirectFile:"URL to the content"};function R5e(t){var a,o,s,d;let e=(a=t.name)!=null?a:"undefined",r=!1,n=!1,i=(o=t.url)!=null?o:"";return cL?"localContent"in t&&!t.localContent&&i.startsWith("http:")&&(e="[HTTP only] "+e,r=!0):!Kte&&t.drmInfos&&t.drmInfos.length&&(e="[HTTPS only] "+e,r=!0),"live"in t&&t.live&&(e+=" (live)"),"localContent"in t&&t.localContent&&(e=(Wg?"[Stored] ":"[Saved] ")+e,n=!0),{contentName:(s=t.name)!=null?s:"undefined",displayName:e,drmInfos:(d=t.drmInfos)!=null?d:null,fallbackKeyError:"fallbackKeyError"in t&&t.fallbackKeyError,fallbackLicenseRequest:"fallbackLicenseRequest"in t&&t.fallbackLicenseRequest,id:"id"in t?t.id:void 0,isDisabled:r,isLocalContent:n,isLowLatency:"lowLatency"in t&&!!t.lowLatency,transport:t.transport,url:i}}function dL(){let r=[...iT().slice().reverse(),...Dte];return Qg.reduce((n,i)=>{let a={url:"",contentName:"",transport:i,drmInfos:null,displayName:"Custom link",isLocalContent:!1,isDisabled:!1,isLowLatency:!1,fallbackKeyError:void 0,fallbackLicenseRequest:void 0,id:void 0},o=r.filter(({transport:s})=>s===i.toLowerCase()).map(R5e);return n[i]=[a].concat(o),n},{})}function M5e(t,{transportType:e,fallbackKeyError:r,fallbackLicenseRequest:n}){var o,s,d,c,m;if(t==null)return null;let i=t.drmInfos&&t.drmInfos[0]&&t.drmInfos[0].licenseServerUrl,a=t.drmInfos&&t.drmInfos[0]&&t.drmInfos[0].serverCertificateUrl;return sL({chosenDRMType:(s=(o=t.drmInfos)==null?void 0:o[0])==null?void 0:s.drm,customKeySystem:(m=(c=(d=t.drmInfos)==null?void 0:d[0])==null?void 0:c.customKeySystem)!=null?m:void 0,fallbackKeyError:r,fallbackLicenseRequest:n,manifestURL:t.url,licenseServerUrl:i!=null?i:void 0,lowLatency:!!t.isLowLatency,serverCertificateUrl:a!=null?a:void 0,transport:e})}function Ute(t){let e=1;if(t.length<=0)throw new Error("No content for the transport: "+Qg[0]);for(;e=t.length?0:e}function Fte(t,{fallbackKeyError:e,fallbackLicenseRequest:r}){let n=t.map(i=>({drm:i.drm===fL?i.customKeySystem:i.drm,licenseServerUrl:i.licenseServerUrl,serverCertificateUrl:i.serverCertificateUrl,fallbackKeyError:e,fallbackLicenseRequest:r})).filter(i=>i.drm!==void 0);return oL(n)}function C5e({loadVideo:t,showOptions:e,onOptionToggle:r}){var ms,mc;let n=ee.useMemo(()=>dL(),[]),[i,a]=ee.useState(Qg[0]),[o,s]=ee.useState(0),[d,c]=ee.useState(""),[m,f]=ee.useState(n),[p,y]=ee.useState(Yg[0]),[v,b]=ee.useState(""),[T,S]=ee.useState(""),[I,E]=ee.useState(!1),[R,M]=ee.useState(!1),[C,A]=ee.useState(!1),[x,O]=ee.useState(!1),[D,F]=ee.useState(!1),[K,P]=ee.useState(""),[L,V]=ee.useState(""),[z,N]=ee.useState(!1),B=ee.useCallback(H=>{let{url:ae,transport:ge,fallbackKeyError:$e,fallbackLicenseRequest:kt,isLowLatency:Cn,drmInfos:wn}=H;Fte(wn!=null?wn:[],{fallbackKeyError:!!$e,fallbackLicenseRequest:!!kt}).then(zu=>{t({url:ae!=null?ae:"",transport:ge!=null?ge:"",textTrackMode:"html",lowLatencyMode:Cn,keySystems:zu})},()=>{console.error("Could not construct key systems option")})},[t]),U=ee.useCallback((H,ae)=>{Fte(ae,{fallbackKeyError:!!C,fallbackLicenseRequest:!!x}).then(ge=>{t({url:H,transport:i.toLowerCase(),textTrackMode:"html",lowLatencyMode:z,keySystems:ge})},()=>{console.error("Could not construct key systems option")})},[t,C,x,i,z]),j=ee.useCallback((H,ae)=>{var ML,CL;let ge=!!ae.fallbackKeyError,$e=!!ae.fallbackLicenseRequest,kt=!!ae.isLowLatency,Cn=!1,wn=null,zu="",vh="",pc="";ae.drmInfos!=null&&ae.drmInfos.length>0&&(Cn=!0,wn=ae.drmInfos[0].drm,zu=ae.drmInfos[0].customKeySystem||"",vh=ae.drmInfos[0].licenseServerUrl,pc=(ML=ae.drmInfos[0].serverCertificateUrl)!=null?ML:""),s(H),c(ae.contentName),y(wn!=null?wn:Yg[0]),b(zu),S((CL=ae.url)!=null?CL:""),M(Cn),E(!1),O($e),A(ge),F(!1),N(kt),P(vh),V(pc)},[]);ee.useEffect(()=>{var kt;let H=Pte(location.hash);if(H!==null){let{tech:Cn}=H;if(typeof Cn=="string"&&Qg.includes(Cn)){let{fallbackKeyError:wn,fallbackLicenseRequest:zu,lowLatency:vh}=H;s(0),c(""),typeof H.manifest=="string"&&S(H.manifest),A(!!wn),O(!!zu),N(Cn==="DASH"&&!!vh),a(Cn);let pc=typeof H.drm=="string"&&Yg.includes(H.drm)?H.drm:void 0;pc!==void 0&&(M(!0),y(pc),typeof H.customKeySystem=="string"&&b(H.customKeySystem),typeof H.licenseServ=="string"&&P(H.licenseServ),typeof H.certServ=="string"&&V(H.certServ));return}}let ae=(kt=m[i])!=null?kt:[],ge=Ute(ae),$e=ae[ge];j(ge,$e)},[]);let Y=o===0,W=p===fL,se=(ms=m[i])!=null?ms:[],Z=se[o],$=null;I&&($=o===0||D?sL({chosenDRMType:R?p:void 0,customKeySystem:R?v:void 0,fallbackKeyError:C,fallbackLicenseRequest:x,manifestURL:T,licenseServerUrl:R?K:void 0,lowLatency:z,serverCertificateUrl:R?L:void 0,transport:i}):M5e(Z,{transportType:i,fallbackKeyError:C,fallbackLicenseRequest:x}));let ue=T!=="",Le=!!(Z&&Z.isLocalContent),Re=ee.useCallback(({value:H})=>{var $e;s(0),c(""),y(Yg[0]),b(""),S(""),M(!1),E(!1),O(!1),A(!1),F(!1),P(""),N(!1),V(""),a(H);let ae=($e=m[H])!=null?$e:[],ge=Ute(ae);j(ge,ae[ge])},[m,j]),ne=ee.useCallback(({index:H})=>{let ae=se[H];j(H,ae)},[se,j]),de=()=>{o===0?U(T,[{licenseServerUrl:K,serverCertificateUrl:L,drm:p,customKeySystem:v}]):B(se[o])},Wt=()=>{var Cn;let H={name:d,url:T,fallbackLicenseRequest:x,fallbackKeyError:C,lowLatency:z,transport:i.toLowerCase(),drmInfos:R?[{drm:p,customKeySystem:v,licenseServerUrl:K,serverCertificateUrl:L}]:null,id:Z.id},ae=Rte(H),ge=dL();f(ge),F(!1);let $e=(Cn=ge[i])!=null?Cn:[],kt=$e.findIndex(wn=>wn.id===ae.id);kt<0?(console.warn("Stored content not found in local storage."),j(0,$e[0])):j(kt,$e[kt])},Pt=ee.useCallback(()=>{F(!0)},[]),Ot=ee.useCallback(()=>{var ae;let H=se[o];if(H){if(H.id===void 0){console.error("Cannot erase: no id on the content");return}if(Mte(H.id)){let $e=dL();f($e);let kt=(ae=$e[i])!=null?ae:[];o>=kt.length?j(0,kt[0]):j(o,kt[o])}}},[se,o]),Rr=ee.useCallback(H=>{c(H)},[]),Mr=ee.useCallback(H=>{S(H)},[]),sh=ee.useCallback(H=>{b(H)},[]),uh=ee.useCallback(H=>{P(H)},[]),lh=ee.useCallback(H=>{V(H)},[]),dh=ee.useCallback(H=>{H?M(!0):(M(!1),P(""),V(""))},[]),ch=ee.useCallback(H=>{N(H)},[]),fc=ee.useCallback(H=>{y(ae=>(ae===H||b(""),H))},[]),fh=ee.useCallback(()=>{F(!1),j(o,Z)},[j,o,Z]),mh=ee.useCallback(()=>Yg.map(H=>ee.createElement("span",{key:H},ee.createElement(jt,{className:"choice-input-button drm-button"+(p===H?" selected":""),ariaLabel:"Key system choice",onClick:()=>fc(H),value:H,disabled:!1}))),[fc,p]),ph=ee.useCallback(()=>{E(H=>!H)},[]),gh=ee.useCallback(H=>{O(H)},[]),hh=ee.useCallback(H=>{A(H)},[]),yh=ee.useMemo(()=>se.map(H=>({name:H.displayName,disabled:H.isDisabled})),[se]);return ee.createElement("div",{className:"choice-inputs-wrapper"},ee.createElement("span",{className:"generated-url"+(I?" enabled":"")},I?ee.createElement(qte,{url:$}):null),ee.createElement("div",{className:"content-inputs"},ee.createElement("div",{className:"content-inputs-selects"},ee.createElement(Rn,{className:"choice-input transport-type-choice white-select",ariaLabel:"Select a transport",name:"transport",onChange:Re,options:Qg,selected:{index:void 0,value:i},disabled:!1}),ee.createElement(Rn,{className:"choice-input content-choice white-select",ariaLabel:"Select a content",name:"content",onChange:ne,options:yh,selected:{index:o,value:void 0},disabled:!1})),ee.createElement("div",{className:"content-inputs-middle"},Y||Le?[ee.createElement(jt,{key:0,className:"choice-input-button content-button enter-name-button"+(ue?"":" disabled"),ariaLabel:"Save or update custom content",onClick:Pt,disabled:!ue||D,value:Le?D?"Updating...":"Update content":D?"Saving...":"Store content"}),ee.createElement(Bte,{key:1,enabled:I,onClick:ph})]:null,Le?ee.createElement(jt,{className:"choice-input-button erase-button",ariaLabel:"Remove custom content from saved contents",onClick:Ot,value:"\uF1F8",disabled:!1}):null),ee.createElement("div",{className:"choice-input-button-wrapper"},ee.createElement(xt,{className:"show-options",ariaLabel:"Show player options",checked:e,onChange:r,name:"showOptions"},"Show Options"),ee.createElement(jt,{className:"choice-input-button load-button",ariaLabel:"Load the selected content now",onClick:de,value:"\uF144",disabled:!1}))),Y||Le&&D?ee.createElement("div",{className:"custom-input-wrapper"},D?ee.createElement("div",{className:"update-control"},ee.createElement(Lte,{className:"text-input need-to-fill",ariaLabel:"Name of the custom content to save",onChange:Rr,value:d,placeholder:"Content name"}),ee.createElement("div",{className:"update-control-buttons"},ee.createElement(jt,{className:"choice-input-button content-button save-button",ariaLabel:"Save/Update custom content",onClick:Wt,disabled:!d||!T,value:Le?"Update":"Save"}),ee.createElement(jt,{ariaLabel:"Cancel current modifications for the custom content",className:"choice-input-button content-button cancel-button",onClick:fh,value:"Cancel",disabled:!1}))):null,ee.createElement($g,{ariaLabel:"Enter here the Manifest's URL",className:"text-input",onChange:Mr,value:T,placeholder:((mc=_5e[i])!=null?mc:`URL to the ${i} content`)+(cL?" (HTTPS only if mixed contents disabled)":"")}),ee.createElement("div",{className:"player-box player-box-load"},ee.createElement("span",{className:"encryption-checkbox custom-checkbox"+(lL?" disabled":"")},(lL?"[HTTPS only] ":"")+"Encrypted content",ee.createElement(xt,{ariaLabel:"Enable for an encrypted content",disabled:lL,name:"displayDRMSettingsTextInput",checked:R,onChange:dh})),R?ee.createElement("div",{className:"drm-settings"},ee.createElement("div",{className:"drm-choice"},mh()),W?ee.createElement("div",null,ee.createElement($g,{ariaLabel:'Key system reverse domain name (e.g. "org.w3.clearkey")',className:"choice-input text-input",onChange:sh,value:v,placeholder:"Key system (reverse domain name)"})):null,ee.createElement("div",null,ee.createElement($g,{ariaLabel:"URL for the license server",className:"choice-input text-input",onChange:uh,value:K,placeholder:"License URL Server"})),ee.createElement($g,{ariaLabel:"URL for the server certificate (optional)",className:"choice-input text-input",onChange:lh,value:L,placeholder:"Server certificate URL (optional)"}),ee.createElement("div",null,ee.createElement("span",{className:"custom-checkbox fallback-checkbox"},ee.createElement("span",null,"Fallback if a key is refused ",ee.createElement("span",{className:"checkbox-indication"},"(for content with multiple keys)")),ee.createElement(xt,{ariaLabel:"Should fallback on key errors",name:"shouldFallbackOnKeyError",checked:C,onChange:hh}))),ee.createElement("div",null,ee.createElement("span",{className:"custom-checkbox fallback-checkbox"},ee.createElement("span",null,"Fallback if the license request fails ",ee.createElement("span",{className:"checkbox-indication"},"(for content with multiple keys)")),ee.createElement(xt,{ariaLabel:"Should fallback on license requesting errors",name:"shouldFallbackOnLicenseReqError",checked:x,onChange:gh})))):null),i==="DASH"?ee.createElement("div",{className:"player-box player-box-load button-low-latency"},ee.createElement("span",{className:"low-latency-checkbox custom-checkbox"},"Low-Latency content",ee.createElement(xt,{ariaLabel:"Enable for a low-latency content",name:"isLowLatencyChecked",checked:z,onChange:ch}))):null):null)}var zte=ee.memo(C5e);u();l();var Vt=Se(Ie());u();l();var Bu=Se(Ie());function w5e({title:t,children:e}){return Bu.createElement("div",{className:"optionWrapper"},Bu.createElement("h4",{className:"optionTitle"},t),Bu.createElement("hr",{className:"spacer"}),Bu.createElement("ul",{className:"loadVideooptions"},e))}var Uu=Bu.memo(w5e);u();l();var ei=Se(Ie());function x5e({autoPlay:t,onAutoPlayChange:e,tryRelyOnWorker:r,onTryRelyOnWorkerChange:n}){return ei.createElement(ei.Fragment,null,ei.createElement("li",null,ei.createElement(xt,{className:"playerOptionsCheckBox playerOptionsCheckBoxTitle",name:"autoPlay",ariaLabel:"Auto play option",checked:t,onChange:e},"Auto Play"),ei.createElement("span",{className:"option-desc"},t?"Playing directly when the content is loaded.":"Staying in pause when the content is loaded.")),ei.createElement("li",null,ei.createElement(xt,{className:"playerOptionsCheckBox playerOptionsCheckBoxTitle",name:"tryRelyOnWorker",ariaLabel:"Rely in a WebWorker when possible",checked:r,onChange:n},"Multithread mode (when possible)"),ei.createElement("span",{className:"option-desc"},r?"Running the RxPlayer's main logic in a WebWorker when possible":"Currently running the RxPlayer's main logic only in main thread.")))}var jte=ei.memo(x5e);u();l();var Mi=Se(Ie());function A5e({defaultAudioRepresentationsSwitchingMode:t,onDefaultAudioRepresentationsSwitchingModeChange:e}){let r;switch(t){case"reload":r="Reloading by default when audio Representations are manually changed";break;case"lazy":r="Keeping previous data when audio Representations are manually changed";break;case"direct":r="Directly visible transition when audio Representations are manually changed";break;case"seamless":r="Smooth transition when audio Representations are manually changed";break;default:r="Unknown value";break}let n=Mi.useCallback(({value:i})=>{e(i)},[e]);return Mi.createElement(Mi.Fragment,null,Mi.createElement("li",{className:"featureWrapperWithSelectMode"},Mi.createElement(Rn,{ariaLabel:"Select the defaultAudioRepresentationsSwitchingMode",className:"playerOptionInput",disabled:!1,name:"defaultAudioRepresentationsSwitchingMode",onChange:n,selected:{value:t,index:void 0},options:["seamless","lazy","direct","reload"]},"Default Audio Representations switching mode"),Mi.createElement("span",{className:"option-desc"},r)))}var Vte=Mi.memo(A5e);u();l();var cr=Se(Ie());var{Fragment:P5e}=cr;function O5e({defaultVideoRepresentationsSwitchingMode:t,onDefaultVideoRepresentationsSwitchingModeChange:e,videoResolutionLimit:r,throttleVideoBitrateWhenHidden:n,onVideoResolutionLimitChange:i,onThrottleVideoBitrateWhenHiddenChange:a}){let o;switch(t){case"reload":o="Reloading by default when video Representations are manually changed";break;case"lazy":o="Keeping previous data when video Representations are manually changed";break;case"direct":o="Directly visible transition when video Representations are manually changed";break;case"seamless":o="Smooth transition when video Representations are manually changed";break;default:o="Unknown value";break}let s;switch(r){case"none":s="No limit on the video Representation\u2019s resolution will be automatically applied.";break;case"screen":s="The loaded video Representation will be throttled according to the screen\u2019s dimensions.";break;case"videoElement":s="The loaded video Representation will be throttled according to the given videoElement\u2019s dimensions.";break}let d=cr.useCallback(({value:c})=>{e(c)},[e]);return cr.createElement(P5e,null,cr.createElement("li",{className:"featureWrapperWithSelectMode"},cr.createElement(Rn,{ariaLabel:"Select the defaultVideoRepresentationsSwitchingMode",className:"playerOptionInput",disabled:!1,name:"defaultVideoRepresentationsSwitchingMode",onChange:d,selected:{value:t,index:void 0},options:["seamless","lazy","direct","reload"]},"Default Video Representations switching mode"),cr.createElement("span",{className:"option-desc"},o)),cr.createElement("li",null,cr.createElement(Rn,{ariaLabel:"Select the videoResolutionLimit",className:"playerOptionInput",disabled:!1,name:"videoResolutionLimit",onChange:i,selected:{value:r,index:void 0},options:["videoElement","screen","none"]},"Limit Video Resolution"),cr.createElement("span",{className:"option-desc"},s)),cr.createElement("li",null,cr.createElement("div",{className:"playerOptionInput"},cr.createElement(xt,{className:"playerOptionsCheckBox playerOptionsCheckBoxTitle",name:"throttleVideoBitrateWhenHidden",ariaLabel:"Throttle video bitrate when hidden option",checked:n,onChange:a},"Throttle Video Bitrate When Hidden"),cr.createElement("span",{className:"option-desc"},n?"Throttling the video bitrate when the page is hidden for a time":"Not throttling the video bitrate when the page is hidden for a time"))))}var Hte=cr.memo(O5e);u();l();var tt=Se(Ie());u();l();var L5e={player:{videoResolutionLimit:"none",maxBufferAhead:1/0,maxBufferBehind:1/0,maxVideoBufferSize:1/0,throttleVideoBitrateWhenHidden:!1,wantedBufferAhead:30},loadVideo:{autoPlay:!0,defaultAudioTrackSwitchingMode:"reload",enableFastSwitching:!0,requestConfig:{segment:{maxRetry:4,timeout:3e4},manifest:{maxRetry:4,timeout:3e4}},onCodecSwitch:"continue"}},Mn=L5e;u();l();var us=Se(Ie());function N5e({ariaLabel:t,label:e,title:r,onUpdateValue:n,valueAsString:i,defaultValueAsNumber:a,isDisabled:o,onResetClick:s}){let d=parseFloat(i)===a,c=us.useCallback(m=>{n(m.target.value)},[n]);return us.createElement("div",{className:"playerOptionInput"},us.createElement("label",{htmlFor:e},r),us.createElement("span",{className:"wrapperInputWithResetBtn"},us.createElement("input",{type:"text",name:e,"aria-label":t,placeholder:"Number",onChange:c,value:i,disabled:o,className:"optionInput"}),us.createElement(jt,{disabled:d,className:d?"resetBtn disabledResetBtn":"resetBtn",ariaLabel:"Reset option to default value",title:"Reset option to default value",onClick:s,value:"\uF021"})))}var aa=N5e;var{Fragment:D5e,useCallback:oT,useEffect:sT,useState:ls}=tt,Xg=Mn.loadVideo.requestConfig.segment.maxRetry,Zg=Mn.loadVideo.requestConfig.segment.timeout,Jg=Mn.loadVideo.requestConfig.manifest.maxRetry,eh=Mn.loadVideo.requestConfig.manifest.timeout;function q5e({manifestRequestTimeout:t,manifestRetry:e,onManifestRequestTimeoutChange:r,onManifestRetryChange:n,onSegmentRequestTimeoutChange:i,onSegmentRetryChange:a,segmentRequestTimeout:o,segmentRetry:s}){let[d,c]=ls(String(s)),[m,f]=ls(String(o)),[p,y]=ls(String(e)),[v,b]=ls(String(t)),[T,S]=ls(s!==1/0),[I,E]=ls(o!==-1),[R,M]=ls(e!==1/0),[C,A]=ls(t!==-1);sT(()=>{let z=parseFloat(v);z=isNaN(z)?eh:z,r(z)},[v]),sT(()=>{let z=parseFloat(p);z=isNaN(z)?Jg:z,n(z)},[p]),sT(()=>{let z=parseFloat(m);z=isNaN(z)?Zg:z,i(z)},[m]),sT(()=>{let z=parseFloat(d);z=isNaN(z)?Xg:z,a(z)},[d]);let x=oT(z=>{z?(S(!1),c(String(1/0))):(S(!0),c(String(Xg)))},[]),O=oT(z=>{z?(E(!1),f(String(-1))):(E(!0),f(String(Zg)))},[]),D=oT(z=>{z?(M(!1),y(String(1/0))):(M(!0),y(String(Jg)))},[]),F=oT(z=>{z?(A(!1),b(String(-1))):(A(!0),b(String(eh)))},[]),K=tt.useCallback(()=>{c(String(Xg)),S(Xg!==1/0)},[]),P=tt.useCallback(()=>{f(String(Zg)),E(Zg!==1/0)},[]),L=tt.useCallback(()=>{y(String(Jg)),M(Jg!==1/0)},[]),V=tt.useCallback(()=>{b(String(eh)),A(eh!==1/0)},[]);return tt.createElement(D5e,null,tt.createElement("li",null,tt.createElement(aa,{ariaLabel:"Segment retry option",label:"segmentRetry",title:"Segment Retry",valueAsString:d,defaultValueAsNumber:Xg,isDisabled:T===!1,onUpdateValue:c,onResetClick:K}),tt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Segment retry limit option",name:"segmentRetryLimit",checked:T===!1,onChange:x},"Do not limit"),tt.createElement("span",{className:"option-desc"},s===1/0||!T?'Retry "retryable" segment requests with no limit':`Retry "retryable" segment requests at most ${s} time(s)`)),tt.createElement("li",null,tt.createElement(aa,{ariaLabel:"Segment Timeout option",label:"segmentRequestTimeout",title:"Segment Timeout",valueAsString:m,defaultValueAsNumber:Zg,isDisabled:I===!1,onUpdateValue:f,onResetClick:P}),tt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Segment timeout limit option",name:"segmentRequestTimeoutLimit",checked:I===!1,onChange:O},"Do not limit"),tt.createElement("span",{className:"option-desc"},o===-1||!I?"Perform segment requests without timeout":`Stop segment requests after ${o} millisecond(s)`)),tt.createElement("li",null,tt.createElement(aa,{ariaLabel:"manifestRetry option",label:"manifestRetry",title:"Manifest Retry",valueAsString:p,defaultValueAsNumber:Jg,isDisabled:R===!1,onUpdateValue:y,onResetClick:L}),tt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Manifest retry limit option",name:"manifestRetryLimit",checked:R===!1,onChange:D},"Do not limit"),tt.createElement("span",{className:"option-desc"},e===1/0||!R?'Retry "retryable" manifest requests with no limit':`Retry "retryable" manifest requests at most ${e} time(s)`)),tt.createElement("li",null,tt.createElement(aa,{ariaLabel:"manifestRequestTimeout option",label:"manifestRequestTimeout",title:"Manifest Timeout",valueAsString:v,defaultValueAsNumber:eh,isDisabled:C===!1,onUpdateValue:b,onResetClick:V}),tt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Manifest timeout limit option",name:"manifestRequestTimeoutLimit",checked:C===!1,onChange:F},"Do not limit"),tt.createElement("span",{className:"option-desc"},t===-1||!C?"Perform manifest requests without timeout":`Stop manifest requests after ${t} millisecond(s)`)))}var Gte=tt.memo(q5e);u();l();var tr=Se(Ie());function B5e({enableFastSwitching:t,defaultAudioTrackSwitchingMode:e,onCodecSwitch:r,onDefaultAudioTrackSwitchingModeChange:n,onCodecSwitchChange:i,onEnableFastSwitchingChange:a}){let o;switch(e){case"reload":o="Reloading by default when the audio track is changed";break;case"direct":o="Directly audible transition when the audio track is changed";break;case"seamless":o="Smooth transition when the audio track is changed";break;default:o="Unknown value";break}let s;switch(r){case"reload":s="Reloading buffers when the codec changes";break;case"continue":s="Keeping the same buffers even when the codec changes";break;default:s="Unknown value";break}let d=tr.useCallback(({value:m})=>i(m),[i]),c=tr.useCallback(({value:m})=>n(m),[n]);return tr.createElement(tr.Fragment,null,tr.createElement("li",null,tr.createElement(xt,{className:"playerOptionsCheckBox playerOptionsCheckBoxTitle",ariaLabel:"Fast switching option",name:"fastSwitching",checked:t,onChange:a},"Fast Switching"),tr.createElement("span",{className:"option-desc"},t?"Fast quality switch by replacing lower qualities in the buffer by higher ones when possible.":"Not replacing lower qualities in the buffer by an higher one when possible.")),tr.createElement("li",{className:"featureWrapperWithSelectMode"},tr.createElement(Rn,{ariaLabel:"Selecting the defaultAudioTrackSwitchingMode attribute",disabled:!1,className:"playerOptionInput",name:"defaultAudioTrackSwitchingMode",onChange:c,selected:{value:e,index:void 0},options:["seamless","direct","reload"]},"Audio track switching mode"),tr.createElement("span",{className:"option-desc"},o)),tr.createElement("li",{className:"featureWrapperWithSelectMode"},tr.createElement(Rn,{ariaLabel:"Selecting the onCodecSwitch attribute",disabled:!1,className:"playerOptionInput",name:"onCodecSwitch",onChange:d,selected:{value:r,index:void 0},options:["continue","reload"]},"On Codec Switch"),tr.createElement("span",{className:"option-desc"},s)))}var Wte=tr.memo(B5e);u();l();var dt=Se(Ie());var{Fragment:U5e,useCallback:mL,useEffect:uT,useState:Fu}=dt,oc=Mn.player.maxBufferAhead,th=Mn.player.maxBufferBehind,rh=Mn.player.maxVideoBufferSize,pL=Mn.player.wantedBufferAhead;function F5e({wantedBufferAhead:t,maxVideoBufferSize:e,maxBufferAhead:r,maxBufferBehind:n,onWantedBufferAheadChange:i,onMaxVideoBufferSizeChange:a,onMaxBufferAheadChange:o,onMaxBufferBehindChange:s}){let[d,c]=Fu(String(t)),[m,f]=Fu(String(e)),[p,y]=Fu(String(n)),[v,b]=Fu(String(r)),[T,S]=Fu(r!==1/0),[I,E]=Fu(n!==1/0),[R,M]=Fu(e!==1/0);uT(()=>{let P=parseFloat(d);P=isNaN(P)?pL:P,i(P)},[d]),uT(()=>{let P=parseFloat(m);P=isNaN(P)?rh:P,a(P)},[m]),uT(()=>{let P=parseFloat(v);P=isNaN(P)?oc:P,o(P)},[v]),uT(()=>{let P=parseFloat(p);P=isNaN(P)?th:P,s(P)},[p]);let C=mL(P=>{P?(S(!1),b(String(1/0))):(S(!0),b(String(oc)))},[]),A=mL(P=>{P?(E(!1),y(String(oc))):(E(!0),y(String(th)))},[]),x=mL(P=>{P?(M(!1),f(String(1/0))):(M(!0),f(String(rh)))},[]),O=dt.useCallback(()=>{c(String(pL))},[]),D=dt.useCallback(()=>{f(String(rh)),M(rh!==1/0)},[]),F=dt.useCallback(()=>{b(String(oc)),S(oc!==1/0)},[]),K=dt.useCallback(()=>{y(String(th)),E(th!==1/0)},[]);return dt.createElement(U5e,null,dt.createElement("li",null,dt.createElement(aa,{ariaLabel:"Wanted Buffer Ahead option",label:"wantedBufferAhead",title:"Wanted Buffer Ahead",valueAsString:d,defaultValueAsNumber:pL,isDisabled:!1,onUpdateValue:c,onResetClick:O}),dt.createElement("span",{className:"option-desc"},"Buffering around ",t," second(s) ahead of the current position")),dt.createElement("li",null,dt.createElement(aa,{ariaLabel:"maxVideoBufferSize option",label:"maxVideoBufferSize",title:"Max Video Buffer Size",valueAsString:m,defaultValueAsNumber:rh,isDisabled:R===!1,onUpdateValue:f,onResetClick:D}),dt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Do not limit maxVideoBufferSize option",name:"maxVideoBufferSizeLimit",checked:R===!1,onChange:x},"Do not limit"),dt.createElement("span",{className:"option-desc"},e===1/0||!R?"Not setting a size limit to the video buffer (relying only on the wantedBufferAhead option)":`Buffering at most around ${e} kilobyte(s) on the video buffer`)),dt.createElement("li",null,dt.createElement(aa,{ariaLabel:"maxBufferAhead option",label:"maxBufferAhead",title:"Max Buffer Ahead",valueAsString:v,defaultValueAsNumber:oc,isDisabled:T===!1,onUpdateValue:b,onResetClick:F}),dt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Do not limit max buffer a head option",name:"maxBufferAheadLimit",checked:T===!1,onChange:C},"Do not limit"),dt.createElement("span",{className:"option-desc"},r===1/0||!T?"Not manually cleaning buffer far ahead of the current position":`Manually cleaning data ${r} second(s) ahead of the current position`)),dt.createElement("li",null,dt.createElement(aa,{ariaLabel:"maxBufferBehind option",label:"maxBufferBehind",title:"Max Buffer Behind",valueAsString:p,defaultValueAsNumber:th,isDisabled:I===!1,onUpdateValue:y,onResetClick:K}),dt.createElement(xt,{className:"playerOptionsCheckBox",ariaLabel:"Do not limit max buffer behind option",name:"maxBufferBehindLimit",checked:I===!1,onChange:A},"Do not limit"),dt.createElement("span",{className:"option-desc"},n===1/0||!I?"Not manually cleaning buffer behind the current position":`Manually cleaning data ${n} second(s) behind the current position`)))}var $te=dt.memo(F5e);var{useCallback:fr}=Vt;function K5e({defaultAudioRepresentationsSwitchingMode:t,defaultVideoRepresentationsSwitchingMode:e,playerOptions:r,updatePlayerOptions:n,loadVideoOptions:i,updateLoadVideoOptions:a,showOptions:o,updateDefaultAudioRepresentationsSwitchingMode:s,updateDefaultVideoRepresentationsSwitchingMode:d,tryRelyOnWorker:c,updateTryRelyOnWorker:m}){let{videoResolutionLimit:f,maxBufferAhead:p,maxBufferBehind:y,maxVideoBufferSize:v,throttleVideoBitrateWhenHidden:b,wantedBufferAhead:T}=r,{autoPlay:S,defaultAudioTrackSwitchingMode:I,enableFastSwitching:E,requestConfig:R,onCodecSwitch:M}=i,{manifest:C,segment:A}=R,{maxRetry:x,timeout:O}=A,{maxRetry:D,timeout:F}=C,K=fr(ne=>{a(de=>ne===de.autoPlay?de:Object.assign({},de,{autoPlay:ne}))},[a]),P=fr(ne=>{m(ne)},[m]),L=fr(ne=>{n(de=>ne.value===de.videoResolutionLimit?de:Object.assign({},de,{videoResolutionLimit:ne.value}))},[n]),V=fr(ne=>{n(de=>ne===de.throttleVideoBitrateWhenHidden?de:Object.assign({},de,{throttleVideoBitrateWhenHidden:ne}))},[n]),z=fr(ne=>{a(de=>ne===de.requestConfig.segment.maxRetry?de:Object.assign({},de,{requestConfig:Object.assign({},de.requestConfig,{segment:Object.assign({},de.requestConfig.segment,{maxRetry:ne})})}))},[a]),N=fr(ne=>{a(de=>ne===de.requestConfig.segment.timeout?de:Object.assign({},de,{requestConfig:Object.assign({},de.requestConfig,{segment:Object.assign({},de.requestConfig.segment,{timeout:ne})})}))},[a]),B=fr(ne=>{a(de=>ne===de.requestConfig.manifest.maxRetry?de:Object.assign({},de,{requestConfig:Object.assign({},de.requestConfig,{manifest:Object.assign({},de.requestConfig.manifest,{maxRetry:ne})})}))},[a]),U=fr(ne=>{a(de=>ne===de.requestConfig.manifest.timeout?de:Object.assign({},de,{requestConfig:Object.assign({},de.requestConfig,{manifest:Object.assign({},de.requestConfig.manifest,{timeout:ne})})}))},[a]),j=fr(ne=>{a(de=>ne===de.enableFastSwitching?de:Object.assign({},de,{enableFastSwitching:ne}))},[a]),Y=fr(ne=>{a(de=>ne===de.defaultAudioTrackSwitchingMode?de:Object.assign({},de,{defaultAudioTrackSwitchingMode:ne}))},[a]),W=fr(ne=>{d(ne)},[a]),se=fr(ne=>{s(ne)},[a]),Z=fr(ne=>{a(de=>ne===de.onCodecSwitch?de:Object.assign({},de,{onCodecSwitch:ne}))},[a]),$=fr(ne=>{n(de=>ne===de.wantedBufferAhead?de:Object.assign({},de,{wantedBufferAhead:ne}))},[r]),ue=fr(ne=>{n(de=>ne===de.maxVideoBufferSize?de:Object.assign({},de,{maxVideoBufferSize:ne}))},[r]),Le=fr(ne=>{n(de=>ne===de.maxBufferBehind?de:Object.assign({},de,{maxBufferBehind:ne}))},[r]),Re=fr(ne=>{n(de=>ne===de.maxBufferAhead?de:Object.assign({},de,{maxBufferAhead:ne}))},[r]);return o?Vt.createElement("div",{className:"settingsWrapper"},Vt.createElement("div",{className:"settings-title"},"Content options"),Vt.createElement("div",{className:"settings-note"},"Note: Those options won't be retroactively applied to already-loaded contents"),Vt.createElement("div",{style:{display:"flex"}},Vt.createElement(Uu,{title:"Playback"},Vt.createElement(jte,{autoPlay:S,onAutoPlayChange:K,tryRelyOnWorker:c,onTryRelyOnWorkerChange:P})),Vt.createElement(Uu,{title:"Video adaptive settings"},Vt.createElement(Hte,{defaultVideoRepresentationsSwitchingMode:e,videoResolutionLimit:f,throttleVideoBitrateWhenHidden:b,onDefaultVideoRepresentationsSwitchingModeChange:W,onVideoResolutionLimitChange:L,onThrottleVideoBitrateWhenHiddenChange:V})),Vt.createElement(Uu,{title:"Audio adaptive settings"},Vt.createElement(Vte,{defaultAudioRepresentationsSwitchingMode:t,onDefaultAudioRepresentationsSwitchingModeChange:se}))),Vt.createElement("div",{style:{display:"flex"}},Vt.createElement(Uu,{title:"Request Configuration"},Vt.createElement(Gte,{manifestRequestTimeout:F,segmentRetry:x,segmentRequestTimeout:O,manifestRetry:D,onSegmentRetryChange:z,onSegmentRequestTimeoutChange:N,onManifestRetryChange:B,onManifestRequestTimeoutChange:U})),Vt.createElement(Uu,{title:"Track Switch Mode"},Vt.createElement(Wte,{defaultAudioTrackSwitchingMode:I,enableFastSwitching:E,onCodecSwitch:M,onDefaultAudioTrackSwitchingModeChange:Y,onEnableFastSwitchingChange:j,onCodecSwitchChange:Z})),Vt.createElement(Uu,{title:"Buffer Options"},Vt.createElement($te,{wantedBufferAhead:T,maxVideoBufferSize:v,maxBufferAhead:p,maxBufferBehind:y,onWantedBufferAheadChange:$,onMaxBufferAheadChange:Re,onMaxBufferBehindChange:Le,onMaxVideoBufferSizeChange:ue})))):null}var Yte=K5e;u();l();var Ja=Se(Ie());function z5e({error:t}){let e=typeof t.message=="string"?t.message:String(t);return Ja.createElement("span",{className:"fatal-error"},Ja.createElement("span",{className:"error-icon icon"},"\uF071"),Ja.createElement("span",{className:"error-intro"},"The Player encountered a fatal Error:"),Ja.createElement("span",{className:"error-message"},e))}function j5e({player:t}){let e=fe(t,"error");return Ja.createElement("div",{className:"player-error"},e?Ja.createElement(z5e,{error:e}):null)}var Qte=Ja.memo(j5e);u();l();var rt=Se(Ie());u();l();var V5e=100,H5e=eT(()=>({data:[]}),(t=V5e,e)=>({addData(r){let n=e.get("data");n.length>=t&&n.splice(0,n.length+1-t),n.push({date:performance.now(),value:r}),e.update("data",n.slice())},removeData(r=1){let n=e.get("data");n.splice(0,r),e.update("data",n.slice())}})),Xte=H5e;u();l();var Ku=Se(Ie());u();l();var ln=Se(Ie());u();l();function gL(t){return t.charAt(0).toUpperCase()+t.slice(1)}u();l();function hL(t){let e=t.slice(),r=t.length;for(;r!==0;){let n=Math.floor(Math.random()*r);r-=1;let i=e[r];e[r]=e[n],e[n]=i}return e}var{useEffect:G5e,useMemo:Zte,useRef:Jte,useState:yL}=ln,sc=1e3,nh=1,ere=["#2ab7ca","#fed766","#4dd248","#a22c28","#556b2f","#add8e6","#90ee90","#444444","#40bfc1","#57557e","#fbe555"],W5e="#FF2323";function $5e(t){t.clearRect(0,0,sc,nh)}function Y5e(t,e,r,n){if(typeof t=="number"&&t>=e&&te&&dhL(ere),[]),[s,d]=yL(!1),[c,m]=yL(0),[f,p]=yL(""),y=Jte(null),v=Jte([]),b=r!=null?r:300,T=n!=null?n:0,S=Math.max(b-T,0),I=ln.useCallback((D,F)=>{let K=D.bufferedInfos.infos.representation,P=v.current.indexOf(K.uniqueId);P<0&&(v.current.push(K.uniqueId),P=v.current.length-1);let L=P%ere.length,V=o[L],z=D.scaledStart*sc,N=D.scaledEnd*sc;F.fillStyle=V,F.fillRect(Math.ceil(z),0,Math.ceil(N-z),nh)},[o]),E=Zte(()=>Q5e(e,T,b),[e,T,b]);G5e(()=>{if(y.current===null)return;let D=y.current.getContext("2d");if(D!==null&&(y.current.width=sc,y.current.height=nh,$5e(D),!(T===void 0||b===void 0||T>=b))){for(let F of E)I(F,D);Y5e(t,T,b,D)}},[T,b,E]);let R=ln.useCallback(D=>{if(y.current===null)return;let F=y.current.getBoundingClientRect(),K=F.left,P=Math.max(D.clientX-K,0),L=Math.max(F.right-K,0);return L?P/L:0},[]),M=ln.useCallback(D=>{let F=R(D);return F===void 0?void 0:F*S+T},[R,S,T]),C=y!==null&&y.current!==null?y.current.getBoundingClientRect().left:0,A=ln.useCallback(()=>{d(!1),m(0),p("")},[]),x=ln.useCallback(D=>{var K,P,L,V,z,N,B,U,j,Y;let F=R(D);if(F!==void 0){for(let W=0;W=se.scaledStart&&F{let F=M(D);F!==void 0&&i(F)},[M,i]);return ln.createElement("div",{className:"container-buffer-graph"},ln.createElement("div",{className:"buffer-graph-title"},`${gL(a)} Buffer`),ln.createElement("div",{className:"canvas-buffer-graph-container",onMouseLeave:A,onMouseMove:x},s?ln.createElement(nT,{className:"buffer-content-tip",text:f,xPosition:c,offset:C}):null,ln.createElement("canvas",{onClick:O,height:String(nh),width:String(sc),className:"canvas-buffer-graph",ref:y})))}function bL({player:t}){let e=fe(t,"bufferedData"),r=fe(t,"currentTime"),n=fe(t,"maximumPosition"),i=fe(t,"minimumPosition"),a=Ku.useCallback(s=>{t.actions.seek(s)},[t]);if(e===null||Object.keys(e).length===0)return Ku.createElement("div",{className:"buffer-content-no-content"}," No content yet ");let o=Object.keys(e).filter(s=>e[s]!==null).map(s=>Ku.createElement(vL,{key:s,type:s,currentTime:r,minimumPosition:i,maximumPosition:n,data:e[s],seek:a}));return o.length===0?Ku.createElement("div",{className:"buffer-content-no-content"}," No content yet "):Ku.createElement("div",{className:"buffer-content-graphs-parent"},o)}u();l();var oa=Se(Ie());var{useEffect:X5e,useRef:SL}=oa,Z5e=5,IL=20,TL=400,nre=960,tre=3e4,kL=nre,ire=TL+IL+Z5e,rre=20,lT=10;function J5e({module:t}){let e=fe(t,"data"),r=SL(null),n=SL(null),i=SL(rre),a=oa.useCallback(o=>{if(n.current===null||(eGe(n.current),o.length===0))return;i.current=m();let s=o[0].date,d=TL/i.current,c=nre/tre;p(),f();function m(){let b=Math.max(...o.map(T=>T.value||0));return b>=i.current?b+5:b{if(e.length>0){let s=e[e.length-1].date-tre,d;for(d=e.length-1;d>=1&&!(e[d].date<=s);d--);let c=e.slice(d);a(c)}else a([])},[e,a]),X5e(()=>{r.current&&(n.current=r.current.getContext("2d"))},[]),oa.createElement("div",{className:"canvas-buffer-size-container"},oa.createElement("canvas",{className:"canvas-buffer-size",ref:r,width:kL,height:ire}))}function eGe(t){let e=t.canvas;e.width=kL,e.height=ire,t.clearRect(0,0,e.width,e.height)}var are=oa.memo(J5e);var{useEffect:ore,useState:dT}=rt,tGe=500,rGe=2e3;function nGe({player:t}){let[e,r]=dT(!1),[n,i]=dT(!1),[a,o]=dT(null),[s,d]=dT(!1);ore(()=>{if(!t)return;let p=new Xte(rGe);p.actions.addData(t.getState("bufferGap"));let y=setInterval(()=>{p.actions.addData(t.getState("bufferGap"))},tGe);return o(p),()=>{clearInterval(y),p.destroy(),o(null)}},[t]),ore(()=>{t&&(s?t.actions.isDebugElementShown()||t.actions.showDebugElement():t.actions.isDebugElementShown()&&t.actions.hideDebugElement())},[t,s]);let c=rt.useCallback(p=>{let y=p.target,v=y.type==="checkbox"?y.checked:y.value;r(!!v)},[]),m=rt.useCallback(p=>{let y=p.target,v=y.type==="checkbox"?y.checked:y.value;i(!!v)},[]),f=rt.useCallback(p=>{let y=p.target,v=y.type==="checkbox"?y.checked:y.value;d(!!v)},[t]);return rt.createElement("div",{className:"player-charts"},rt.createElement("div",{className:"player-box"},rt.createElement("div",{className:"chart-checkbox"},"Buffer content chart",rt.createElement("label",{className:"switch"},rt.createElement("input",{name:"displayBufferContentChart",type:"checkbox","aria-label":"Display/Hide chart about the buffer's content",checked:e,onChange:c}),rt.createElement("span",{className:"slider round"}))),e&&t?rt.createElement(bL,{player:t}):null),rt.createElement("div",{className:"player-box"},rt.createElement("div",{className:"chart-checkbox"},"Buffer size chart",rt.createElement("label",{className:"switch"},rt.createElement("input",{"aria-label":"Display/Hide chart about the buffer's size",name:"displayBufferSizeChart",type:"checkbox",checked:n,onChange:m}),rt.createElement("span",{className:"slider round"}))),n&&a!==null?rt.createElement(are,{module:a}):null),rt.createElement("div",{className:"player-box"},rt.createElement("div",{className:"chart-checkbox"},"Display debug element (on top of the player)",rt.createElement("label",{className:"switch"},rt.createElement("input",{"aria-label":"Display/Hide debug element on top of the video",name:"displayDebugElement",type:"checkbox",checked:s,onChange:f}),rt.createElement("span",{className:"slider round"})))))}var sre=rt.memo(nGe);u();l();var dn=Se(Ie());u();l();var lc=Se(Ie());u();l();var uc=Se(Ie());function iGe({ariaLabel:t,className:e="",name:r="",onChange:n,options:i=[],selected:a,disabled:o}){return uc.createElement("div",{className:`knob ${e}`},uc.createElement("span",{className:"knob-name"},r),uc.createElement(Rn,{ariaLabel:t,name:r,className:"knob-value",onChange:n,options:i,selected:a,disabled:o}))}var ti=uc.memo(iGe);function aGe({player:t,className:e}){let r=fe(t,"audioRepresentationsLocked"),n=fe(t,"audioRepresentation"),i=fe(t,"audioTrack"),a=i==null?[]:i.representations,[o,s]=lc.useMemo(()=>{if(!a.length||n==null)return[["Not available"],0];if(a.length>1){let c="auto";if(!r){let f=EL(n);f.length>0&&(c+=" ("+f.join(", ")+")")}let m=a.map(f=>EL(f).join(", "));return[[c,...m],r&&a.findIndex(f=>f.id===(n==null?void 0:n.id))+1||0]}return[a.map(c=>EL(c).join(", ")),0]},[a,r,n]),d=lc.useCallback(({index:c})=>{if(c>0){let m=a[c-1];t.actions.lockAudioRepresentations([m])}else t.actions.unlockAudioRepresentations()},[a,t]);return lc.createElement(ti,{name:"Audio quality",ariaLabel:"Update the audio quality",className:e,disabled:a.length<2,onChange:d,options:o,selected:{index:s,value:void 0}})}var ure=aGe;function EL(t){let e=[];return t.bitrate!==void 0&&e.push(`${Math.round(t.bitrate/1e3)}kbps`),e.length===0&&e.push("id: "+String(t.id)),e}u();l();var dc=Se(Ie());function oGe({player:t,className:e}){let r=fe(t,"videoRepresentationsLocked"),n=fe(t,"videoRepresentation"),i=fe(t,"videoTrack"),a=i==null?[]:i.representations,[o,s]=dc.useMemo(()=>{if(!a.length||n==null)return[["Not available"],0];if(a.length>1){let c="auto";if(!r){let f=_L(n);f.length>0&&(c+=" ("+f.join(", ")+")")}let m=a.map(f=>_L(f).join(", "));return[[c,...m],r&&a.findIndex(f=>f.id===(n==null?void 0:n.id))+1||0]}return[a.map(c=>_L(c).join(", ")),0]},[a,r,n]),d=dc.useCallback(({index:c})=>{if(c>0){let m=a[c-1];t.actions.lockVideoRepresentations([m])}else t.actions.unlockVideoRepresentations()},[a,t]);return dc.createElement(ti,{name:"Video quality",ariaLabel:"Update the video quality",className:e,disabled:a.length<2,onChange:d,options:o,selected:{index:s,value:void 0}})}var lre=oGe;function _L(t){let e=[];return t.height!==void 0&&e.push(`${t.height}p`),t.bitrate!==void 0&&e.push(`${Math.round(t.bitrate/1e3)}kbps`),e.length===0&&e.push("id: "+t.id),e}u();l();var ds=Se(Ie());u();l();u();l();var dre={aaa:"Ghotuo",aab:"Alumu-Tesu",aac:"Ari",aad:"Amal",aae:"Arb\xEBresh\xEB Albanian",aaf:"Aranadan",aag:"Ambrak",aah:"Abu' Arapesh",aai:"Arifama-Miniafia",aak:"Ankave",aal:"Afade",aan:"Anamb\xE9",aao:"Algerian Saharan Arabic",aap:"Par\xE1 Ar\xE1ra",aaq:"Eastern Abnaki",aar:"Afar",aas:"Aas\xE1x",aat:"Arvanitika Albanian",aau:"Abau",aaw:"Solong",aax:"Mandobo Atas",aaz:"Amarasi",aba:"Ab\xE9",abb:"Bankon",abc:"Ambala Ayta",abd:"Manide",abe:"Western Abnaki",abf:"Abai Sungai",abg:"Abaga",abh:"Tajiki Arabic",abi:"Abidji",abj:"Aka-Bea",abk:"Abkhazian",abl:"Lampung Nyo",abm:"Abanyom",abn:"Abua",abo:"Abon",abp:"Abellen Ayta",abq:"Abaza",abr:"Abron",abs:"Ambonese Malay",abt:"Ambulas",abu:"Abure",abv:"Baharna Arabic",abw:"Pal",abx:"Inabaknon",aby:"Aneme Wake",abz:"Abui",aca:"Achagua",acb:"\xC1nc\xE1",acd:"Gikyode",ace:"Achinese",acf:"Saint Lucian Creole French",ach:"Acoli",aci:"Aka-Cari",ack:"Aka-Kora",acl:"Akar-Bale",acm:"Mesopotamian Arabic",acn:"Achang",acp:"Eastern Acipa",acq:"Ta'izzi-Adeni Arabic",acr:"Achi",acs:"Acro\xE1",act:"Achterhoeks",acu:"Achuar-Shiwiar",acv:"Achumawi",acw:"Hijazi Arabic",acx:"Omani Arabic",acy:"Cypriot Arabic",acz:"Acheron",ada:"Adangme",adb:"Adabe",add:"Dzodinka",ade:"Adele",adf:"Dhofari Arabic",adg:"Andegerebinha",adh:"Adhola",adi:"Adi",adj:"Adioukrou",adl:"Galo",adn:"Adang",ado:"Abu",adq:"Adangbe",adr:"Adonara",ads:"Adamorobe Sign Language",adt:"Adnyamathanha",adu:"Aduge",adw:"Amundava",adx:"Amdo Tibetan",ady:"Adyghe",adz:"Adzera",aea:"Areba",aeb:"Tunisian Arabic",aec:"Saidi Arabic",aed:"Argentine Sign Language",aee:"Northeast Pashai",aek:"Haeke",ael:"Ambele",aem:"Arem",aen:"Armenian Sign Language",aeq:"Aer",aer:"Eastern Arrernte",aes:"Alsea",aeu:"Akeu",aew:"Ambakich",aey:"Amele",aez:"Aeka",afb:"Gulf Arabic",afd:"Andai",afe:"Putukwam",afg:"Afghan Sign Language",afh:"Afrihili",afi:"Akrukay",afk:"Nanubae",afn:"Defaka",afo:"Eloyi",afp:"Tapei",afr:"Afrikaans",afs:"Afro-Seminole Creole",aft:"Afitti",afu:"Awutu",afz:"Obokuitai",aga:"Aguano",agb:"Legbo",agc:"Agatu",agd:"Agarabi",age:"Angal",agf:"Arguni",agg:"Angor",agh:"Ngelima",agi:"Agariya",agj:"Argobba",agk:"Isarog Agta",agl:"Fembe",agm:"Angaataha",agn:"Agutaynen",ago:"Tainae",agq:"Aghem",agr:"Aguaruna",ags:"Esimbi",agt:"Central Cagayan Agta",agu:"Aguacateco",agv:"Remontado Dumagat",agw:"Kahua",agx:"Aghul",agy:"Southern Alta",agz:"Mt. Iriga Agta",aha:"Ahanta",ahb:"Axamb",ahg:"Qimant",ahh:"Aghu",ahi:"Tiagbamrin Aizi",ahk:"Akha",ahl:"Igo",ahm:"Mobumrin Aizi",ahn:"\xC0h\xE0n",aho:"Ahom",ahp:"Aproumu Aizi",ahr:"Ahirani",ahs:"Ashe",aht:"Ahtena",aia:"Arosi",aib:"Ainu (China)",aic:"Ainbai",aid:"Alngith",aie:"Amara",aif:"Agi",aig:"Antigua and Barbuda Creole English",aih:"Ai-Cham",aii:"Assyrian Neo-Aramaic",aij:"Lishanid Noshan",aik:"Ake",ail:"Aimele",aim:"Aimol",ain:"Ainu (Japan)",aio:"Aiton",aip:"Burumakok",aiq:"Aimaq",air:"Airoran",ais:"Nataoran Amis",ait:"Arikem",aiw:"Aari",aix:"Aighon",aiy:"Ali",aja:"Aja (Sudan)",ajg:"Aja (Benin)",aji:"Aji\xEB",ajn:"Andajin",ajp:"South Levantine Arabic",ajt:"Judeo-Tunisian Arabic",aju:"Judeo-Moroccan Arabic",ajw:"Ajawa",ajz:"Amri Karbi",aka:"Akan",akb:"Batak Angkola",akc:"Mpur",akd:"Ukpet-Ehom",ake:"Akawaio",akf:"Akpa",akg:"Anakalangu",akh:"Angal Heneng",aki:"Aiome",akj:"Aka-Jeru",akk:"Akkadian",akl:"Aklanon",akm:"Aka-Bo",ako:"Akurio",akp:"Siwu",akq:"Ak",akr:"Araki",aks:"Akaselem",akt:"Akolet",aku:"Akum",akv:"Akhvakh",akw:"Akwa",akx:"Aka-Kede",aky:"Aka-Kol",akz:"Alabama",ala:"Alago",alc:"Qawasqar",ald:"Alladian",ale:"Aleut",alf:"Alege",alh:"Alawa",ali:"Amaimon",alj:"Alangan",alk:"Alak",all:"Allar",alm:"Amblong",aln:"Gheg Albanian",alo:"Larike-Wakasihu",alp:"Alune",alq:"Algonquin",alr:"Alutor",als:"Tosk Albanian",alt:"Southern Altai",alu:"'Are'are",alw:"Alaba-K\u2019abeena",alx:"Amol",aly:"Alyawarr",alz:"Alur",ama:"Amanay\xE9",amb:"Ambo",amc:"Amahuaca",ame:"Yanesha'",amf:"Hamer-Banna",amg:"Amurdak",amh:"Amharic",ami:"Amis",amj:"Amdang",amk:"Ambai",aml:"War-Jaintia",amm:"Ama (Papua New Guinea)",amn:"Amanab",amo:"Amo",amp:"Alamblak",amq:"Amahai",amr:"Amarakaeri",ams:"Southern Amami-Oshima",amt:"Amto",amu:"Guerrero Amuzgo",amv:"Ambelau",amw:"Western Neo-Aramaic",amx:"Anmatyerre",amy:"Ami",amz:"Atampaya",ana:"Andaqui",anb:"Andoa",anc:"Ngas",and:"Ansus",ane:"X\xE2r\xE2c\xF9\xF9",anf:"Animere",ang:"Old English (ca. 450-1100)",anh:"Nend",ani:"Andi",anj:"Anor",ank:"Goemai",anl:"Anu-Hkongso Chin",anm:"Anal",ann:"Obolo",ano:"Andoque",anp:"Angika",anq:"Jarawa (India)",anr:"Andh",ans:"Anserma",ant:"Antakarinya",anu:"Anuak",anv:"Denya",anw:"Anaang",anx:"Andra-Hus",any:"Anyin",anz:"Anem",aoa:"Angolar",aob:"Abom",aoc:"Pemon",aod:"Andarum",aoe:"Angal Enen",aof:"Bragat",aog:"Angoram",aoh:"Arma",aoi:"Anindilyakwa",aoj:"Mufian",aok:"Arh\xF6",aol:"Alor",aom:"\xD6mie",aon:"Bumbita Arapesh",aor:"Aore",aos:"Taikat",aot:"Atong (India)",aou:"A'ou",aox:"Atorada",aoz:"Uab Meto",apb:"Sa'a",apc:"North Levantine Arabic",apd:"Sudanese Arabic",ape:"Bukiyip",apf:"Pahanan Agta",apg:"Ampanang",aph:"Athpariya",api:"Apiak\xE1",apj:"Jicarilla Apache",apk:"Kiowa Apache",apl:"Lipan Apache",apm:"Mescalero-Chiricahua Apache",apn:"Apinay\xE9",apo:"Ambul",app:"Apma",apq:"A-Pucikwar",apr:"Arop-Lokep",aps:"Arop-Sissano",apt:"Apatani",apu:"Apurin\xE3",apv:"Alapmunte",apw:"Western Apache",apx:"Aputai",apy:"Apala\xED",apz:"Safeyoka",aqc:"Archi",aqd:"Ampari Dogon",aqg:"Arigidi",aqm:"Atohwaim",aqn:"Northern Alta",aqp:"Atakapa",aqr:"Arh\xE2",aqt:"Angait\xE9",aqz:"Akuntsu",ara:"Arabic",arb:"Standard Arabic",arc:"Official Aramaic (700-300 BCE)",ard:"Arabana",are:"Western Arrarnta",arg:"Aragonese",arh:"Arhuaco",ari:"Arikara",arj:"Arapaso",ark:"Arikap\xFA",arl:"Arabela",arn:"Mapudungun",aro:"Araona",arp:"Arapaho",arq:"Algerian Arabic",arr:"Karo (Brazil)",ars:"Najdi Arabic",aru:"Aru\xE1 (Amazonas State)",arv:"Arbore",arw:"Arawak",arx:"Aru\xE1 (Rodonia State)",ary:"Moroccan Arabic",arz:"Egyptian Arabic",asa:"Asu (Tanzania)",asb:"Assiniboine",asc:"Casuarina Coast Asmat",asd:"Asas",ase:"American Sign Language",asf:"Australian Sign Language",asg:"Cishingini",ash:"Abishira",asi:"Buruwai",asj:"Sari",ask:"Ashkun",asl:"Asilulu",asm:"Assamese",asn:"Xing\xFA Asurin\xED",aso:"Dano",asp:"Algerian Sign Language",asq:"Austrian Sign Language",asr:"Asuri",ass:"Ipulo",ast:"Asturian",asu:"Tocantins Asurini",asv:"Asoa",asw:"Australian Aborigines Sign Language",asx:"Muratayak",asy:"Yaosakor Asmat",asz:"As",ata:"Pele-Ata",atb:"Zaiwa",atc:"Atsahuaca",atd:"Ata Manobo",ate:"Atemble",atg:"Ivbie North-Okpela-Arhe",ati:"Atti\xE9",atj:"Atikamekw",atk:"Ati",atl:"Mt. Iraya Agta",atm:"Ata",atn:"Ashtiani",ato:"Atong (Cameroon)",atp:"Pudtol Atta",atq:"Aralle-Tabulahan",atr:"Waimiri-Atroari",ats:"Gros Ventre",att:"Pamplona Atta",atu:"Reel",atv:"Northern Altai",atw:"Atsugewi",atx:"Arutani",aty:"Aneityum",atz:"Arta",aua:"Asumboa",aub:"Alugu",auc:"Waorani",aud:"Anuta",aug:"Aguna",auh:"Aushi",aui:"Anuki",auj:"Awjilah",auk:"Heyo",aul:"Aulua",aum:"Asu (Nigeria)",aun:"Molmo One",auo:"Auyokawa",aup:"Makayam",auq:"Anus",aur:"Aruek",aut:"Austral",auu:"Auye",auw:"Awyi",aux:"Aur\xE1",auy:"Awiyaana",auz:"Uzbeki Arabic",ava:"Avaric",avb:"Avau",avd:"Alviri-Vidari",ave:"Avestan",avi:"Avikam",avk:"Kotava",avl:"Eastern Egyptian Bedawi Arabic",avm:"Angkamuthi",avn:"Avatime",avo:"Agavotaguerra",avs:"Aushiri",avt:"Au",avu:"Avokaya",avv:"Av\xE1-Canoeiro",awa:"Awadhi",awb:"Awa (Papua New Guinea)",awc:"Cicipu",awe:"Awet\xED",awg:"Anguthimri",awh:"Awbono",awi:"Aekyom",awk:"Awabakal",awm:"Arawum",awn:"Awngi",awo:"Awak",awr:"Awera",aws:"South Awyu",awt:"Arawet\xE9",awu:"Central Awyu",awv:"Jair Awyu",aww:"Awun",awx:"Awara",awy:"Edera Awyu",axb:"Abipon",axe:"Ayerrerenge",axg:"Mato Grosso Ar\xE1ra",axk:"Yaka (Central African Republic)",axl:"Lower Southern Aranda",axm:"Middle Armenian",axx:"X\xE2r\xE2gur\xE8",aya:"Awar",ayb:"Ayizo Gbe",ayc:"Southern Aymara",ayd:"Ayabadhu",aye:"Ayere",ayg:"Ginyanga",ayh:"Hadrami Arabic",ayi:"Leyigha",ayk:"Akuku",ayl:"Libyan Arabic",aym:"Aymara",ayn:"Sanaani Arabic",ayo:"Ayoreo",ayp:"North Mesopotamian Arabic",ayq:"Ayi (Papua New Guinea)",ayr:"Central Aymara",ays:"Sorsogon Ayta",ayt:"Magbukun Ayta",ayu:"Ayu",ayy:"Tayabas Ayta",ayz:"Mai Brat",aza:"Azha",azb:"South Azerbaijani",azd:"Eastern Durango Nahuatl",aze:"Azerbaijani",azg:"San Pedro Amuzgos Amuzgo",azj:"North Azerbaijani",azm:"Ipalapa Amuzgo",azn:"Western Durango Nahuatl",azo:"Awing",azt:"Faire Atta",azz:"Highland Puebla Nahuatl",baa:"Babatana",bab:"Bainouk-Gunyu\xF1o",bac:"Badui",bae:"Bar\xE9",baf:"Nubaca",bag:"Tuki",bah:"Bahamas Creole English",baj:"Barakai",bak:"Bashkir",bal:"Baluchi",bam:"Bambara",ban:"Balinese",bao:"Waimaha",bap:"Bantawa",bar:"Bavarian",bas:"Basa (Cameroon)",bau:"Bada (Nigeria)",bav:"Vengo",baw:"Bambili-Bambui",bax:"Bamun",bay:"Batuley",bba:"Baatonum",bbb:"Barai",bbc:"Batak Toba",bbd:"Bau",bbe:"Bangba",bbf:"Baibai",bbg:"Barama",bbh:"Bugan",bbi:"Barombi",bbj:"Ghom\xE1l\xE1'",bbk:"Babanki",bbl:"Bats",bbm:"Babango",bbn:"Uneapa",bbo:"Northern Bobo Madar\xE9",bbp:"West Central Banda",bbq:"Bamali",bbr:"Girawa",bbs:"Bakpinka",bbt:"Mburku",bbu:"Kulung (Nigeria)",bbv:"Karnai",bbw:"Baba",bbx:"Bubia",bby:"Befang",bbz:"Babalia Creole Arabic",bca:"Central Bai",bcb:"Bainouk-Samik",bcc:"Southern Balochi",bcd:"North Babar",bce:"Bamenyam",bcf:"Bamu",bcg:"Baga Pokur",bch:"Bariai",bci:"Baoul\xE9",bcj:"Bardi",bck:"Bunaba",bcl:"Central Bikol",bcm:"Bannoni",bcn:"Bali (Nigeria)",bco:"Kaluli",bcp:"Bali (Democratic Republic of Congo)",bcq:"Bench",bcr:"Babine",bcs:"Kohumono",bct:"Bendi",bcu:"Awad Bing",bcv:"Shoo-Minda-Nye",bcw:"Bana",bcy:"Bacama",bcz:"Bainouk-Gunyaamolo",bda:"Bayot",bdb:"Basap",bdc:"Ember\xE1-Baud\xF3",bdd:"Bunama",bde:"Bade",bdf:"Biage",bdg:"Bonggi",bdh:"Baka (Sudan)",bdi:"Burun",bdj:"Bai",bdk:"Budukh",bdl:"Indonesian Bajau",bdm:"Buduma",bdn:"Baldemu",bdo:"Morom",bdp:"Bende",bdq:"Bahnar",bdr:"West Coast Bajau",bds:"Burunge",bdt:"Bokoto",bdu:"Oroko",bdv:"Bodo Parja",bdw:"Baham",bdx:"Budong-Budong",bdy:"Bandjalang",bdz:"Badeshi",bea:"Beaver",beb:"Bebele",bec:"Iceve-Maci",bed:"Bedoanas",bee:"Byangsi",bef:"Benabena",beg:"Belait",beh:"Biali",bei:"Bekati'",bej:"Beja",bek:"Bebeli",bel:"Belarusian",bem:"Bemba (Zambia)",ben:"Bengali",beo:"Beami",bep:"Besoa",beq:"Beembe",bes:"Besme",bet:"Guiberoua B\xE9te",beu:"Blagar",bev:"Daloa B\xE9t\xE9",bew:"Betawi",bex:"Jur Modo",bey:"Beli (Papua New Guinea)",bez:"Bena (Tanzania)",bfa:"Bari",bfb:"Pauri Bareli",bfc:"Panyi Bai",bfd:"Bafut",bfe:"Betaf",bff:"Bofi",bfg:"Busang Kayan",bfh:"Blafe",bfi:"British Sign Language",bfj:"Bafanji",bfk:"Ban Khor Sign Language",bfl:"Banda-Nd\xE9l\xE9",bfm:"Mmen",bfn:"Bunak",bfo:"Malba Birifor",bfp:"Beba",bfq:"Badaga",bfr:"Bazigar",bfs:"Southern Bai",bft:"Balti",bfu:"Gahri",bfw:"Bondo",bfx:"Bantayanon",bfy:"Bagheli",bfz:"Mahasu Pahari",bga:"Gwamhi-Wuri",bgb:"Bobongko",bgc:"Haryanvi",bgd:"Rathwi Bareli",bge:"Bauria",bgf:"Bangandu",bgg:"Bugun",bgi:"Giangan",bgj:"Bangolan",bgk:"Bit",bgl:"Bo (Laos)",bgn:"Western Balochi",bgo:"Baga Koga",bgp:"Eastern Balochi",bgq:"Bagri",bgr:"Bawm Chin",bgs:"Tagabawa",bgt:"Bughotu",bgu:"Mbongno",bgv:"Warkay-Bipim",bgw:"Bhatri",bgx:"Balkan Gagauz Turkish",bgy:"Benggoi",bgz:"Banggai",bha:"Bharia",bhb:"Bhili",bhc:"Biga",bhd:"Bhadrawahi",bhe:"Bhaya",bhf:"Odiai",bhg:"Binandere",bhh:"Bukharic",bhi:"Bhilali",bhj:"Bahing",bhl:"Bimin",bhm:"Bathari",bhn:"Bohtan Neo-Aramaic",bho:"Bhojpuri",bhp:"Bima",bhq:"Tukang Besi South",bhr:"Bara Malagasy",bhs:"Buwal",bht:"Bhattiyali",bhu:"Bhunjia",bhv:"Bahau",bhw:"Biak",bhx:"Bhalay",bhy:"Bhele",bhz:"Bada (Indonesia)",bia:"Badimaya",bib:"Bissa",bic:"Bikaru",bid:"Bidiyo",bie:"Bepour",bif:"Biafada",big:"Biangai",bij:"Vaghat-Ya-Bijim-Legeri",bik:"Bikol",bil:"Bile",bim:"Bimoba",bin:"Bini",bio:"Nai",bip:"Bila",biq:"Bipi",bir:"Bisorio",bis:"Bislama",bit:"Berinomo",biu:"Biete",biv:"Southern Birifor",biw:"Kol (Cameroon)",bix:"Bijori",biy:"Birhor",biz:"Baloi",bja:"Budza",bjb:"Banggarla",bjc:"Bariji",bje:"Biao-Jiao Mien",bjf:"Barzani Jewish Neo-Aramaic",bjg:"Bidyogo",bjh:"Bahinemo",bji:"Burji",bjj:"Kanauji",bjk:"Barok",bjl:"Bulu (Papua New Guinea)",bjm:"Bajelani",bjn:"Banjar",bjo:"Mid-Southern Banda",bjp:"Fanamaket",bjr:"Binumarien",bjs:"Bajan",bjt:"Balanta-Ganja",bju:"Busuu",bjv:"Bedjond",bjw:"Bakw\xE9",bjx:"Banao Itneg",bjy:"Bayali",bjz:"Baruga",bka:"Kyak",bkc:"Baka (Cameroon)",bkd:"Binukid",bkf:"Beeke",bkg:"Buraka",bkh:"Bakoko",bki:"Baki",bkj:"Pande",bkk:"Brokskat",bkl:"Berik",bkm:"Kom (Cameroon)",bkn:"Bukitan",bko:"Kwa'",bkp:"Boko (Democratic Republic of Congo)",bkq:"Bakair\xED",bkr:"Bakumpai",bks:"Northern Sorsoganon",bkt:"Boloki",bku:"Buhid",bkv:"Bekwarra",bkw:"Bekwel",bkx:"Baikeno",bky:"Bokyi",bkz:"Bungku",bla:"Siksika",blb:"Bilua",blc:"Bella Coola",bld:"Bolango",ble:"Balanta-Kentohe",blf:"Buol",blg:"Balau",blh:"Kuwaa",bli:"Bolia",blj:"Bolongan",blk:"Pa'o Karen",bll:"Biloxi",blm:"Beli (Sudan)",bln:"Southern Catanduanes Bikol",blo:"Anii",blp:"Blablanga",blq:"Baluan-Pam",blr:"Blang",bls:"Balaesang",blt:"Tai Dam",blv:"Kibala",blw:"Balangao",blx:"Mag-Indi Ayta",bly:"Notre",blz:"Balantak",bma:"Lame",bmb:"Bembe",bmc:"Biem",bmd:"Baga Manduri",bme:"Limassa",bmf:"Bom-Kim",bmg:"Bamwe",bmh:"Kein",bmi:"Bagirmi",bmj:"Bote-Majhi",bmk:"Ghayavi",bml:"Bomboli",bmm:"Northern Betsimisaraka Malagasy",bmn:"Bina (Papua New Guinea)",bmo:"Bambalang",bmp:"Bulgebi",bmq:"Bomu",bmr:"Muinane",bms:"Bilma Kanuri",bmt:"Biao Mon",bmu:"Somba-Siawari",bmv:"Bum",bmw:"Bomwali",bmx:"Baimak",bmz:"Baramu",bna:"Bonerate",bnb:"Bookan",bnc:"Bontok",bnd:"Banda (Indonesia)",bne:"Bintauna",bnf:"Masiwang",bng:"Benga",bni:"Bangi",bnj:"Eastern Tawbuid",bnk:"Bierebo",bnl:"Boon",bnm:"Batanga",bnn:"Bunun",bno:"Bantoanon",bnp:"Bola",bnq:"Bantik",bnr:"Butmas-Tur",bns:"Bundeli",bnu:"Bentong",bnv:"Bonerif",bnw:"Bisis",bnx:"Bangubangu",bny:"Bintulu",bnz:"Beezen",boa:"Bora",bob:"Aweer",bod:"Tibetan",boe:"Mundabli",bof:"Bolon",bog:"Bamako Sign Language",boh:"Boma",boi:"Barbare\xF1o",boj:"Anjam",bok:"Bonjo",bol:"Bole",bom:"Berom",bon:"Bine",boo:"Tiemac\xE8w\xE8 Bozo",bop:"Bonkiman",boq:"Bogaya",bor:"Bor\xF4ro",bos:"Bosnian",bot:"Bongo",bou:"Bondei",bov:"Tuwuli",bow:"Rema",box:"Buamu",boy:"Bodo (Central African Republic)",boz:"Ti\xE9yaxo Bozo",bpa:"Daakaka",bpb:"Barbacoas",bpd:"Banda-Banda",bpg:"Bonggo",bph:"Botlikh",bpi:"Bagupi",bpj:"Binji",bpk:"Orowe",bpl:"Broome Pearling Lugger Pidgin",bpm:"Biyom",bpn:"Dzao Min",bpo:"Anasi",bpp:"Kaure",bpq:"Banda Malay",bpr:"Koronadal Blaan",bps:"Sarangani Blaan",bpt:"Barrow Point",bpu:"Bongu",bpv:"Bian Marind",bpw:"Bo (Papua New Guinea)",bpx:"Palya Bareli",bpy:"Bishnupriya",bpz:"Bilba",bqa:"Tchumbuli",bqb:"Bagusa",bqc:"Boko (Benin)",bqd:"Bung",bqf:"Baga Kaloum",bqg:"Bago-Kusuntu",bqh:"Baima",bqi:"Bakhtiari",bqj:"Bandial",bqk:"Banda-Mbr\xE8s",bql:"Bilakura",bqm:"Wumboko",bqn:"Bulgarian Sign Language",bqo:"Balo",bqp:"Busa",bqq:"Biritai",bqr:"Burusu",bqs:"Bosngun",bqt:"Bamukumbit",bqu:"Boguru",bqv:"Koro Wachi",bqw:"Buru (Nigeria)",bqx:"Baangi",bqy:"Bengkala Sign Language",bqz:"Bakaka",bra:"Braj",brb:"Lave",brc:"Berbice Creole Dutch",brd:"Baraamu",bre:"Breton",brf:"Bera",brg:"Baure",brh:"Brahui",bri:"Mokpwe",brj:"Bieria",brk:"Birked",brl:"Birwa",brm:"Barambu",brn:"Boruca",bro:"Brokkat",brp:"Barapasi",brq:"Breri",brr:"Birao",brs:"Baras",brt:"Bitare",bru:"Eastern Bru",brv:"Western Bru",brw:"Bellari",brx:"Bodo (India)",bry:"Burui",brz:"Bilbil",bsa:"Abinomn",bsb:"Brunei Bisaya",bsc:"Bassari",bse:"Wushi",bsf:"Bauchi",bsg:"Bashkardi",bsh:"Kati",bsi:"Bassossi",bsj:"Bangwinji",bsk:"Burushaski",bsl:"Basa-Gumna",bsm:"Busami",bsn:"Barasana-Eduria",bso:"Buso",bsp:"Baga Sitemu",bsq:"Bassa",bsr:"Bassa-Kontagora",bss:"Akoose",bst:"Basketo",bsu:"Bahonsuai",bsv:"Baga Soban\xE9",bsw:"Baiso",bsx:"Yangkam",bsy:"Sabah Bisaya",bta:"Bata",btc:"Bati (Cameroon)",btd:"Batak Dairi",bte:"Gamo-Ningi",btf:"Birgit",btg:"Gagnoa B\xE9t\xE9",bth:"Biatah Bidayuh",bti:"Burate",btj:"Bacanese Malay",btm:"Batak Mandailing",btn:"Ratagnon",bto:"Rinconada Bikol",btp:"Budibud",btq:"Batek",btr:"Baetora",bts:"Batak Simalungun",btt:"Bete-Bendi",btu:"Batu",btv:"Bateri",btw:"Butuanon",btx:"Batak Karo",bty:"Bobot",btz:"Batak Alas-Kluet",bua:"Buriat",bub:"Bua",buc:"Bushi",bud:"Ntcham",bue:"Beothuk",buf:"Bushoong",bug:"Buginese",buh:"Younuo Bunu",bui:"Bongili",buj:"Basa-Gurmana",buk:"Bugawac",bul:"Bulgarian",bum:"Bulu (Cameroon)",bun:"Sherbro",buo:"Terei",bup:"Busoa",buq:"Brem",bus:"Bokobaru",but:"Bungain",buu:"Budu",buv:"Bun",buw:"Bubi",bux:"Boghom",buy:"Bullom So",buz:"Bukwen",bva:"Barein",bvb:"Bube",bvc:"Baelelea",bvd:"Baeggu",bve:"Berau Malay",bvf:"Boor",bvg:"Bonkeng",bvh:"Bure",bvi:"Belanda Viri",bvj:"Baan",bvk:"Bukat",bvl:"Bolivian Sign Language",bvm:"Bamunka",bvn:"Buna",bvo:"Bolgo",bvp:"Bumang",bvq:"Birri",bvr:"Burarra",bvt:"Bati (Indonesia)",bvu:"Bukit Malay",bvv:"Baniva",bvw:"Boga",bvx:"Dibole",bvy:"Baybayanon",bvz:"Bauzi",bwa:"Bwatoo",bwb:"Namosi-Naitasiri-Serua",bwc:"Bwile",bwd:"Bwaidoka",bwe:"Bwe Karen",bwf:"Boselewa",bwg:"Barwe",bwh:"Bishuo",bwi:"Baniwa",bwj:"L\xE1\xE1 L\xE1\xE1 Bwamu",bwk:"Bauwaki",bwl:"Bwela",bwm:"Biwat",bwn:"Wunai Bunu",bwo:"Boro (Ethiopia)",bwp:"Mandobo Bawah",bwq:"Southern Bobo Madar\xE9",bwr:"Bura-Pabir",bws:"Bomboma",bwt:"Bafaw-Balong",bwu:"Buli (Ghana)",bww:"Bwa",bwx:"Bu-Nao Bunu",bwy:"Cwi Bwamu",bwz:"Bwisi",bxa:"Tairaha",bxb:"Belanda Bor",bxc:"Molengue",bxd:"Pela",bxe:"Birale",bxf:"Bilur",bxg:"Bangala",bxh:"Buhutu",bxi:"Pirlatapa",bxj:"Bayungu",bxk:"Bukusu",bxl:"Jalkunan",bxm:"Mongolia Buriat",bxn:"Burduna",bxo:"Barikanchi",bxp:"Bebil",bxq:"Beele",bxr:"Russia Buriat",bxs:"Busam",bxu:"China Buriat",bxv:"Berakou",bxw:"Bankagooma",bxz:"Binahari",bya:"Batak",byb:"Bikya",byc:"Ubaghara",byd:"Benyadu'",bye:"Pouye",byf:"Bete",byg:"Baygo",byh:"Bhujel",byi:"Buyu",byj:"Bina (Nigeria)",byk:"Biao",byl:"Bayono",bym:"Bidyara",byn:"Bilin",byo:"Biyo",byp:"Bumaji",byq:"Basay",byr:"Baruya",bys:"Burak",byt:"Berti",byv:"Medumba",byw:"Belhariya",byx:"Qaqet",byz:"Banaro",bza:"Bandi",bzb:"Andio",bzc:"Southern Betsimisaraka Malagasy",bzd:"Bribri",bze:"Jenaama Bozo",bzf:"Boikin",bzg:"Babuza",bzh:"Mapos Buang",bzi:"Bisu",bzj:"Belize Kriol English",bzk:"Nicaragua Creole English",bzl:"Boano (Sulawesi)",bzm:"Bolondo",bzn:"Boano (Maluku)",bzo:"Bozaba",bzp:"Kemberano",bzq:"Buli (Indonesia)",bzr:"Biri",bzs:"Brazilian Sign Language",bzt:"Brithenig",bzu:"Burmeso",bzv:"Naami",bzw:"Basa (Nigeria)",bzx:"K\u025Bl\u025Bngaxo Bozo",bzy:"Obanliku",bzz:"Evant",caa:"Chort\xED",cab:"Garifuna",cac:"Chuj",cad:"Caddo",cae:"Lehar",caf:"Southern Carrier",cag:"Nivacl\xE9",cah:"Cahuarano",caj:"Chan\xE9",cak:"Kaqchikel",cal:"Carolinian",cam:"Cemuh\xEE",can:"Chambri",cao:"Ch\xE1cobo",cap:"Chipaya",caq:"Car Nicobarese",car:"Galibi Carib",cas:"Tsiman\xE9",cat:"Catalan",cav:"Cavine\xF1a",caw:"Callawalla",cax:"Chiquitano",cay:"Cayuga",caz:"Canichana",cbb:"Cabiyar\xED",cbc:"Carapana",cbd:"Carijona",cbg:"Chimila",cbi:"Chachi",cbj:"Ede Cabe",cbk:"Chavacano",cbl:"Bualkhaw Chin",cbn:"Nyahkur",cbo:"Izora",cbq:"Tsucuba",cbr:"Cashibo-Cacataibo",cbs:"Cashinahua",cbt:"Chayahuita",cbu:"Candoshi-Shapra",cbv:"Cacua",cbw:"Kinabalian",cby:"Carabayo",cca:"Cauca",ccc:"Chamicuro",ccd:"Cafundo Creole",cce:"Chopi",ccg:"Samba Daka",cch:"Atsam",ccj:"Kasanga",ccl:"Cutchi-Swahili",ccm:"Malaccan Creole Malay",cco:"Comaltepec Chinantec",ccp:"Chakma",ccr:"Cacaopera",cda:"Choni",cde:"Chenchu",cdf:"Chiru",cdg:"Chamari",cdh:"Chambeali",cdi:"Chodri",cdj:"Churahi",cdm:"Chepang",cdn:"Chaudangsi",cdo:"Min Dong Chinese",cdr:"Cinda-Regi-Tiyal",cds:"Chadian Sign Language",cdy:"Chadong",cdz:"Koda",cea:"Lower Chehalis",ceb:"Cebuano",ceg:"Chamacoco",cek:"Eastern Khumi Chin",cen:"Cen",ces:"Czech",cet:"Cent\xFA\xFAm",cfa:"Dijim-Bwilim",cfd:"Cara",cfg:"Como Karim",cfm:"Falam Chin",cga:"Changriwa",cgc:"Kagayanen",cgg:"Chiga",cgk:"Chocangacakha",cha:"Chamorro",chb:"Chibcha",chc:"Catawba",chd:"Highland Oaxaca Chontal",che:"Chechen",chf:"Tabasco Chontal",chg:"Chagatai",chh:"Chinook",chj:"Ojitl\xE1n Chinantec",chk:"Chuukese",chl:"Cahuilla",chm:"Mari (Russia)",chn:"Chinook jargon",cho:"Choctaw",chp:"Chipewyan",chq:"Quiotepec Chinantec",chr:"Cherokee",cht:"Chol\xF3n",chu:"Church Slavic",chv:"Chuvash",chw:"Chuwabu",chx:"Chantyal",chy:"Cheyenne",chz:"Ozumac\xEDn Chinantec",cia:"Cia-Cia",cib:"Ci Gbe",cic:"Chickasaw",cid:"Chimariko",cie:"Cineni",cih:"Chinali",cik:"Chitkuli Kinnauri",cim:"Cimbrian",cin:"Cinta Larga",cip:"Chiapanec",cir:"Tiri",ciw:"Chippewa",ciy:"Chaima",cja:"Western Cham",cje:"Chru",cjh:"Upper Chehalis",cji:"Chamalal",cjk:"Chokwe",cjm:"Eastern Cham",cjn:"Chenapian",cjo:"Ash\xE9ninka Pajonal",cjp:"Cab\xE9car",cjs:"Shor",cjv:"Chuave",cjy:"Jinyu Chinese",ckb:"Central Kurdish",ckh:"Chak",ckl:"Cibak",ckn:"Kaang Chin",cko:"Anufo",ckq:"Kajakse",ckr:"Kairak",cks:"Tayo",ckt:"Chukot",cku:"Koasati",ckv:"Kavalan",ckx:"Caka",cky:"Cakfem-Mushere",ckz:"Cakchiquel-Quich\xE9 Mixed Language",cla:"Ron",clc:"Chilcotin",cld:"Chaldean Neo-Aramaic",cle:"Lealao Chinantec",clh:"Chilisso",cli:"Chakali",clj:"Laitu Chin",clk:"Idu-Mishmi",cll:"Chala",clm:"Clallam",clo:"Lowland Oaxaca Chontal",clt:"Lautu Chin",clu:"Caluyanun",clw:"Chulym",cly:"Eastern Highland Chatino",cma:"Maa",cme:"Cerma",cmg:"Classical Mongolian",cmi:"Ember\xE1-Cham\xED",cml:"Campalagian",cmm:"Michigamea",cmn:"Mandarin Chinese",cmo:"Central Mnong",cmr:"Mro-Khimi Chin",cms:"Messapic",cmt:"Camtho",cna:"Changthang",cnb:"Chinbon Chin",cnc:"C\xF4\xF4ng",cng:"Northern Qiang",cnh:"Hakha Chin",cni:"Ash\xE1ninka",cnk:"Khumi Chin",cnl:"Lalana Chinantec",cno:"Con",cns:"Central Asmat",cnt:"Tepetotutla Chinantec",cnu:"Chenoua",cnw:"Ngawn Chin",cnx:"Middle Cornish",coa:"Cocos Islands Malay",cob:"Chicomuceltec",coc:"Cocopa",cod:"Cocama-Cocamilla",coe:"Koreguaje",cof:"Colorado",cog:"Chong",coh:"Chonyi-Dzihana-Kauma",coj:"Cochimi",cok:"Santa Teresa Cora",col:"Columbia-Wenatchi",com:"Comanche",con:"Cof\xE1n",coo:"Comox",cop:"Coptic",coq:"Coquille",cor:"Cornish",cos:"Corsican",cot:"Caquinte",cou:"Wamey",cov:"Cao Miao",cow:"Cowlitz",cox:"Nanti",coz:"Chochotec",cpa:"Palantla Chinantec",cpb:"Ucayali-Yur\xFAa Ash\xE9ninka",cpc:"Ajy\xEDninka Apurucayali",cpg:"Cappadocian Greek",cpi:"Chinese Pidgin English",cpn:"Cherepon",cpo:"Kpeego",cps:"Capiznon",cpu:"Pichis Ash\xE9ninka",cpx:"Pu-Xian Chinese",cpy:"South Ucayali Ash\xE9ninka",cqd:"Chuanqiandian Cluster Miao",cra:"Chara",crb:"Island Carib",crc:"Lonwolwol",crd:"Coeur d'Alene",cre:"Cree",crf:"Caramanta",crg:"Michif",crh:"Crimean Tatar",cri:"S\xE3otomense",crj:"Southern East Cree",crk:"Plains Cree",crl:"Northern East Cree",crm:"Moose Cree",crn:"El Nayar Cora",cro:"Crow",crq:"Iyo'wujwa Chorote",crr:"Carolina Algonquian",crs:"Seselwa Creole French",crt:"Iyojwa'ja Chorote",crv:"Chaura",crw:"Chrau",crx:"Carrier",cry:"Cori",crz:"Cruze\xF1o",csa:"Chiltepec Chinantec",csb:"Kashubian",csc:"Catalan Sign Language",csd:"Chiangmai Sign Language",cse:"Czech Sign Language",csf:"Cuba Sign Language",csg:"Chilean Sign Language",csh:"Asho Chin",csi:"Coast Miwok",csj:"Songlai Chin",csk:"Jola-Kasa",csl:"Chinese Sign Language",csm:"Central Sierra Miwok",csn:"Colombian Sign Language",cso:"Sochiapam Chinantec",csq:"Croatia Sign Language",csr:"Costa Rican Sign Language",css:"Southern Ohlone",cst:"Northern Ohlone",csv:"Sumtu Chin",csw:"Swampy Cree",csy:"Siyin Chin",csz:"Coos",cta:"Tataltepec Chatino",ctc:"Chetco",ctd:"Tedim Chin",cte:"Tepinapa Chinantec",ctg:"Chittagonian",cth:"Thaiphum Chin",ctl:"Tlacoatzintepec Chinantec",ctm:"Chitimacha",ctn:"Chhintange",cto:"Ember\xE1-Cat\xEDo",ctp:"Western Highland Chatino",cts:"Northern Catanduanes Bikol",ctt:"Wayanad Chetti",ctu:"Chol",ctz:"Zacatepec Chatino",cua:"Cua",cub:"Cubeo",cuc:"Usila Chinantec",cug:"Chungmboko",cuh:"Chuka",cui:"Cuiba",cuj:"Mashco Piro",cuk:"San Blas Kuna",cul:"Culina",cuo:"Cumanagoto",cup:"Cupe\xF1o",cuq:"Cun",cur:"Chhulung",cut:"Teutila Cuicatec",cuu:"Tai Ya",cuv:"Cuvok",cuw:"Chukwa",cux:"Tepeuxila Cuicatec",cvg:"Chug",cvn:"Valle Nacional Chinantec",cwa:"Kabwa",cwb:"Maindo",cwd:"Woods Cree",cwe:"Kwere",cwg:"Chewong",cwt:"Kuwaataay",cya:"Nopala Chatino",cyb:"Cayubaba",cym:"Welsh",cyo:"Cuyonon",czh:"Huizhou Chinese",czk:"Knaanic",czn:"Zenzontepec Chatino",czo:"Min Zhong Chinese",czt:"Zotung Chin",daa:"Dangal\xE9at",dac:"Dambi",dad:"Marik",dae:"Duupa",dag:"Dagbani",dah:"Gwahatike",dai:"Day",daj:"Dar Fur Daju",dak:"Dakota",dal:"Dahalo",dam:"Damakawa",dan:"Danish",dao:"Daai Chin",daq:"Dandami Maria",dar:"Dargwa",das:"Daho-Doo",dau:"Dar Sila Daju",dav:"Taita",daw:"Davawenyo",dax:"Dayi",daz:"Dao",dba:"Bangime",dbb:"Deno",dbd:"Dadiya",dbe:"Dabe",dbf:"Edopi",dbg:"Dogul Dom Dogon",dbi:"Doka",dbj:"Ida'an",dbl:"Dyirbal",dbm:"Duguri",dbn:"Duriankere",dbo:"Dulbu",dbp:"Duwai",dbq:"Daba",dbr:"Dabarre",dbt:"Ben Tey Dogon",dbu:"Bondum Dom Dogon",dbv:"Dungu",dbw:"Bankan Tey Dogon",dby:"Dibiyaso",dcc:"Deccan",dcr:"Negerhollands",dda:"Dadi Dadi",ddd:"Dongotono",dde:"Doondo",ddg:"Fataluku",ddi:"West Goodenough",ddj:"Jaru",ddn:"Dendi (Benin)",ddo:"Dido",ddr:"Dhudhuroa",dds:"Donno So Dogon",ddw:"Dawera-Daweloor",dec:"Dagik",ded:"Dedua",dee:"Dewoin",def:"Dezfuli",deg:"Degema",deh:"Dehwari",dei:"Demisa",dek:"Dek",del:"Delaware",dem:"Dem",den:"Slave (Athapascan)",dep:"Pidgin Delaware",deq:"Dendi (Central African Republic)",der:"Deori",des:"Desano",deu:"German",dev:"Domung",dez:"Dengese",dga:"Southern Dagaare",dgb:"Bunoge Dogon",dgc:"Casiguran Dumagat Agta",dgd:"Dagaari Dioula",dge:"Degenan",dgg:"Doga",dgh:"Dghwede",dgi:"Northern Dagara",dgk:"Dagba",dgl:"Andaandi",dgn:"Dagoman",dgo:"Dogri (individual language)",dgr:"Dogrib",dgs:"Dogoso",dgt:"Ndra'ngith",dgu:"Degaru",dgw:"Daungwurrung",dgx:"Doghoro",dgz:"Daga",dhd:"Dhundari",dhg:"Dhangu-Djangu",dhi:"Dhimal",dhl:"Dhalandji",dhm:"Zemba",dhn:"Dhanki",dho:"Dhodia",dhr:"Dhargari",dhs:"Dhaiso",dhu:"Dhurga",dhv:"Dehu",dhw:"Dhanwar (Nepal)",dhx:"Dhungaloo",dia:"Dia",dib:"South Central Dinka",dic:"Lakota Dida",did:"Didinga",dif:"Dieri",dig:"Digo",dih:"Kumiai",dii:"Dimbong",dij:"Dai",dik:"Southwestern Dinka",dil:"Dilling",dim:"Dime",din:"Dinka",dio:"Dibo",dip:"Northeastern Dinka",diq:"Dimli (individual language)",dir:"Dirim",dis:"Dimasa",dit:"Dirari",diu:"Diriku",div:"Dhivehi",diw:"Northwestern Dinka",dix:"Dixon Reef",diy:"Diuwe",diz:"Ding",dja:"Djadjawurrung",djb:"Djinba",djc:"Dar Daju Daju",djd:"Djamindjung",dje:"Zarma",djf:"Djangun",dji:"Djinang",djj:"Djeebbana",djk:"Eastern Maroon Creole",djm:"Jamsay Dogon",djn:"Djauan",djo:"Jangkang",djr:"Djambarrpuyngu",dju:"Kapriman",djw:"Djawi",dka:"Dakpakha",dkk:"Dakka",dkr:"Kuijau",dks:"Southeastern Dinka",dkx:"Mazagway",dlg:"Dolgan",dlk:"Dahalik",dlm:"Dalmatian",dln:"Darlong",dma:"Duma",dmb:"Mombo Dogon",dmc:"Gavak",dmd:"Madhi Madhi",dme:"Dugwor",dmg:"Upper Kinabatangan",dmk:"Domaaki",dml:"Dameli",dmm:"Dama",dmo:"Kemedzung",dmr:"East Damar",dms:"Dampelas",dmu:"Dubu",dmv:"Dumpas",dmw:"Mudburra",dmx:"Dema",dmy:"Demta",dna:"Upper Grand Valley Dani",dnd:"Daonda",dne:"Ndendeule",dng:"Dungan",dni:"Lower Grand Valley Dani",dnj:"Dan",dnk:"Dengka",dnn:"Dz\xF9\xF9ngoo",dnr:"Danaru",dnt:"Mid Grand Valley Dani",dnu:"Danau",dnv:"Danu",dnw:"Western Dani",dny:"Den\xED",doa:"Dom",dob:"Dobu",doc:"Northern Dong",doe:"Doe",dof:"Domu",doh:"Dong",doi:"Dogri (macrolanguage)",dok:"Dondo",dol:"Doso",don:"Toura (Papua New Guinea)",doo:"Dongo",dop:"Lukpa",doq:"Dominican Sign Language",dor:"Dori'o",dos:"Dogos\xE9",dot:"Dass",dov:"Dombe",dow:"Doyayo",dox:"Bussa",doy:"Dompo",doz:"Dorze",dpp:"Papar",drb:"Dair",drc:"Minderico",drd:"Darmiya",dre:"Dolpo",drg:"Rungus",dri:"C'Lela",drl:"Paakantyi",drn:"West Damar",dro:"Daro-Matu Melanau",drq:"Dura",drr:"Dororo",drs:"Gedeo",drt:"Drents",dru:"Rukai",dry:"Darai",dsb:"Lower Sorbian",dse:"Dutch Sign Language",dsh:"Daasanach",dsi:"Disa",dsl:"Danish Sign Language",dsn:"Dusner",dso:"Desiya",dsq:"Tadaksahak",dta:"Daur",dtb:"Labuk-Kinabatangan Kadazan",dtd:"Ditidaht",dth:"Adithinngithigh",dti:"Ana Tinga Dogon",dtk:"Tene Kan Dogon",dtm:"Tomo Kan Dogon",dtn:"Daats\u02BCi\u0301in",dto:"Tommo So Dogon",dtp:"Kadazan Dusun",dtr:"Lotud",dts:"Toro So Dogon",dtt:"Toro Tegu Dogon",dtu:"Tebul Ure Dogon",dty:"Dotyali",dua:"Duala",dub:"Dubli",duc:"Duna",dud:"Hun-Saare",due:"Umiray Dumaget Agta",duf:"Dumbea",dug:"Duruma",duh:"Dungra Bhil",dui:"Dumun",duk:"Uyajitaya",dul:"Alabat Island Agta",dum:"Middle Dutch (ca. 1050-1350)",dun:"Dusun Deyah",duo:"Dupaninan Agta",dup:"Duano",duq:"Dusun Malang",dur:"Dii",dus:"Dumi",duu:"Drung",duv:"Duvle",duw:"Dusun Witu",dux:"Duungooma",duy:"Dicamay Agta",duz:"Duli-Gey",dva:"Duau",dwa:"Diri",dwr:"Dawro",dws:"Dutton World Speedwords",dwu:"Dhuwal",dww:"Dawawa",dwy:"Dhuwaya",dya:"Dyan",dyb:"Dyaberdyaber",dyd:"Dyugun",dyg:"Villa Viciosa Agta",dyi:"Djimini Senoufo",dym:"Yanda Dom Dogon",dyn:"Dyangadi",dyo:"Jola-Fonyi",dyu:"Dyula",dyy:"Dyaabugay",dza:"Tunzu",dze:"Djiwarli",dzg:"Dazaga",dzl:"Dzalakha",dzn:"Dzando",dzo:"Dzongkha",eaa:"Karenggapa",ebg:"Ebughu",ebk:"Eastern Bontok",ebo:"Teke-Ebo",ebr:"Ebri\xE9",ebu:"Embu",ecr:"Eteocretan",ecs:"Ecuadorian Sign Language",ecy:"Eteocypriot",eee:"E",efa:"Efai",efe:"Efe",efi:"Efik",ega:"Ega",egl:"Emilian",ego:"Eggon",egy:"Egyptian (Ancient)",ehu:"Ehueun",eip:"Eipomek",eit:"Eitiep",eiv:"Askopan",eja:"Ejamat",eka:"Ekajuk",ekc:"Eastern Karnic",eke:"Ekit",ekg:"Ekari",eki:"Eki",ekk:"Standard Estonian",ekl:"Kol (Bangladesh)",ekm:"Elip",eko:"Koti",ekp:"Ekpeye",ekr:"Yace",eky:"Eastern Kayah",ele:"Elepi",elh:"El Hugeirat",eli:"Nding",elk:"Elkei",ell:"Modern Greek (1453-)",elm:"Eleme",elo:"El Molo",elu:"Elu",elx:"Elamite",ema:"Emai-Iuleha-Ora",emb:"Embaloh",eme:"Emerillon",emg:"Eastern Meohang",emi:"Mussau-Emira",emk:"Eastern Maninkakan",emm:"Mamulique",emn:"Eman",emp:"Northern Ember\xE1",ems:"Pacific Gulf Yupik",emu:"Eastern Muria",emw:"Emplawas",emx:"Erromintxela",emy:"Epigraphic Mayan",ena:"Apali",enb:"Markweeta",enc:"En",end:"Ende",enf:"Forest Enets",eng:"English",enh:"Tundra Enets",enl:"Enlhet",enm:"Middle English (1100-1500)",enn:"Engenni",eno:"Enggano",enq:"Enga",enr:"Emumu",enu:"Enu",env:"Enwan (Edu State)",enw:"Enwan (Akwa Ibom State)",enx:"Enxet",eot:"Beti (C\xF4te d'Ivoire)",epi:"Epie",epo:"Esperanto",era:"Eravallan",erg:"Sie",erh:"Eruwa",eri:"Ogea",erk:"South Efate",ero:"Horpa",err:"Erre",ers:"Ersu",ert:"Eritai",erw:"Erokwanas",ese:"Ese Ejja",esg:"Aheri Gondi",esh:"Eshtehardi",esi:"North Alaskan Inupiatun",esk:"Northwest Alaska Inupiatun",esl:"Egypt Sign Language",esm:"Esuma",esn:"Salvadoran Sign Language",eso:"Estonian Sign Language",esq:"Esselen",ess:"Central Siberian Yupik",est:"Estonian",esu:"Central Yupik",esy:"Eskayan",etb:"Etebi",etc:"Etchemin",eth:"Ethiopian Sign Language",etn:"Eton (Vanuatu)",eto:"Eton (Cameroon)",etr:"Edolo",ets:"Yekhee",ett:"Etruscan",etu:"Ejagham",etx:"Eten",etz:"Semimi",eus:"Basque",eve:"Even",evh:"Uvbie",evn:"Evenki",ewe:"Ewe",ewo:"Ewondo",ext:"Extremaduran",eya:"Eyak",eyo:"Keiyo",eza:"Ezaa",eze:"Uzekwe",faa:"Fasu",fab:"Fa d'Ambu",fad:"Wagi",faf:"Fagani",fag:"Finongan",fah:"Baissa Fali",fai:"Faiwol",faj:"Faita",fak:"Fang (Cameroon)",fal:"South Fali",fam:"Fam",fan:"Fang (Equatorial Guinea)",fao:"Faroese",fap:"Palor",far:"Fataleka",fas:"Persian",fat:"Fanti",fau:"Fayu",fax:"Fala",fay:"Southwestern Fars",faz:"Northwestern Fars",fbl:"West Albay Bikol",fcs:"Quebec Sign Language",fer:"Feroge",ffi:"Foia Foia",ffm:"Maasina Fulfulde",fgr:"Fongoro",fia:"Nobiin",fie:"Fyer",fij:"Fijian",fil:"Filipino",fin:"Finnish",fip:"Fipa",fir:"Firan",fit:"Tornedalen Finnish",fiw:"Fiwaga",fkk:"Kirya-Konz\u0259l",fkv:"Kven Finnish",fla:"Kalispel-Pend d'Oreille",flh:"Foau",fli:"Fali",fll:"North Fali",fln:"Flinders Island",flr:"Fuliiru",fly:"Flaaitaal",fmp:"Fe'fe'",fmu:"Far Western Muria",fnb:"Fanbak",fng:"Fanagalo",fni:"Fania",fod:"Foodo",foi:"Foi",fom:"Foma",fon:"Fon",for:"Fore",fos:"Siraya",fpe:"Fernando Po Creole English",fqs:"Fas",fra:"French",frc:"Cajun French",frd:"Fordata",frk:"Frankish",frm:"Middle French (ca. 1400-1600)",fro:"Old French (842-ca. 1400)",frp:"Arpitan",frq:"Forak",frr:"Northern Frisian",frs:"Eastern Frisian",frt:"Fortsenal",fry:"Western Frisian",fse:"Finnish Sign Language",fsl:"French Sign Language",fss:"Finland-Swedish Sign Language",fub:"Adamawa Fulfulde",fuc:"Pulaar",fud:"East Futuna",fue:"Borgu Fulfulde",fuf:"Pular",fuh:"Western Niger Fulfulde",fui:"Bagirmi Fulfulde",fuj:"Ko",ful:"Fulah",fum:"Fum",fun:"Fulni\xF4",fuq:"Central-Eastern Niger Fulfulde",fur:"Friulian",fut:"Futuna-Aniwa",fuu:"Furu",fuv:"Nigerian Fulfulde",fuy:"Fuyug",fvr:"Fur",fwa:"Fw\xE2i",fwe:"Fwe",gaa:"Ga",gab:"Gabri",gac:"Mixed Great Andamanese",gad:"Gaddang",gae:"Guarequena",gaf:"Gende",gag:"Gagauz",gah:"Alekano",gai:"Borei",gaj:"Gadsup",gak:"Gamkonora",gal:"Galolen",gam:"Kandawo",gan:"Gan Chinese",gao:"Gants",gap:"Gal",gaq:"Gata'",gar:"Galeya",gas:"Adiwasi Garasia",gat:"Kenati",gau:"Mudhili Gadaba",gaw:"Nobonob",gax:"Borana-Arsi-Guji Oromo",gay:"Gayo",gaz:"West Central Oromo",gba:"Gbaya (Central African Republic)",gbb:"Kaytetye",gbd:"Karadjeri",gbe:"Niksek",gbf:"Gaikundi",gbg:"Gbanziri",gbh:"Defi Gbe",gbi:"Galela",gbj:"Bodo Gadaba",gbk:"Gaddi",gbl:"Gamit",gbm:"Garhwali",gbn:"Mo'da",gbo:"Northern Grebo",gbp:"Gbaya-Bossangoa",gbq:"Gbaya-Bozoum",gbr:"Gbagyi",gbs:"Gbesi Gbe",gbu:"Gagadu",gbv:"Gbanu",gbw:"Gabi-Gabi",gbx:"Eastern Xwla Gbe",gby:"Gbari",gbz:"Zoroastrian Dari",gcc:"Mali",gcd:"Ganggalida",gce:"Galice",gcf:"Guadeloupean Creole French",gcl:"Grenadian Creole English",gcn:"Gaina",gcr:"Guianese Creole French",gct:"Colonia Tovar German",gda:"Gade Lohar",gdb:"Pottangi Ollar Gadaba",gdc:"Gugu Badhun",gdd:"Gedaged",gde:"Gude",gdf:"Guduf-Gava",gdg:"Ga'dang",gdh:"Gadjerawang",gdi:"Gundi",gdj:"Gurdjar",gdk:"Gadang",gdl:"Dirasha",gdm:"Laal",gdn:"Umanakaina",gdo:"Ghodoberi",gdq:"Mehri",gdr:"Wipi",gds:"Ghandruk Sign Language",gdt:"Kungardutyi",gdu:"Gudu",gdx:"Godwari",gea:"Geruma",geb:"Kire",gec:"Gboloo Grebo",ged:"Gade",geg:"Gengle",geh:"Hutterite German",gei:"Gebe",gej:"Gen",gek:"Ywom",gel:"ut-Ma'in",geq:"Geme",ges:"Geser-Gorom",gev:"Eviya",gew:"Gera",gex:"Garre",gey:"Enya",gez:"Geez",gfk:"Patpatar",gft:"Gafat",gga:"Gao",ggb:"Gbii",ggd:"Gugadj",gge:"Guragone",ggg:"Gurgula",ggk:"Kungarakany",ggl:"Ganglau",ggt:"Gitua",ggu:"Gagu",ggw:"Gogodala",gha:"Ghadam\xE8s",ghc:"Hiberno-Scottish Gaelic",ghe:"Southern Ghale",ghh:"Northern Ghale",ghk:"Geko Karen",ghl:"Ghulfan",ghn:"Ghanongga",gho:"Ghomara",ghr:"Ghera",ghs:"Guhu-Samane",ght:"Kuke",gia:"Kitja",gib:"Gibanawa",gic:"Gail",gid:"Gidar",gie:"Ga\u0253ogbo",gig:"Goaria",gih:"Githabul",gil:"Gilbertese",gim:"Gimi (Eastern Highlands)",gin:"Hinukh",gip:"Gimi (West New Britain)",giq:"Green Gelao",gir:"Red Gelao",gis:"North Giziga",git:"Gitxsan",giu:"Mulao",giw:"White Gelao",gix:"Gilima",giy:"Giyug",giz:"South Giziga",gji:"Geji",gjk:"Kachi Koli",gjm:"Gunditjmara",gjn:"Gonja",gjr:"Gurindji Kriol",gju:"Gujari",gka:"Guya",gke:"Ndai",gkn:"Gokana",gko:"Kok-Nar",gkp:"Guinea Kpelle",gku:"\u01C2Ungkue",gla:"Scottish Gaelic",glc:"Bon Gula",gld:"Nanai",gle:"Irish",glg:"Galician",glh:"Northwest Pashai",gli:"Guliguli",glj:"Gula Iro",glk:"Gilaki",gll:"Garlali",glo:"Galambu",glr:"Glaro-Twabo",glu:"Gula (Chad)",glv:"Manx",glw:"Glavda",gly:"Gule",gma:"Gambera",gmb:"Gula'alaa",gmd:"M\xE1ghd\xEC",gmg:"Mag\u0268yi",gmh:"Middle High German (ca. 1050-1500)",gml:"Middle Low German",gmm:"Gbaya-Mbodomo",gmn:"Gimnime",gmu:"Gumalu",gmv:"Gamo",gmx:"Magoma",gmy:"Mycenaean Greek",gmz:"Mgbolizhia",gna:"Kaansa",gnb:"Gangte",gnc:"Guanche",gnd:"Zulgo-Gemzek",gne:"Ganang",gng:"Ngangam",gnh:"Lere",gni:"Gooniyandi",gnk:"//Gana",gnl:"Gangulu",gnm:"Ginuman",gnn:"Gumatj",gno:"Northern Gondi",gnq:"Gana",gnr:"Gureng Gureng",gnt:"Guntai",gnu:"Gnau",gnw:"Western Bolivian Guaran\xED",gnz:"Ganzi",goa:"Guro",gob:"Playero",goc:"Gorakor",god:"Godi\xE9",goe:"Gongduk",gof:"Gofa",gog:"Gogo",goh:"Old High German (ca. 750-1050)",goi:"Gobasi",goj:"Gowlan",gok:"Gowli",gol:"Gola",gom:"Goan Konkani",gon:"Gondi",goo:"Gone Dau",gop:"Yeretuar",goq:"Gorap",gor:"Gorontalo",gos:"Gronings",got:"Gothic",gou:"Gavar",gow:"Gorowa",gox:"Gobu",goy:"Goundo",goz:"Gozarkhani",gpa:"Gupa-Abawa",gpe:"Ghanaian Pidgin English",gpn:"Taiap",gqa:"Ga'anda",gqi:"Guiqiong",gqn:"Guana (Brazil)",gqr:"Gor",gqu:"Qau",gra:"Rajput Garasia",grb:"Grebo",grc:"Ancient Greek (to 1453)",grd:"Guruntum-Mbaaru",grg:"Madi",grh:"Gbiri-Niragu",gri:"Ghari",grj:"Southern Grebo",grm:"Kota Marudu Talantang",grn:"Guarani",gro:"Groma",grq:"Gorovu",grr:"Taznatit",grs:"Gresi",grt:"Garo",gru:"Kistane",grv:"Central Grebo",grw:"Gweda",grx:"Guriaso",gry:"Barclayville Grebo",grz:"Guramalum",gse:"Ghanaian Sign Language",gsg:"German Sign Language",gsl:"Gusilay",gsm:"Guatemalan Sign Language",gsn:"Nema",gso:"Southwest Gbaya",gsp:"Wasembo",gss:"Greek Sign Language",gsw:"Swiss German",gta:"Guat\xF3",gtu:"Aghu-Tharnggala",gua:"Shiki",gub:"Guajaj\xE1ra",guc:"Wayuu",gud:"Yocobou\xE9 Dida",gue:"Gurinji",guf:"Gupapuyngu",gug:"Paraguayan Guaran\xED",guh:"Guahibo",gui:"Eastern Bolivian Guaran\xED",guj:"Gujarati",guk:"Gumuz",gul:"Sea Island Creole English",gum:"Guambiano",gun:"Mby\xE1 Guaran\xED",guo:"Guayabero",gup:"Gunwinggu",guq:"Ach\xE9",gur:"Farefare",gus:"Guinean Sign Language",gut:"Mal\xE9ku Ja\xEDka",guu:"Yanomam\xF6",guw:"Gun",gux:"Gourmanch\xE9ma",guz:"Gusii",gva:"Guana (Paraguay)",gvc:"Guanano",gve:"Duwet",gvf:"Golin",gvj:"Guaj\xE1",gvl:"Gulay",gvm:"Gurmana",gvn:"Kuku-Yalanji",gvo:"Gavi\xE3o Do Jiparan\xE1",gvp:"Par\xE1 Gavi\xE3o",gvr:"Gurung",gvs:"Gumawana",gvy:"Guyani",gwa:"Mbato",gwb:"Gwa",gwc:"Kalami",gwd:"Gawwada",gwe:"Gweno",gwf:"Gowro",gwg:"Moo",gwi:"Gwich\u02BCin",gwj:"/Gwi",gwm:"Awngthim",gwn:"Gwandara",gwr:"Gwere",gwt:"Gawar-Bati",gwu:"Guwamu",gww:"Kwini",gwx:"Gua",gxx:"W\xE8 Southern",gya:"Northwest Gbaya",gyb:"Garus",gyd:"Kayardild",gye:"Gyem",gyf:"Gungabula",gyg:"Gbayi",gyi:"Gyele",gyl:"Gayil",gym:"Ng\xE4bere",gyn:"Guyanese Creole English",gyr:"Guarayu",gyy:"Gunya",gza:"Ganza",gzi:"Gazi",gzn:"Gane",haa:"Han",hab:"Hanoi Sign Language",hac:"Gurani",had:"Hatam",hae:"Eastern Oromo",haf:"Haiphong Sign Language",hag:"Hanga",hah:"Hahon",hai:"Haida",haj:"Hajong",hak:"Hakka Chinese",hal:"Halang",ham:"Hewa",han:"Hangaza",hao:"Hak\xF6",hap:"Hupla",haq:"Ha",har:"Harari",has:"Haisla",hat:"Haitian",hau:"Hausa",hav:"Havu",haw:"Hawaiian",hax:"Southern Haida",hay:"Haya",haz:"Hazaragi",hba:"Hamba",hbb:"Huba",hbn:"Heiban",hbo:"Ancient Hebrew",hbs:"Serbo-Croatian",hbu:"Habu",hca:"Andaman Creole Hindi",hch:"Huichol",hdn:"Northern Haida",hds:"Honduras Sign Language",hdy:"Hadiyya",hea:"Northern Qiandong Miao",heb:"Hebrew",hed:"Herd\xE9",heg:"Helong",heh:"Hehe",hei:"Heiltsuk",hem:"Hemba",her:"Herero",hgm:"Hai//om",hgw:"Haigwai",hhi:"Hoia Hoia",hhr:"Kerak",hhy:"Hoyahoya",hia:"Lamang",hib:"Hibito",hid:"Hidatsa",hif:"Fiji Hindi",hig:"Kamwe",hih:"Pamosu",hii:"Hinduri",hij:"Hijuk",hik:"Seit-Kaitetu",hil:"Hiligaynon",hin:"Hindi",hio:"Tsoa",hir:"Himarim\xE3",hit:"Hittite",hiw:"Hiw",hix:"Hixkary\xE1na",hji:"Haji",hka:"Kahe",hke:"Hunde",hkk:"Hunjara-Kaina Ke",hks:"Hong Kong Sign Language",hla:"Halia",hlb:"Halbi",hld:"Halang Doan",hle:"Hlersu",hlt:"Matu Chin",hlu:"Hieroglyphic Luwian",hma:"Southern Mashan Hmong",hmb:"Humburi Senni Songhay",hmc:"Central Huishui Hmong",hmd:"Large Flowery Miao",hme:"Eastern Huishui Hmong",hmf:"Hmong Don",hmg:"Southwestern Guiyang Hmong",hmh:"Southwestern Huishui Hmong",hmi:"Northern Huishui Hmong",hmj:"Ge",hmk:"Maek",hml:"Luopohe Hmong",hmm:"Central Mashan Hmong",hmn:"Hmong",hmo:"Hiri Motu",hmp:"Northern Mashan Hmong",hmq:"Eastern Qiandong Miao",hmr:"Hmar",hms:"Southern Qiandong Miao",hmt:"Hamtai",hmu:"Hamap",hmv:"Hmong D\xF4",hmw:"Western Mashan Hmong",hmy:"Southern Guiyang Hmong",hmz:"Hmong Shua",hna:"Mina (Cameroon)",hnd:"Southern Hindko",hne:"Chhattisgarhi",hnh:"//Ani",hni:"Hani",hnj:"Hmong Njua",hnn:"Hanunoo",hno:"Northern Hindko",hns:"Caribbean Hindustani",hnu:"Hung",hoa:"Hoava",hob:"Mari (Madang Province)",hoc:"Ho",hod:"Holma",hoe:"Horom",hoh:"Hoby\xF3t",hoi:"Holikachuk",hoj:"Hadothi",hol:"Holu",hom:"Homa",hoo:"Holoholo",hop:"Hopi",hor:"Horo",hos:"Ho Chi Minh City Sign Language",hot:"Hote",hov:"Hovongan",how:"Honi",hoy:"Holiya",hoz:"Hozo",hpo:"Hpon",hps:"Hawai'i Sign Language (HSL)",hra:"Hrangkhol",hrc:"Niwer Mil",hre:"Hre",hrk:"Haruku",hrm:"Horned Miao",hro:"Haroi",hrp:"Nhirrpi",hrt:"H\xE9rtevin",hru:"Hruso",hrv:"Croatian",hrw:"Warwar Feni",hrx:"Hunsrik",hrz:"Harzani",hsb:"Upper Sorbian",hsh:"Hungarian Sign Language",hsl:"Hausa Sign Language",hsn:"Xiang Chinese",hss:"Harsusi",hti:"Hoti",hto:"Minica Huitoto",hts:"Hadza",htu:"Hitu",htx:"Middle Hittite",hub:"Huambisa",huc:"Err:510",hud:"Huaulu",hue:"San Francisco Del Mar Huave",huf:"Humene",hug:"Huachipaeri",huh:"Huilliche",hui:"Huli",huj:"Northern Guiyang Hmong",huk:"Hulung",hul:"Hula",hum:"Hungana",hun:"Hungarian",huo:"Hu",hup:"Hupa",huq:"Tsat",hur:"Halkomelem",hus:"Huastec",hut:"Humla",huu:"Murui Huitoto",huv:"San Mateo Del Mar Huave",huw:"Hukumina",hux:"N\xFCpode Huitoto",huy:"Hulaul\xE1",huz:"Hunzib",hvc:"Haitian Vodoun Culture Language",hve:"San Dionisio Del Mar Huave",hvk:"Haveke",hvn:"Sabu",hvv:"Santa Mar\xEDa Del Mar Huave",hwa:"Wan\xE9",hwc:"Hawai'i Creole English",hwo:"Hwana",hya:"Hya",hye:"Armenian",iai:"Iaai",ian:"Iatmul",iar:"Purari",iba:"Iban",ibb:"Ibibio",ibd:"Iwaidja",ibe:"Akpes",ibg:"Ibanag",ibh:"Bih",ibl:"Ibaloi",ibm:"Agoi",ibn:"Ibino",ibo:"Igbo",ibr:"Ibuoro",ibu:"Ibu",iby:"Ibani",ica:"Ede Ica",ich:"Etkywan",icl:"Icelandic Sign Language",icr:"Islander Creole English",ida:"Idakho-Isukha-Tiriki",idb:"Indo-Portuguese",idc:"Idon",idd:"Ede Idaca",ide:"Idere",idi:"Idi",ido:"Ido",idr:"Indri",ids:"Idesa",idt:"Idat\xE9",idu:"Idoma",ifa:"Amganad Ifugao",ifb:"Batad Ifugao",ife:"If\xE8",iff:"Ifo",ifk:"Tuwali Ifugao",ifm:"Teke-Fuumu",ifu:"Mayoyao Ifugao",ify:"Keley-I Kallahan",igb:"Ebira",ige:"Igede",igg:"Igana",igl:"Igala",igm:"Kanggape",ign:"Ignaciano",igo:"Isebe",igs:"Interglossa",igw:"Igwe",ihb:"Iha Based Pidgin",ihi:"Ihievbe",ihp:"Iha",ihw:"Bidhawal",iii:"Sichuan Yi",iin:"Thiin",ijc:"Izon",ije:"Biseni",ijj:"Ede Ije",ijn:"Kalabari",ijs:"Southeast Ijo",ike:"Eastern Canadian Inuktitut",iki:"Iko",ikk:"Ika",ikl:"Ikulu",iko:"Olulumo-Ikom",ikp:"Ikpeshi",ikr:"Ikaranggal",iks:"Inuit Sign Language",ikt:"Inuinnaqtun",iku:"Inuktitut",ikv:"Iku-Gora-Ankwa",ikw:"Ikwere",ikx:"Ik",ikz:"Ikizu",ila:"Ile Ape",ilb:"Ila",ile:"Interlingue",ilg:"Garig-Ilgar",ili:"Ili Turki",ilk:"Ilongot",ilm:"Iranun (Malaysia)",ilo:"Iloko",ilp:"Iranun (Philippines)",ils:"International Sign",ilu:"Ili'uun",ilv:"Ilue",ima:"Mala Malasar",imi:"Anamgura",iml:"Miluk",imn:"Imonda",imo:"Imbongu",imr:"Imroing",ims:"Marsian",imy:"Milyan",ina:"Interlingua (International Auxiliary Language Association)",inb:"Inga",ind:"Indonesian",ing:"Degexit'an",inh:"Ingush",inj:"Jungle Inga",inl:"Indonesian Sign Language",inm:"Minaean",inn:"Isinai",ino:"Inoke-Yate",inp:"I\xF1apari",ins:"Indian Sign Language",int:"Intha",inz:"Inese\xF1o",ior:"Inor",iou:"Tuma-Irumu",iow:"Iowa-Oto",ipi:"Ipili",ipk:"Inupiaq",ipo:"Ipiko",iqu:"Iquito",iqw:"Ikwo",ire:"Iresim",irh:"Irarutu",iri:"Irigwe",irk:"Iraqw",irn:"Ir\xE1ntxe",irr:"Ir",iru:"Irula",irx:"Kamberau",iry:"Iraya",isa:"Isabi",isc:"Isconahua",isd:"Isnag",ise:"Italian Sign Language",isg:"Irish Sign Language",ish:"Esan",isi:"Nkem-Nkum",isk:"Ishkashimi",isl:"Icelandic",ism:"Masimasi",isn:"Isanzu",iso:"Isoko",isr:"Israeli Sign Language",ist:"Istriot",isu:"Isu (Menchum Division)",ita:"Italian",itb:"Binongan Itneg",itd:"Southern Tidung",ite:"Itene",iti:"Inlaod Itneg",itk:"Judeo-Italian",itl:"Itelmen",itm:"Itu Mbon Uzo",ito:"Itonama",itr:"Iteri",its:"Isekiri",itt:"Maeng Itneg",itv:"Itawit",itw:"Ito",itx:"Itik",ity:"Moyadan Itneg",itz:"Itz\xE1",ium:"Iu Mien",ivb:"Ibatan",ivv:"Ivatan",iwk:"I-Wak",iwm:"Iwam",iwo:"Iwur",iws:"Sepik Iwam",ixc:"Ixcatec",ixl:"Ixil",iya:"Iyayu",iyo:"Mesaka",iyx:"Yaka (Congo)",izh:"Ingrian",izr:"Izere",izz:"Izii",jaa:"Jamamad\xED",jab:"Hyam",jac:"Popti'",jad:"Jahanka",jae:"Yabem",jaf:"Jara",jah:"Jah Hut",jaj:"Zazao",jak:"Jakun",jal:"Yalahatan",jam:"Jamaican Creole English",jan:"Jandai",jao:"Yanyuwa",jaq:"Yaqay",jas:"New Caledonian Javanese",jat:"Jakati",jau:"Yaur",jav:"Javanese",jax:"Jambi Malay",jay:"Yan-nhangu",jaz:"Jawe",jbe:"Judeo-Berber",jbi:"Badjiri",jbj:"Arandai",jbk:"Barikewa",jbn:"Nafusi",jbo:"Lojban",jbr:"Jofotek-Bromnya",jbt:"Jabut\xED",jbu:"Jukun Takum",jbw:"Yawijibaya",jcs:"Jamaican Country Sign Language",jct:"Krymchak",jda:"Jad",jdg:"Jadgali",jdt:"Judeo-Tat",jeb:"Jebero",jee:"Jerung",jeh:"Jeh",jei:"Yei",jek:"Jeri Kuo",jel:"Yelmek",jen:"Dza",jer:"Jere",jet:"Manem",jeu:"Jonkor Bourmataguil",jgb:"Ngbee",jge:"Judeo-Georgian",jgk:"Gwak",jgo:"Ngomba",jhi:"Jehai",jhs:"Jhankot Sign Language",jia:"Jina",jib:"Jibu",jic:"Tol",jid:"Bu",jie:"Jilbe",jig:"Djingili",jih:"sTodsde",jii:"Jiiddu",jil:"Jilim",jim:"Jimi (Cameroon)",jio:"Jiamao",jiq:"Guanyinqiao",jit:"Jita",jiu:"Youle Jinuo",jiv:"Shuar",jiy:"Buyuan Jinuo",jje:"Jejueo",jjr:"Bankal",jka:"Kaera",jkm:"Mobwa Karen",jko:"Kubo",jkp:"Paku Karen",jkr:"Koro (India)",jku:"Labir",jle:"Ngile",jls:"Jamaican Sign Language",jma:"Dima",jmb:"Zumbun",jmc:"Machame",jmd:"Yamdena",jmi:"Jimi (Nigeria)",jml:"Jumli",jmn:"Makuri Naga",jmr:"Kamara",jms:"Mashi (Nigeria)",jmw:"Mouwase",jmx:"Western Juxtlahuaca Mixtec",jna:"Jangshung",jnd:"Jandavra",jng:"Yangman",jni:"Janji",jnj:"Yemsa",jnl:"Rawat",jns:"Jaunsari",job:"Joba",jod:"Wojenaka",jog:"Jogi",jor:"Jor\xE1",jos:"Jordanian Sign Language",jow:"Jowulu",jpa:"Jewish Palestinian Aramaic",jpn:"Japanese",jpr:"Judeo-Persian",jqr:"Jaqaru",jra:"Jarai",jrb:"Judeo-Arabic",jrr:"Jiru",jrt:"Jorto",jru:"Japrer\xEDa",jsl:"Japanese Sign Language",jua:"J\xFAma",jub:"Wannu",juc:"Jurchen",jud:"Worodougou",juh:"H\xF5ne",jui:"Ngadjuri",juk:"Wapan",jul:"Jirel",jum:"Jumjum",jun:"Juang",juo:"Jiba",jup:"Hupd\xEB",jur:"Jur\xFAna",jus:"Jumla Sign Language",jut:"Jutish",juu:"Ju",juw:"W\xE3pha",juy:"Juray",jvd:"Javindo",jvn:"Caribbean Javanese",jwi:"Jwira-Pepesa",jya:"Jiarong",jye:"Judeo-Yemeni Arabic",jyy:"Jaya",kaa:"Kara-Kalpak",kab:"Kabyle",kac:"Kachin",kad:"Adara",kae:"Ketangalan",kaf:"Katso",kag:"Kajaman",kah:"Kara (Central African Republic)",kai:"Karekare",kaj:"Jju",kak:"Kalanguya",kal:"Kalaallisut",kam:"Kamba (Kenya)",kan:"Kannada",kao:"Xaasongaxango",kap:"Bezhta",kaq:"Capanahua",kas:"Kashmiri",kat:"Georgian",kau:"Kanuri",kav:"Katuk\xEDna",kaw:"Kawi",kax:"Kao",kay:"Kamayur\xE1",kaz:"Kazakh",kba:"Kalarko",kbb:"Kaxui\xE2na",kbc:"Kadiw\xE9u",kbd:"Kabardian",kbe:"Kanju",kbg:"Khamba",kbh:"Cams\xE1",kbi:"Kaptiau",kbj:"Kari",kbk:"Grass Koiari",kbl:"Kanembu",kbm:"Iwal",kbn:"Kare (Central African Republic)",kbo:"Keliko",kbp:"Kabiy\xE8",kbq:"Kamano",kbr:"Kafa",kbs:"Kande",kbt:"Abadi",kbu:"Kabutra",kbv:"Dera (Indonesia)",kbw:"Kaiep",kbx:"Ap Ma",kby:"Manga Kanuri",kbz:"Duhwa",kca:"Khanty",kcb:"Kawacha",kcc:"Lubila",kcd:"Ngk\xE2lmpw Kanum",kce:"Kaivi",kcf:"Ukaan",kcg:"Tyap",kch:"Vono",kci:"Kamantan",kcj:"Kobiana",kck:"Kalanga",kcl:"Kela (Papua New Guinea)",kcm:"Gula (Central African Republic)",kcn:"Nubi",kco:"Kinalakna",kcp:"Kanga",kcq:"Kamo",kcr:"Katla",kcs:"Koenoem",kct:"Kaian",kcu:"Kami (Tanzania)",kcv:"Kete",kcw:"Kabwari",kcx:"Kachama-Ganjule",kcy:"Korandje",kcz:"Konongo",kda:"Worimi",kdc:"Kutu",kdd:"Yankunytjatjara",kde:"Makonde",kdf:"Mamusi",kdg:"Seba",kdh:"Tem",kdi:"Kumam",kdj:"Karamojong",kdk:"Num\xE8\xE8",kdl:"Tsikimba",kdm:"Kagoma",kdn:"Kunda",kdp:"Kaningdon-Nindem",kdq:"Koch",kdr:"Karaim",kdt:"Kuy",kdu:"Kadaru",kdw:"Koneraw",kdx:"Kam",kdy:"Keder",kdz:"Kwaja",kea:"Kabuverdianu",keb:"K\xE9l\xE9",kec:"Keiga",ked:"Kerewe",kee:"Eastern Keres",kef:"Kpessi",keg:"Tese",keh:"Keak",kei:"Kei",kej:"Kadar",kek:"Kekch\xED",kel:"Kela (Democratic Republic of Congo)",kem:"Kemak",ken:"Kenyang",keo:"Kakwa",kep:"Kaikadi",keq:"Kamar",ker:"Kera",kes:"Kugbo",ket:"Ket",keu:"Akebu",kev:"Kanikkaran",kew:"West Kewa",kex:"Kukna",key:"Kupia",kez:"Kukele",kfa:"Kodava",kfb:"Northwestern Kolami",kfc:"Konda-Dora",kfd:"Korra Koraga",kfe:"Kota (India)",kff:"Koya",kfg:"Kudiya",kfh:"Kurichiya",kfi:"Kannada Kurumba",kfj:"Kemiehua",kfk:"Kinnauri",kfl:"Kung",kfm:"Khunsari",kfn:"Kuk",kfo:"Koro (C\xF4te d'Ivoire)",kfp:"Korwa",kfq:"Korku",kfr:"Kachhi",kfs:"Bilaspuri",kft:"Kanjari",kfu:"Katkari",kfv:"Kurmukar",kfw:"Kharam Naga",kfx:"Kullu Pahari",kfy:"Kumaoni",kfz:"Koromf\xE9",kga:"Koyaga",kgb:"Kawe",kge:"Komering",kgf:"Kube",kgg:"Kusunda",kgi:"Selangor Sign Language",kgj:"Gamale Kham",kgk:"Kaiw\xE1",kgl:"Kunggari",kgm:"Karip\xFAna",kgn:"Karingani",kgo:"Krongo",kgp:"Kaingang",kgq:"Kamoro",kgr:"Abun",kgs:"Kumbainggar",kgt:"Somyev",kgu:"Kobol",kgv:"Karas",kgw:"Karon Dori",kgx:"Kamaru",kgy:"Kyerung",kha:"Khasi",khb:"L\xFC",khc:"Tukang Besi North",khd:"B\xE4di Kanum",khe:"Korowai",khf:"Khuen",khg:"Khams Tibetan",khh:"Kehu",khj:"Kuturmi",khk:"Halh Mongolian",khl:"Lusi",khm:"Central Khmer",khn:"Khandesi",kho:"Khotanese",khp:"Kapori",khq:"Koyra Chiini Songhay",khr:"Kharia",khs:"Kasua",kht:"Khamti",khu:"Nkhumbi",khv:"Khvarshi",khw:"Khowar",khx:"Kanu",khy:"Kele (Democratic Republic of Congo)",khz:"Keapara",kia:"Kim",kib:"Koalib",kic:"Kickapoo",kid:"Koshin",kie:"Kibet",kif:"Eastern Parbate Kham",kig:"Kimaama",kih:"Kilmeri",kii:"Kitsai",kij:"Kilivila",kik:"Kikuyu",kil:"Kariya",kim:"Karagas",kin:"Kinyarwanda",kio:"Kiowa",kip:"Sheshi Kham",kiq:"Kosadle",kir:"Kirghiz",kis:"Kis",kit:"Agob",kiu:"Kirmanjki (individual language)",kiv:"Kimbu",kiw:"Northeast Kiwai",kix:"Khiamniungan Naga",kiy:"Kirikiri",kiz:"Kisi",kja:"Mlap",kjb:"Q'anjob'al",kjc:"Coastal Konjo",kjd:"Southern Kiwai",kje:"Kisar",kjf:"Khalaj",kjg:"Khmu",kjh:"Khakas",kji:"Zabana",kjj:"Khinalugh",kjk:"Highland Konjo",kjl:"Western Parbate Kham",kjm:"Kh\xE1ng",kjn:"Kunjen",kjo:"Harijan Kinnauri",kjp:"Pwo Eastern Karen",kjq:"Western Keres",kjr:"Kurudu",kjs:"East Kewa",kjt:"Phrae Pwo Karen",kju:"Kashaya",kjv:"Kaikavian Literary Language",kjx:"Ramopa",kjy:"Erave",kjz:"Bumthangkha",kka:"Kakanda",kkb:"Kwerisa",kkc:"Odoodee",kkd:"Kinuku",kke:"Kakabe",kkf:"Kalaktang Monpa",kkg:"Mabaka Valley Kalinga",kkh:"Kh\xFCn",kki:"Kagulu",kkj:"Kako",kkk:"Kokota",kkl:"Kosarek Yale",kkm:"Kiong",kkn:"Kon Keu",kko:"Karko",kkp:"Gugubera",kkq:"Kaiku",kkr:"Kir-Balar",kks:"Giiwo",kkt:"Koi",kku:"Tumi",kkv:"Kangean",kkw:"Teke-Kukuya",kkx:"Kohin",kky:"Guguyimidjir",kkz:"Kaska",kla:"Klamath-Modoc",klb:"Kiliwa",klc:"Kolbila",kld:"Gamilaraay",kle:"Kulung (Nepal)",klf:"Kendeje",klg:"Tagakaulo",klh:"Weliki",kli:"Kalumpang",klj:"Turkic Khalaj",klk:"Kono (Nigeria)",kll:"Kagan Kalagan",klm:"Migum",kln:"Kalenjin",klo:"Kapya",klp:"Kamasa",klq:"Rumu",klr:"Khaling",kls:"Kalasha",klt:"Nukna",klu:"Klao",klv:"Maskelynes",klw:"Tado",klx:"Koluwawa",kly:"Kalao",klz:"Kabola",kma:"Konni",kmb:"Kimbundu",kmc:"Southern Dong",kmd:"Majukayang Kalinga",kme:"Bakole",kmf:"Kare (Papua New Guinea)",kmg:"K\xE2te",kmh:"Kalam",kmi:"Kami (Nigeria)",kmj:"Kumarbhag Paharia",kmk:"Limos Kalinga",kml:"Tanudan Kalinga",kmm:"Kom (India)",kmn:"Awtuw",kmo:"Kwoma",kmp:"Gimme",kmq:"Kwama",kmr:"Northern Kurdish",kms:"Kamasau",kmt:"Kemtuik",kmu:"Kanite",kmv:"Karip\xFAna Creole French",kmw:"Komo (Democratic Republic of Congo)",kmx:"Waboda",kmy:"Koma",kmz:"Khorasani Turkish",kna:"Dera (Nigeria)",knb:"Lubuagan Kalinga",knc:"Central Kanuri",knd:"Konda",kne:"Kankanaey",knf:"Mankanya",kng:"Koongo",kni:"Kanufi",knj:"Western Kanjobal",knk:"Kuranko",knl:"Keninjal",knm:"Kanamar\xED",knn:"Konkani (individual language)",kno:"Kono (Sierra Leone)",knp:"Kwanja",knq:"Kintaq",knr:"Kaningra",kns:"Kensiu",knt:"Panoan Katuk\xEDna",knu:"Kono (Guinea)",knv:"Tabo",knw:"Kung-Ekoka",knx:"Kendayan",kny:"Kanyok",knz:"Kalams\xE9",koa:"Konomala",koc:"Kpati",kod:"Kodi",koe:"Kacipo-Balesi",kof:"Kubi",kog:"Cogui",koh:"Koyo",koi:"Komi-Permyak",kok:"Konkani (macrolanguage)",kol:"Kol (Papua New Guinea)",kom:"Komi",kon:"Kongo",koo:"Konzo",kop:"Waube",koq:"Kota (Gabon)",kor:"Korean",kos:"Kosraean",kot:"Lagwan",kou:"Koke",kov:"Kudu-Camo",kow:"Kugama",koy:"Koyukon",koz:"Korak",kpa:"Kutto",kpb:"Mullu Kurumba",kpc:"Curripaco",kpd:"Koba",kpe:"Kpelle",kpf:"Komba",kpg:"Kapingamarangi",kph:"Kplang",kpi:"Kofei",kpj:"Karaj\xE1",kpk:"Kpan",kpl:"Kpala",kpm:"Koho",kpn:"Kepkiriw\xE1t",kpo:"Ikposo",kpq:"Korupun-Sela",kpr:"Korafe-Yegha",kps:"Tehit",kpt:"Karata",kpu:"Kafoa",kpv:"Komi-Zyrian",kpw:"Kobon",kpx:"Mountain Koiali",kpy:"Koryak",kpz:"Kupsabiny",kqa:"Mum",kqb:"Kovai",kqc:"Doromu-Koki",kqd:"Koy Sanjaq Surat",kqe:"Kalagan",kqf:"Kakabai",kqg:"Khe",kqh:"Kisankasa",kqi:"Koitabu",kqj:"Koromira",kqk:"Kotafon Gbe",kql:"Kyenele",kqm:"Khisa",kqn:"Kaonde",kqo:"Eastern Krahn",kqp:"Kimr\xE9",kqq:"Krenak",kqr:"Kimaragang",kqs:"Northern Kissi",kqt:"Klias River Kadazan",kqu:"Seroa",kqv:"Okolod",kqw:"Kandas",kqx:"Mser",kqy:"Koorete",kqz:"Korana",kra:"Kumhali",krb:"Karkin",krc:"Karachay-Balkar",krd:"Kairui-Midiki",kre:"Panar\xE1",krf:"Koro (Vanuatu)",krh:"Kurama",kri:"Krio",krj:"Kinaray-A",krk:"Kerek",krl:"Karelian",krn:"Sapo",krp:"Korop",krr:"Krung",krs:"Gbaya (Sudan)",krt:"Tumari Kanuri",kru:"Kurukh",krv:"Kavet",krw:"Western Krahn",krx:"Karon",kry:"Kryts",krz:"Sota Kanum",ksa:"Shuwa-Zamani",ksb:"Shambala",ksc:"Southern Kalinga",ksd:"Kuanua",kse:"Kuni",ksf:"Bafia",ksg:"Kusaghe",ksh:"K\xF6lsch",ksi:"Krisa",ksj:"Uare",ksk:"Kansa",ksl:"Kumalu",ksm:"Kumba",ksn:"Kasiguranin",kso:"Kofa",ksp:"Kaba",ksq:"Kwaami",ksr:"Borong",kss:"Southern Kisi",kst:"Winy\xE9",ksu:"Khamyang",ksv:"Kusu",ksw:"S'gaw Karen",ksx:"Kedang",ksy:"Kharia Thar",ksz:"Kodaku",kta:"Katua",ktb:"Kambaata",ktc:"Kholok",ktd:"Kokata",kte:"Nubri",ktf:"Kwami",ktg:"Kalkutung",kth:"Karanga",kti:"North Muyu",ktj:"Plapo Krumen",ktk:"Kaniet",ktl:"Koroshi",ktm:"Kurti",ktn:"Kariti\xE2na",kto:"Kuot",ktp:"Kaduo",ktq:"Katabaga",kts:"South Muyu",ktt:"Ketum",ktu:"Kituba (Democratic Republic of Congo)",ktv:"Eastern Katu",ktw:"Kato",ktx:"Kaxarar\xED",kty:"Kango (Bas-U\xE9l\xE9 District)",ktz:"Ju/'hoan",kua:"Kuanyama",kub:"Kutep",kuc:"Kwinsu",kud:"'Auhelawa",kue:"Kuman (Papua New Guinea)",kuf:"Western Katu",kug:"Kupa",kuh:"Kushi",kui:"Kuik\xFAro-Kalap\xE1lo",kuj:"Kuria",kuk:"Kepo'",kul:"Kulere",kum:"Kumyk",kun:"Kunama",kuo:"Kumukio",kup:"Kunimaipa",kuq:"Karipuna",kur:"Kurdish",kus:"Kusaal",kut:"Kutenai",kuu:"Upper Kuskokwim",kuv:"Kur",kuw:"Kpagua",kux:"Kukatja",kuy:"Kuuku-Ya'u",kuz:"Kunza",kva:"Bagvalal",kvb:"Kubu",kvc:"Kove",kvd:"Kui (Indonesia)",kve:"Kalabakan",kvf:"Kabalai",kvg:"Kuni-Boazi",kvh:"Komodo",kvi:"Kwang",kvj:"Psikye",kvk:"Korean Sign Language",kvl:"Kayaw",kvm:"Kendem",kvn:"Border Kuna",kvo:"Dobel",kvp:"Kompane",kvq:"Geba Karen",kvr:"Kerinci",kvt:"Lahta Karen",kvu:"Yinbaw Karen",kvv:"Kola",kvw:"Wersing",kvx:"Parkari Koli",kvy:"Yintale Karen",kvz:"Tsakwambo",kwa:"D\xE2w",kwb:"Kwa",kwc:"Likwala",kwd:"Kwaio",kwe:"Kwerba",kwf:"Kwara'ae",kwg:"Sara Kaba Deme",kwh:"Kowiai",kwi:"Awa-Cuaiquer",kwj:"Kwanga",kwk:"Kwakiutl",kwl:"Kofyar",kwm:"Kwambi",kwn:"Kwangali",kwo:"Kwomtari",kwp:"Kodia",kwr:"Kwer",kws:"Kwese",kwt:"Kwesten",kwu:"Kwakum",kwv:"Sara Kaba N\xE1\xE0",kww:"Kwinti",kwx:"Khirwar",kwy:"San Salvador Kongo",kwz:"Kwadi",kxa:"Kairiru",kxb:"Krobu",kxc:"Konso",kxd:"Brunei",kxf:"Manumanaw Karen",kxh:"Karo (Ethiopia)",kxi:"Keningau Murut",kxj:"Kulfa",kxk:"Zayein Karen",kxl:"Nepali Kurux",kxm:"Northern Khmer",kxn:"Kanowit-Tanjong Melanau",kxo:"Kano\xE9",kxp:"Wadiyara Koli",kxq:"Sm\xE4rky Kanum",kxr:"Koro (Papua New Guinea)",kxs:"Kangjia",kxt:"Koiwat",kxu:"Kui (India)",kxv:"Kuvi",kxw:"Konai",kxx:"Likuba",kxy:"Kayong",kxz:"Kerewo",kya:"Kwaya",kyb:"Butbut Kalinga",kyc:"Kyaka",kyd:"Karey",kye:"Krache",kyf:"Kouya",kyg:"Keyagana",kyh:"Karok",kyi:"Kiput",kyj:"Karao",kyk:"Kamayo",kyl:"Kalapuya",kym:"Kpatili",kyn:"Northern Binukidnon",kyo:"Kelon",kyp:"Kang",kyq:"Kenga",kyr:"Kuru\xE1ya",kys:"Baram Kayan",kyt:"Kayagar",kyu:"Western Kayah",kyv:"Kayort",kyw:"Kudmali",kyx:"Rapoisi",kyy:"Kambaira",kyz:"Kayab\xED",kza:"Western Karaboro",kzb:"Kaibobo",kzc:"Bondoukou Kulango",kzd:"Kadai",kze:"Kosena",kzf:"Da'a Kaili",kzg:"Kikai",kzi:"Kelabit",kzk:"Kazukuru",kzl:"Kayeli",kzm:"Kais",kzn:"Kokola",kzo:"Kaningi",kzp:"Kaidipang",kzq:"Kaike",kzr:"Karang",kzs:"Sugut Dusun",kzu:"Kayupulau",kzv:"Komyandaret",kzw:"Karir\xED-Xoc\xF3",kzx:"Kamarian",kzy:"Kango (Tshopo District)",kzz:"Kalabra",laa:"Southern Subanen",lab:"Linear A",lac:"Lacandon",lad:"Ladino",lae:"Pattani",laf:"Lafofa",lag:"Langi",lah:"Lahnda",lai:"Lambya",laj:"Lango (Uganda)",lak:"Laka (Nigeria)",lal:"Lalia",lam:"Lamba",lan:"Laru",lao:"Lao",lap:"Laka (Chad)",laq:"Qabiao",lar:"Larteh",las:"Lama (Togo)",lat:"Latin",lau:"Laba",lav:"Latvian",law:"Lauje",lax:"Tiwa",lay:"Lama Bai",laz:"Aribwatsa",lba:"Lui",lbb:"Label",lbc:"Lakkia",lbe:"Lak",lbf:"Tinani",lbg:"Laopang",lbi:"La'bi",lbj:"Ladakhi",lbk:"Central Bontok",lbl:"Libon Bikol",lbm:"Lodhi",lbn:"Lamet",lbo:"Laven",lbq:"Wampar",lbr:"Lohorung",lbs:"Libyan Sign Language",lbt:"Lachi",lbu:"Labu",lbv:"Lavatbura-Lamusong",lbw:"Tolaki",lbx:"Lawangan",lby:"Lamu-Lamu",lbz:"Lardil",lcc:"Legenyem",lcd:"Lola",lce:"Loncong",lcf:"Lubu",lch:"Luchazi",lcl:"Lisela",lcm:"Tungag",lcp:"Western Lawa",lcq:"Luhu",lcs:"Lisabata-Nuniali",lda:"Kla-Dan",ldb:"Du\u0303ya",ldd:"Luri",ldg:"Lenyima",ldh:"Lamja-Dengsa-Tola",ldi:"Laari",ldj:"Lemoro",ldk:"Leelau",ldl:"Kaan",ldm:"Landoma",ldn:"L\xE1adan",ldo:"Loo",ldp:"Tso",ldq:"Lufu",lea:"Lega-Shabunda",leb:"Lala-Bisa",lec:"Leco",led:"Lendu",lee:"Ly\xE9l\xE9",lef:"Lelemi",leh:"Lenje",lei:"Lemio",lej:"Lengola",lek:"Leipon",lel:"Lele (Democratic Republic of Congo)",lem:"Nomaande",len:"Lenca",leo:"Leti (Cameroon)",lep:"Lepcha",leq:"Lembena",ler:"Lenkau",les:"Lese",let:"Lesing-Gelimi",leu:"Kara (Papua New Guinea)",lev:"Lamma",lew:"Ledo Kaili",lex:"Luang",ley:"Lemolang",lez:"Lezghian",lfa:"Lefa",lfn:"Lingua Franca Nova",lga:"Lungga",lgb:"Laghu",lgg:"Lugbara",lgh:"Laghuu",lgi:"Lengilu",lgk:"Lingarak",lgl:"Wala",lgm:"Lega-Mwenga",lgn:"T'apo",lgq:"Logba",lgr:"Lengo",lgt:"Pahi",lgu:"Longgu",lgz:"Ligenza",lha:"Laha (Viet Nam)",lhh:"Laha (Indonesia)",lhi:"Lahu Shi",lhl:"Lahul Lohar",lhm:"Lhomi",lhn:"Lahanan",lhp:"Lhokpu",lhs:"Mlahs\xF6",lht:"Lo-Toga",lhu:"Lahu",lia:"West-Central Limba",lib:"Likum",lic:"Hlai",lid:"Nyindrou",lie:"Likila",lif:"Limbu",lig:"Ligbi",lih:"Lihir",lij:"Ligurian",lik:"Lika",lil:"Lillooet",lim:"Limburgan",lin:"Lingala",lio:"Liki",lip:"Sekpele",liq:"Libido",lir:"Liberian English",lis:"Lisu",lit:"Lithuanian",liu:"Logorik",liv:"Liv",liw:"Col",lix:"Liabuku",liy:"Banda-Bambari",liz:"Libinza",lja:"Golpa",lje:"Rampi",lji:"Laiyolo",ljl:"Li'o",ljp:"Lampung Api",ljw:"Yirandali",ljx:"Yuru",lka:"Lakalei",lkb:"Kabras",lkc:"Kucong",lkd:"Lakond\xEA",lke:"Kenyi",lkh:"Lakha",lki:"Laki",lkj:"Remun",lkl:"Laeko-Libuat",lkm:"Kalaamaya",lkn:"Lakon",lko:"Khayo",lkr:"P\xE4ri",lks:"Kisa",lkt:"Lakota",lku:"Kungkari",lky:"Lokoya",lla:"Lala-Roba",llb:"Lolo",llc:"Lele (Guinea)",lld:"Ladin",lle:"Lele (Papua New Guinea)",llf:"Hermit",llg:"Lole",llh:"Lamu",lli:"Teke-Laali",llj:"Ladji Ladji",llk:"Lelak",lll:"Lilau",llm:"Lasalimu",lln:"Lele (Chad)",llo:"Khlor",llp:"North Efate",llq:"Lolak",lls:"Lithuanian Sign Language",llu:"Lau",llx:"Lauan",lma:"East Limba",lmb:"Merei",lmc:"Limilngan",lmd:"Lumun",lme:"P\xE9v\xE9",lmf:"South Lembata",lmg:"Lamogai",lmh:"Lambichhong",lmi:"Lombi",lmj:"West Lembata",lmk:"Lamkang",lml:"Hano",lmn:"Lambadi",lmo:"Lombard",lmp:"Limbum",lmq:"Lamatuka",lmr:"Lamalera",lmu:"Lamenu",lmv:"Lomaiviti",lmw:"Lake Miwok",lmx:"Laimbue",lmy:"Lamboya",lmz:"Lumbee",lna:"Langbashe",lnb:"Mbalanhu",lnd:"Lundayeh",lng:"Langobardic",lnh:"Lanoh",lni:"Daantanai'",lnj:"Leningitij",lnl:"South Central Banda",lnm:"Langam",lnn:"Lorediakarkar",lno:"Lango (Sudan)",lns:"Lamnso'",lnu:"Longuda",lnw:"Lanima",lnz:"Lonzo",loa:"Loloda",lob:"Lobi",loc:"Inonhan",loe:"Saluan",lof:"Logol",log:"Logo",loh:"Narim",loi:"Loma (C\xF4te d'Ivoire)",loj:"Lou",lok:"Loko",lol:"Mongo",lom:"Loma (Liberia)",lon:"Malawi Lomwe",loo:"Lombo",lop:"Lopa",loq:"Lobala",lor:"T\xE9\xE9n",los:"Loniu",lot:"Otuho",lou:"Louisiana Creole",lov:"Lopi",low:"Tampias Lobu",lox:"Loun",loy:"Loke",loz:"Lozi",lpa:"Lelepa",lpe:"Lepki",lpn:"Long Phuri Naga",lpo:"Lipo",lpx:"Lopit",lra:"Rara Bakati'",lrc:"Northern Luri",lre:"Laurentian",lrg:"Laragia",lri:"Marachi",lrk:"Loarki",lrl:"Lari",lrm:"Marama",lrn:"Lorang",lro:"Laro",lrr:"Southern Yamphu",lrt:"Larantuka Malay",lrv:"Larevat",lrz:"Lemerig",lsa:"Lasgerdi",lsd:"Lishana Deni",lse:"Lusengo",lsg:"Lyons Sign Language",lsh:"Lish",lsi:"Lashi",lsl:"Latvian Sign Language",lsm:"Saamia",lso:"Laos Sign Language",lsp:"Panamanian Sign Language",lsr:"Aruop",lss:"Lasi",lst:"Trinidad and Tobago Sign Language",lsy:"Mauritian Sign Language",ltc:"Late Middle Chinese",ltg:"Latgalian",lth:"Thur",lti:"Leti (Indonesia)",ltn:"Latund\xEA",lto:"Tsotso",lts:"Tachoni",ltu:"Latu",ltz:"Luxembourgish",lua:"Luba-Lulua",lub:"Luba-Katanga",luc:"Aringa",lud:"Ludian",lue:"Luvale",luf:"Laua",lug:"Ganda",lui:"Luiseno",luj:"Luna",luk:"Lunanakha",lul:"Olu'bo",lum:"Luimbi",lun:"Lunda",luo:"Luo (Kenya and Tanzania)",lup:"Lumbu",luq:"Lucumi",lur:"Laura",lus:"Lushai",lut:"Lushootseed",luu:"Lumba-Yakkha",luv:"Luwati",luw:"Luo (Cameroon)",luy:"Luyia",luz:"Southern Luri",lva:"Maku'a",lvk:"Lavukaleve",lvs:"Standard Latvian",lvu:"Levuka",lwa:"Lwalu",lwe:"Lewo Eleng",lwg:"Wanga",lwh:"White Lachi",lwl:"Eastern Lawa",lwm:"Laomian",lwo:"Luwo",lwt:"Lewotobi",lwu:"Lawu",lww:"Lewo",lya:"Layakha",lyg:"Lyngngam",lyn:"Luyana",lzh:"Literary Chinese",lzl:"Litzlitz",lzn:"Leinong Naga",lzz:"Laz",maa:"San Jer\xF3nimo Tec\xF3atl Mazatec",mab:"Yutanduchi Mixtec",mad:"Madurese",mae:"Bo-Rukul",maf:"Mafa",mag:"Magahi",mah:"Marshallese",mai:"Maithili",maj:"Jalapa De D\xEDaz Mazatec",mak:"Makasar",mal:"Malayalam",mam:"Mam",man:"Mandingo",maq:"Chiquihuitl\xE1n Mazatec",mar:"Marathi",mas:"Masai",mat:"San Francisco Matlatzinca",mau:"Huautla Mazatec",mav:"Sater\xE9-Maw\xE9",maw:"Mampruli",max:"North Moluccan Malay",maz:"Central Mazahua",mba:"Higaonon",mbb:"Western Bukidnon Manobo",mbc:"Macushi",mbd:"Dibabawon Manobo",mbe:"Molale",mbf:"Baba Malay",mbh:"Mangseng",mbi:"Ilianen Manobo",mbj:"Nad\xEBb",mbk:"Malol",mbl:"Maxakal\xED",mbm:"Ombamba",mbn:"Macagu\xE1n",mbo:"Mbo (Cameroon)",mbp:"Malayo",mbq:"Maisin",mbr:"Nukak Mak\xFA",mbs:"Sarangani Manobo",mbt:"Matigsalug Manobo",mbu:"Mbula-Bwazza",mbv:"Mbulungish",mbw:"Maring",mbx:"Mari (East Sepik Province)",mby:"Memoni",mbz:"Amoltepec Mixtec",mca:"Maca",mcb:"Machiguenga",mcc:"Bitur",mcd:"Sharanahua",mce:"Itundujia Mixtec",mcf:"Mats\xE9s",mcg:"Mapoyo",mch:"Maquiritari",mci:"Mese",mcj:"Mvanip",mck:"Mbunda",mcl:"Macaguaje",mcm:"Malaccan Creole Portuguese",mcn:"Masana",mco:"Coatl\xE1n Mixe",mcp:"Makaa",mcq:"Ese",mcr:"Menya",mcs:"Mambai",mct:"Mengisa",mcu:"Cameroon Mambila",mcv:"Minanibai",mcw:"Mawa (Chad)",mcx:"Mpiemo",mcy:"South Watut",mcz:"Mawan",mda:"Mada (Nigeria)",mdb:"Morigi",mdc:"Male (Papua New Guinea)",mdd:"Mbum",mde:"Maba (Chad)",mdf:"Moksha",mdg:"Massalat",mdh:"Maguindanaon",mdi:"Mamvu",mdj:"Mangbetu",mdk:"Mangbutu",mdl:"Maltese Sign Language",mdm:"Mayogo",mdn:"Mbati",mdp:"Mbala",mdq:"Mbole",mdr:"Mandar",mds:"Maria (Papua New Guinea)",mdt:"Mbere",mdu:"Mboko",mdv:"Santa Luc\xEDa Monteverde Mixtec",mdw:"Mbosi",mdx:"Dizin",mdy:"Male (Ethiopia)",mdz:"Suru\xED Do Par\xE1",mea:"Menka",meb:"Ikobi",mec:"Mara",med:"Melpa",mee:"Mengen",mef:"Megam",meh:"Southwestern Tlaxiaco Mixtec",mei:"Midob",mej:"Meyah",mek:"Mekeo",mel:"Central Melanau",mem:"Mangala",men:"Mende (Sierra Leone)",meo:"Kedah Malay",mep:"Miriwung",meq:"Merey",mer:"Meru",mes:"Masmaje",met:"Mato",meu:"Motu",mev:"Mano",mew:"Maaka",mey:"Hassaniyya",mez:"Menominee",mfa:"Pattani Malay",mfb:"Bangka",mfc:"Mba",mfd:"Mendankwe-Nkwen",mfe:"Morisyen",mff:"Naki",mfg:"Mogofin",mfh:"Matal",mfi:"Wandala",mfj:"Mefele",mfk:"North Mofu",mfl:"Putai",mfm:"Marghi South",mfn:"Cross River Mbembe",mfo:"Mbe",mfp:"Makassar Malay",mfq:"Moba",mfr:"Marithiel",mfs:"Mexican Sign Language",mft:"Mokerang",mfu:"Mbwela",mfv:"Mandjak",mfw:"Mulaha",mfx:"Melo",mfy:"Mayo",mfz:"Mabaan",mga:"Middle Irish (900-1200)",mgb:"Mararit",mgc:"Morokodo",mgd:"Moru",mge:"Mango",mgf:"Maklew",mgg:"Mpumpong",mgh:"Makhuwa-Meetto",mgi:"Lijili",mgj:"Abureni",mgk:"Mawes",mgl:"Maleu-Kilenge",mgm:"Mambae",mgn:"Mbangi",mgo:"Meta'",mgp:"Eastern Magar",mgq:"Malila",mgr:"Mambwe-Lungu",mgs:"Manda (Tanzania)",mgt:"Mongol",mgu:"Mailu",mgv:"Matengo",mgw:"Matumbi",mgy:"Mbunga",mgz:"Mbugwe",mha:"Manda (India)",mhb:"Mahongwe",mhc:"Mocho",mhd:"Mbugu",mhe:"Besisi",mhf:"Mamaa",mhg:"Margu",mhi:"Ma'di",mhj:"Mogholi",mhk:"Mungaka",mhl:"Mauwake",mhm:"Makhuwa-Moniga",mhn:"M\xF3cheno",mho:"Mashi (Zambia)",mhp:"Balinese Malay",mhq:"Mandan",mhr:"Eastern Mari",mhs:"Buru (Indonesia)",mht:"Mandahuaca",mhu:"Digaro-Mishmi",mhw:"Mbukushu",mhx:"Maru",mhy:"Ma'anyan",mhz:"Mor (Mor Islands)",mia:"Miami",mib:"Atatl\xE1huca Mixtec",mic:"Mi'kmaq",mid:"Mandaic",mie:"Ocotepec Mixtec",mif:"Mofu-Gudur",mig:"San Miguel El Grande Mixtec",mih:"Chayuco Mixtec",mii:"Chigmecatitl\xE1n Mixtec",mij:"Abar",mik:"Mikasuki",mil:"Pe\xF1oles Mixtec",mim:"Alacatlatzala Mixtec",min:"Minangkabau",mio:"Pinotepa Nacional Mixtec",mip:"Apasco-Apoala Mixtec",miq:"M\xEDskito",mir:"Isthmus Mixe",mis:"Uncoded languages",mit:"Southern Puebla Mixtec",miu:"Cacaloxtepec Mixtec",miw:"Akoye",mix:"Mixtepec Mixtec",miy:"Ayutla Mixtec",miz:"Coatzospan Mixtec",mjb:"Makalero",mjc:"San Juan Colorado Mixtec",mjd:"Northwest Maidu",mje:"Muskum",mjg:"Tu",mjh:"Mwera (Nyasa)",mji:"Kim Mun",mjj:"Mawak",mjk:"Matukar",mjl:"Mandeali",mjm:"Medebur",mjn:"Ma (Papua New Guinea)",mjo:"Malankuravan",mjp:"Malapandaram",mjq:"Malaryan",mjr:"Malavedan",mjs:"Miship",mjt:"Sauria Paharia",mju:"Manna-Dora",mjv:"Mannan",mjw:"Karbi",mjx:"Mahali",mjy:"Mahican",mjz:"Majhi",mka:"Mbre",mkb:"Mal Paharia",mkc:"Siliput",mkd:"Macedonian",mke:"Mawchi",mkf:"Miya",mkg:"Mak (China)",mki:"Dhatki",mkj:"Mokilese",mkk:"Byep",mkl:"Mokole",mkm:"Moklen",mkn:"Kupang Malay",mko:"Mingang Doso",mkp:"Moikodi",mkq:"Bay Miwok",mkr:"Malas",mks:"Silacayoapan Mixtec",mkt:"Vamale",mku:"Konyanka Maninka",mkv:"Mafea",mkw:"Kituba (Congo)",mkx:"Kinamiging Manobo",mky:"East Makian",mkz:"Makasae",mla:"Malo",mlb:"Mbule",mlc:"Cao Lan",mle:"Manambu",mlf:"Mal",mlg:"Malagasy",mlh:"Mape",mli:"Malimpung",mlj:"Miltu",mlk:"Ilwana",mll:"Malua Bay",mlm:"Mulam",mln:"Malango",mlo:"Mlomp",mlp:"Bargam",mlq:"Western Maninkakan",mlr:"Vame",mls:"Masalit",mlt:"Maltese",mlu:"To'abaita",mlv:"Motlav",mlw:"Moloko",mlx:"Malfaxal",mlz:"Malaynon",mma:"Mama",mmb:"Momina",mmc:"Michoac\xE1n Mazahua",mmd:"Maonan",mme:"Mae",mmf:"Mundat",mmg:"North Ambrym",mmh:"Mehin\xE1ku",mmi:"Musar",mmj:"Majhwar",mmk:"Mukha-Dora",mml:"Man Met",mmm:"Maii",mmn:"Mamanwa",mmo:"Mangga Buang",mmp:"Siawi",mmq:"Musak",mmr:"Western Xiangxi Miao",mmt:"Malalamai",mmu:"Mmaala",mmv:"Miriti",mmw:"Emae",mmx:"Madak",mmy:"Migaama",mmz:"Mabaale",mna:"Mbula",mnb:"Muna",mnc:"Manchu",mnd:"Mond\xE9",mne:"Naba",mnf:"Mundani",mng:"Eastern Mnong",mnh:"Mono (Democratic Republic of Congo)",mni:"Manipuri",mnj:"Munji",mnk:"Mandinka",mnl:"Tiale",mnm:"Mapena",mnn:"Southern Mnong",mnp:"Min Bei Chinese",mnq:"Minriq",mnr:"Mono (USA)",mns:"Mansi",mnu:"Mer",mnv:"Rennell-Bellona",mnw:"Mon",mnx:"Manikion",mny:"Manyawa",mnz:"Moni",moa:"Mwan",moc:"Mocov\xED",mod:"Mobilian",moe:"Montagnais",mog:"Mongondow",moh:"Mohawk",moi:"Mboi",moj:"Monzombo",mok:"Morori",mom:"Mangue",mon:"Mongolian",moo:"Monom",mop:"Mop\xE1n Maya",moq:"Mor (Bomberai Peninsula)",mor:"Moro",mos:"Mossi",mot:"Bar\xED",mou:"Mogum",mov:"Mohave",mow:"Moi (Congo)",mox:"Molima",moy:"Shekkacho",moz:"Mukulu",mpa:"Mpoto",mpb:"Mullukmulluk",mpc:"Mangarayi",mpd:"Machinere",mpe:"Majang",mpg:"Marba",mph:"Maung",mpi:"Mpade",mpj:"Martu Wangka",mpk:"Mbara (Chad)",mpl:"Middle Watut",mpm:"Yosond\xFAa Mixtec",mpn:"Mindiri",mpo:"Miu",mpp:"Migabac",mpq:"Mat\xEDs",mpr:"Vangunu",mps:"Dadibi",mpt:"Mian",mpu:"Makur\xE1p",mpv:"Mungkip",mpw:"Mapidian",mpx:"Misima-Panaeati",mpy:"Mapia",mpz:"Mpi",mqa:"Maba (Indonesia)",mqb:"Mbuko",mqc:"Mangole",mqe:"Matepi",mqf:"Momuna",mqg:"Kota Bangun Kutai Malay",mqh:"Tlazoyaltepec Mixtec",mqi:"Mariri",mqj:"Mamasa",mqk:"Rajah Kabunsuwan Manobo",mql:"Mbelime",mqm:"South Marquesan",mqn:"Moronene",mqo:"Modole",mqp:"Manipa",mqq:"Minokok",mqr:"Mander",mqs:"West Makian",mqt:"Mok",mqu:"Mandari",mqv:"Mosimo",mqw:"Murupi",mqx:"Mamuju",mqy:"Manggarai",mqz:"Pano",mra:"Mlabri",mrb:"Marino",mrc:"Maricopa",mrd:"Western Magar",mre:"Martha's Vineyard Sign Language",mrf:"Elseng",mrg:"Mising",mrh:"Mara Chin",mri:"Maori",mrj:"Western Mari",mrk:"Hmwaveke",mrl:"Mortlockese",mrm:"Merlav",mrn:"Cheke Holo",mro:"Mru",mrp:"Morouas",mrq:"North Marquesan",mrr:"Maria (India)",mrs:"Maragus",mrt:"Marghi Central",mru:"Mono (Cameroon)",mrv:"Mangareva",mrw:"Maranao",mrx:"Maremgi",mry:"Mandaya",mrz:"Marind",msa:"Malay (macrolanguage)",msb:"Masbatenyo",msc:"Sankaran Maninka",msd:"Yucatec Maya Sign Language",mse:"Musey",msf:"Mekwei",msg:"Moraid",msh:"Masikoro Malagasy",msi:"Sabah Malay",msj:"Ma (Democratic Republic of Congo)",msk:"Mansaka",msl:"Molof",msm:"Agusan Manobo",msn:"Vur\xEBs",mso:"Mombum",msp:"Maritsau\xE1",msq:"Caac",msr:"Mongolian Sign Language",mss:"West Masela",msu:"Musom",msv:"Maslam",msw:"Mansoanka",msx:"Moresada",msy:"Aruamu",msz:"Momare",mta:"Cotabato Manobo",mtb:"Anyin Morofo",mtc:"Munit",mtd:"Mualang",mte:"Mono (Solomon Islands)",mtf:"Murik (Papua New Guinea)",mtg:"Una",mth:"Munggui",mti:"Maiwa (Papua New Guinea)",mtj:"Moskona",mtk:"Mbe'",mtl:"Montol",mtm:"Mator",mtn:"Matagalpa",mto:"Totontepec Mixe",mtp:"Wich\xED Lhamt\xE9s Nocten",mtq:"Muong",mtr:"Mewari",mts:"Yora",mtt:"Mota",mtu:"Tututepec Mixtec",mtv:"Asaro'o",mtw:"Southern Binukidnon",mtx:"Tida\xE1 Mixtec",mty:"Nabi",mua:"Mundang",mub:"Mubi",muc:"Ajumbu",mud:"Mednyj Aleut",mue:"Media Lengua",mug:"Musgu",muh:"M\xFCnd\xFC",mui:"Musi",muj:"Mabire",muk:"Mugom",mul:"Multiple languages",mum:"Maiwala",muo:"Nyong",mup:"Malvi",muq:"Eastern Xiangxi Miao",mur:"Murle",mus:"Creek",mut:"Western Muria",muu:"Yaaku",muv:"Muthuvan",mux:"Bo-Ung",muy:"Muyang",muz:"Mursi",mva:"Manam",mvb:"Mattole",mvd:"Mamboru",mve:"Marwari (Pakistan)",mvf:"Peripheral Mongolian",mvg:"Yucua\xF1e Mixtec",mvh:"Mulgi",mvi:"Miyako",mvk:"Mekmek",mvl:"Mbara (Australia)",mvm:"Muya",mvn:"Minaveha",mvo:"Marovo",mvp:"Duri",mvq:"Moere",mvr:"Marau",mvs:"Massep",mvt:"Mpotovoro",mvu:"Marfa",mvv:"Tagal Murut",mvw:"Machinga",mvx:"Meoswar",mvy:"Indus Kohistani",mvz:"Mesqan",mwa:"Mwatebu",mwb:"Juwal",mwc:"Are",mwe:"Mwera (Chimwera)",mwf:"Murrinh-Patha",mwg:"Aiklep",mwh:"Mouk-Aria",mwi:"Labo",mwk:"Kita Maninkakan",mwl:"Mirandese",mwm:"Sar",mwn:"Nyamwanga",mwo:"Central Maewo",mwp:"Kala Lagaw Ya",mwq:"M\xFCn Chin",mwr:"Marwari",mws:"Mwimbi-Muthambi",mwt:"Moken",mwu:"Mittu",mwv:"Mentawai",mww:"Hmong Daw",mwx:"Mediak",mwy:"Mosiro",mwz:"Moingi",mxa:"Northwest Oaxaca Mixtec",mxb:"Tezoatl\xE1n Mixtec",mxc:"Manyika",mxd:"Modang",mxe:"Mele-Fila",mxf:"Malgbe",mxg:"Mbangala",mxh:"Mvuba",mxi:"Mozarabic",mxj:"Miju-Mishmi",mxk:"Monumbo",mxl:"Maxi Gbe",mxm:"Meramera",mxn:"Moi (Indonesia)",mxo:"Mbowe",mxp:"Tlahuitoltepec Mixe",mxq:"Juquila Mixe",mxr:"Murik (Malaysia)",mxs:"Huitepec Mixtec",mxt:"Jamiltepec Mixtec",mxu:"Mada (Cameroon)",mxv:"Metlat\xF3noc Mixtec",mxw:"Namo",mxx:"Mahou",mxy:"Southeastern Nochixtl\xE1n Mixtec",mxz:"Central Masela",mya:"Burmese",myb:"Mbay",myc:"Mayeka",myd:"Maramba",mye:"Myene",myf:"Bambassi",myg:"Manta",myh:"Makah",myi:"Mina (India)",myj:"Mangayat",myk:"Mamara Senoufo",myl:"Moma",mym:"Me'en",myo:"Anfillo",myp:"Pirah\xE3",myr:"Muniche",mys:"Mesmes",myu:"Munduruk\xFA",myv:"Erzya",myw:"Muyuw",myx:"Masaaba",myy:"Macuna",myz:"Classical Mandaic",mza:"Santa Mar\xEDa Zacatepec Mixtec",mzb:"Tumzabt",mzc:"Madagascar Sign Language",mzd:"Malimba",mze:"Morawa",mzg:"Monastic Sign Language",mzh:"Wich\xED Lhamt\xE9s G\xFCisnay",mzi:"Ixcatl\xE1n Mazatec",mzj:"Manya",mzk:"Nigeria Mambila",mzl:"Mazatl\xE1n Mixe",mzm:"Mumuye",mzn:"Mazanderani",mzo:"Matipuhy",mzp:"Movima",mzq:"Mori Atas",mzr:"Mar\xFAbo",mzs:"Macanese",mzt:"Mintil",mzu:"Inapang",mzv:"Manza",mzw:"Deg",mzx:"Mawayana",mzy:"Mozambican Sign Language",mzz:"Maiadomu",naa:"Namla",nab:"Southern Nambiku\xE1ra",nac:"Narak",nae:"Naka'ela",naf:"Nabak",nag:"Naga Pidgin",naj:"Nalu",nak:"Nakanai",nal:"Nalik",nam:"Ngan'gityemerri",nan:"Min Nan Chinese",nao:"Naaba",nap:"Neapolitan",naq:"Khoekhoe",nar:"Iguta",nas:"Naasioi",nat:"Ca\u0331hungwa\u0331rya\u0331",nau:"Nauru",nav:"Navajo",naw:"Nawuri",nax:"Nakwi",nay:"Narrinyeri",naz:"Coatepec Nahuatl",nba:"Nyemba",nbb:"Ndoe",nbc:"Chang Naga",nbd:"Ngbinda",nbe:"Konyak Naga",nbg:"Nagarchal",nbh:"Ngamo",nbi:"Mao Naga",nbj:"Ngarinman",nbk:"Nake",nbl:"South Ndebele",nbm:"Ngbaka Ma'bo",nbn:"Kuri",nbo:"Nkukoli",nbp:"Nnam",nbq:"Nggem",nbr:"Numana-Nunku-Gbantu-Numbu",nbs:"Namibian Sign Language",nbt:"Na",nbu:"Rongmei Naga",nbv:"Ngamambo",nbw:"Southern Ngbandi",nby:"Ningera",nca:"Iyo",ncb:"Central Nicobarese",ncc:"Ponam",ncd:"Nachering",nce:"Yale",ncf:"Notsi",ncg:"Nisga'a",nch:"Central Huasteca Nahuatl",nci:"Classical Nahuatl",ncj:"Northern Puebla Nahuatl",nck:"Nakara",ncl:"Michoac\xE1n Nahuatl",ncm:"Nambo",ncn:"Nauna",nco:"Sibe",ncp:"Ndaktup",ncq:"Northern Katang",ncr:"Ncane",ncs:"Nicaraguan Sign Language",nct:"Chothe Naga",ncu:"Chumburung",ncx:"Central Puebla Nahuatl",ncz:"Natchez",nda:"Ndasa",ndb:"Kenswei Nsei",ndc:"Ndau",ndd:"Nde-Nsele-Nta",nde:"North Ndebele",ndf:"Nadruvian",ndg:"Ndengereko",ndh:"Ndali",ndi:"Samba Leko",ndj:"Ndamba",ndk:"Ndaka",ndl:"Ndolo",ndm:"Ndam",ndn:"Ngundi",ndo:"Ndonga",ndp:"Ndo",ndq:"Ndombe",ndr:"Ndoola",nds:"Low German",ndt:"Ndunga",ndu:"Dugun",ndv:"Ndut",ndw:"Ndobo",ndx:"Nduga",ndy:"Lutos",ndz:"Ndogo",nea:"Eastern Ngad'a",neb:"Toura (C\xF4te d'Ivoire)",nec:"Nedebang",ned:"Nde-Gbite",nee:"N\xEAl\xEAmwa-Nixumwak",nef:"Nefamese",neg:"Negidal",neh:"Nyenkha",nei:"Neo-Hittite",nej:"Neko",nek:"Neku",nem:"Nemi",nen:"Nengone",neo:"N\xE1-Meo",nep:"Nepali (macrolanguage)",neq:"North Central Mixe",ner:"Yahadian",nes:"Bhoti Kinnauri",net:"Nete",neu:"Neo",nev:"Nyaheun",new:"Newari",nex:"Neme",ney:"Neyo",nez:"Nez Perce",nfa:"Dhao",nfd:"Ahwai",nfl:"Ayiwo",nfr:"Nafaanra",nfu:"Mfumte",nga:"Ngbaka",ngb:"Northern Ngbandi",ngc:"Ngombe (Democratic Republic of Congo)",ngd:"Ngando (Central African Republic)",nge:"Ngemba",ngg:"Ngbaka Manza",ngh:"N/u",ngi:"Ngizim",ngj:"Ngie",ngk:"Dalabon",ngl:"Lomwe",ngm:"Ngatik Men's Creole",ngn:"Ngwo",ngo:"Ngoni",ngp:"Ngulu",ngq:"Ngurimi",ngr:"Engdewu",ngs:"Gvoko",ngt:"Kriang",ngu:"Guerrero Nahuatl",ngv:"Nagumi",ngw:"Ngwaba",ngx:"Nggwahyi",ngy:"Tibea",ngz:"Ngungwel",nha:"Nhanda",nhb:"Beng",nhc:"Tabasco Nahuatl",nhd:"Chirip\xE1",nhe:"Eastern Huasteca Nahuatl",nhf:"Nhuwala",nhg:"Tetelcingo Nahuatl",nhh:"Nahari",nhi:"Zacatl\xE1n-Ahuacatl\xE1n-Tepetzintla Nahuatl",nhk:"Isthmus-Cosoleacaque Nahuatl",nhm:"Morelos Nahuatl",nhn:"Central Nahuatl",nho:"Takuu",nhp:"Isthmus-Pajapan Nahuatl",nhq:"Huaxcaleca Nahuatl",nhr:"Naro",nht:"Ometepec Nahuatl",nhu:"Noone",nhv:"Temascaltepec Nahuatl",nhw:"Western Huasteca Nahuatl",nhx:"Isthmus-Mecayapan Nahuatl",nhy:"Northern Oaxaca Nahuatl",nhz:"Santa Mar\xEDa La Alta Nahuatl",nia:"Nias",nib:"Nakame",nid:"Ngandi",nie:"Niellim",nif:"Nek",nig:"Ngalakan",nih:"Nyiha (Tanzania)",nii:"Nii",nij:"Ngaju",nik:"Southern Nicobarese",nil:"Nila",nim:"Nilamba",nin:"Ninzo",nio:"Nganasan",niq:"Nandi",nir:"Nimboran",nis:"Nimi",nit:"Southeastern Kolami",niu:"Niuean",niv:"Gilyak",niw:"Nimo",nix:"Hema",niy:"Ngiti",niz:"Ningil",nja:"Nzanyi",njb:"Nocte Naga",njd:"Ndonde Hamba",njh:"Lotha Naga",nji:"Gudanji",njj:"Njen",njl:"Njalgulgule",njm:"Angami Naga",njn:"Liangmai Naga",njo:"Ao Naga",njr:"Njerep",njs:"Nisa",njt:"Ndyuka-Trio Pidgin",nju:"Ngadjunmaya",njx:"Kunyi",njy:"Njyem",njz:"Nyishi",nka:"Nkoya",nkb:"Khoibu Naga",nkc:"Nkongho",nkd:"Koireng",nke:"Duke",nkf:"Inpui Naga",nkg:"Nekgini",nkh:"Khezha Naga",nki:"Thangal Naga",nkj:"Nakai",nkk:"Nokuku",nkm:"Namat",nkn:"Nkangala",nko:"Nkonya",nkp:"Niuatoputapu",nkq:"Nkami",nkr:"Nukuoro",nks:"North Asmat",nkt:"Nyika (Tanzania)",nku:"Bouna Kulango",nkv:"Nyika (Malawi and Zambia)",nkw:"Nkutu",nkx:"Nkoroo",nkz:"Nkari",nla:"Ngombale",nlc:"Nalca",nld:"Dutch",nle:"East Nyala",nlg:"Gela",nli:"Grangali",nlj:"Nyali",nlk:"Ninia Yali",nll:"Nihali",nlo:"Ngul",nlq:"Lao Naga",nlu:"Nchumbulu",nlv:"Orizaba Nahuatl",nlw:"Walangama",nlx:"Nahali",nly:"Nyamal",nlz:"Nal\xF6go",nma:"Maram Naga",nmb:"Big Nambas",nmc:"Ngam",nmd:"Ndumu",nme:"Mzieme Naga",nmf:"Tangkhul Naga (India)",nmg:"Kwasio",nmh:"Monsang Naga",nmi:"Nyam",nmj:"Ngombe (Central African Republic)",nmk:"Namakura",nml:"Ndemli",nmm:"Manangba",nmn:"!X\xF3\xF5",nmo:"Moyon Naga",nmp:"Nimanbur",nmq:"Nambya",nmr:"Nimbari",nms:"Letemboi",nmt:"Namonuito",nmu:"Northeast Maidu",nmv:"Ngamini",nmw:"Nimoa",nmx:"Nama (Papua New Guinea)",nmy:"Namuyi",nmz:"Nawdm",nna:"Nyangumarta",nnb:"Nande",nnc:"Nancere",nnd:"West Ambae",nne:"Ngandyera",nnf:"Ngaing",nng:"Maring Naga",nnh:"Ngiemboon",nni:"North Nuaulu",nnj:"Nyangatom",nnk:"Nankina",nnl:"Northern Rengma Naga",nnm:"Namia",nnn:"Ngete",nno:"Norwegian Nynorsk",nnp:"Wancho Naga",nnq:"Ngindo",nnr:"Narungga",nns:"Ningye",nnt:"Nanticoke",nnu:"Dwang",nnv:"Nugunu (Australia)",nnw:"Southern Nuni",nny:"Nyangga",nnz:"Nda'nda'",noa:"Woun Meu",nob:"Norwegian Bokm\xE5l",noc:"Nuk",nod:"Northern Thai",noe:"Nimadi",nof:"Nomane",nog:"Nogai",noh:"Nomu",noi:"Noiri",noj:"Nonuya",nok:"Nooksack",nol:"Nomlaki",nom:"Nocam\xE1n",non:"Old Norse",nop:"Numanggang",noq:"Ngongo",nor:"Norwegian",nos:"Eastern Nisu",not:"Nomatsiguenga",nou:"Ewage-Notu",nov:"Novial",now:"Nyambo",noy:"Noy",noz:"Nayi",npa:"Nar Phu",npb:"Nupbikha",npg:"Ponyo-Gongwang Naga",nph:"Phom Naga",npi:"Nepali (individual language)",npl:"Southeastern Puebla Nahuatl",npn:"Mondropolon",npo:"Pochuri Naga",nps:"Nipsan",npu:"Puimei Naga",npx:"Noipx",npy:"Napu",nqg:"Southern Nago",nqk:"Kura Ede Nago",nql:"Ngendelengo",nqm:"Ndom",nqn:"Nen",nqo:"N'Ko",nqq:"Kyan-Karyaw Naga",nqy:"Akyaung Ari Naga",nra:"Ngom",nrb:"Nara",nrc:"Noric",nre:"Southern Rengma Naga",nrf:"J\xE8rriais",nrg:"Narango",nri:"Chokri Naga",nrk:"Ngarla",nrl:"Ngarluma",nrm:"Narom",nrn:"Norn",nrp:"North Picene",nrr:"Norra",nrt:"Northern Kalapuya",nru:"Narua",nrx:"Ngurmbur",nrz:"Lala",nsa:"Sangtam Naga",nsc:"Nshi",nsd:"Southern Nisu",nse:"Nsenga",nsf:"Northwestern Nisu",nsg:"Ngasa",nsh:"Ngoshie",nsi:"Nigerian Sign Language",nsk:"Naskapi",nsl:"Norwegian Sign Language",nsm:"Sumi Naga",nsn:"Nehan",nso:"Pedi",nsp:"Nepalese Sign Language",nsq:"Northern Sierra Miwok",nsr:"Maritime Sign Language",nss:"Nali",nst:"Tase Naga",nsu:"Sierra Negra Nahuatl",nsv:"Southwestern Nisu",nsw:"Navut",nsx:"Nsongo",nsy:"Nasal",nsz:"Nisenan",ntd:"Northern Tidung",nte:"Nathembo",ntg:"Ngantangarra",nti:"Natioro",ntj:"Ngaanyatjarra",ntk:"Ikoma-Nata-Isenye",ntm:"Nateni",nto:"Ntomba",ntp:"Northern Tepehuan",ntr:"Delo",ntu:"Nat\xFCgu",ntw:"Nottoway",ntx:"Tangkhul Naga (Myanmar)",nty:"Mantsi",ntz:"Natanzi",nua:"Yuanga",nuc:"Nukuini",nud:"Ngala",nue:"Ngundu",nuf:"Nusu",nug:"Nungali",nuh:"Ndunda",nui:"Ngumbi",nuj:"Nyole",nuk:"Nuu-chah-nulth",nul:"Nusa Laut",num:"Niuafo'ou",nun:"Anong",nuo:"Ngu\xF4n",nup:"Nupe-Nupe-Tako",nuq:"Nukumanu",nur:"Nukuria",nus:"Nuer",nut:"Nung (Viet Nam)",nuu:"Ngbundu",nuv:"Northern Nuni",nuw:"Nguluwan",nux:"Mehek",nuy:"Nunggubuyu",nuz:"Tlamacazapa Nahuatl",nvh:"Nasarian",nvm:"Namiae",nvo:"Nyokon",nwa:"Nawathinehena",nwb:"Nyabwa",nwc:"Classical Newari",nwe:"Ngwe",nwg:"Ngayawung",nwi:"Southwest Tanna",nwm:"Nyamusa-Molo",nwo:"Nauo",nwr:"Nawaru",nwx:"Middle Newar",nwy:"Nottoway-Meherrin",nxa:"Nauete",nxd:"Ngando (Democratic Republic of Congo)",nxe:"Nage",nxg:"Ngad'a",nxi:"Nindi",nxk:"Koki Naga",nxl:"South Nuaulu",nxm:"Numidian",nxn:"Ngawun",nxo:"Ndambomo",nxq:"Naxi",nxr:"Ninggerum",nxu:"Narau",nxx:"Nafri",nya:"Nyanja",nyb:"Nyangbo",nyc:"Nyanga-li",nyd:"Nyore",nye:"Nyengo",nyf:"Giryama",nyg:"Nyindu",nyh:"Nyigina",nyi:"Ama (Sudan)",nyj:"Nyanga",nyk:"Nyaneka",nyl:"Nyeu",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nyp:"Nyang'i",nyq:"Nayini",nyr:"Nyiha (Malawi)",nys:"Nyunga",nyt:"Nyawaygi",nyu:"Nyungwe",nyv:"Nyulnyul",nyw:"Nyaw",nyx:"Nganyaywana",nyy:"Nyakyusa-Ngonde",nza:"Tigon Mbembe",nzb:"Njebi",nzi:"Nzima",nzk:"Nzakara",nzm:"Zeme Naga",nzs:"New Zealand Sign Language",nzu:"Teke-Nzikou",nzy:"Nzakambay",nzz:"Nanga Dama Dogon",oaa:"Orok",oac:"Oroch",oar:"Old Aramaic (up to 700 BCE)",oav:"Old Avar",obi:"Obispe\xF1o",obk:"Southern Bontok",obl:"Oblo",obm:"Moabite",obo:"Obo Manobo",obr:"Old Burmese",obt:"Old Breton",obu:"Obulom",oca:"Ocaina",och:"Old Chinese",oci:"Occitan (post 1500)",oco:"Old Cornish",ocu:"Atzingo Matlatzinca",oda:"Odut",odk:"Od",odt:"Old Dutch",odu:"Odual",ofo:"Ofo",ofs:"Old Frisian",ofu:"Efutop",ogb:"Ogbia",ogc:"Ogbah",oge:"Old Georgian",ogg:"Ogbogolo",ogo:"Khana",ogu:"Ogbronuagum",oht:"Old Hittite",ohu:"Old Hungarian",oia:"Oirata",oin:"Inebu One",ojb:"Northwestern Ojibwa",ojc:"Central Ojibwa",ojg:"Eastern Ojibwa",oji:"Ojibwa",ojp:"Old Japanese",ojs:"Severn Ojibwa",ojv:"Ontong Java",ojw:"Western Ojibwa",oka:"Okanagan",okb:"Okobo",okd:"Okodia",oke:"Okpe (Southwestern Edo)",okg:"Koko Babangk",okh:"Koresh-e Rostam",oki:"Okiek",okj:"Oko-Juwoi",okk:"Kwamtim One",okl:"Old Kentish Sign Language",okm:"Middle Korean (10th-16th cent.)",okn:"Oki-No-Erabu",oko:"Old Korean (3rd-9th cent.)",okr:"Kirike",oks:"Oko-Eni-Osayen",oku:"Oku",okv:"Orokaiva",okx:"Okpe (Northwestern Edo)",ola:"Walungge",old:"Mochi",ole:"Olekha",olk:"Olkol",olm:"Oloma",olo:"Livvi",olr:"Olrat",olt:"Old Lithuanian",olu:"Kuvale",oma:"Omaha-Ponca",omb:"East Ambae",omc:"Mochica",omg:"Omagua",omi:"Omi",omk:"Omok",oml:"Ombo",omn:"Minoan",omo:"Utarmbung",omp:"Old Manipuri",omr:"Old Marathi",omt:"Omotik",omu:"Omurano",omw:"South Tairora",omx:"Old Mon",ona:"Ona",onb:"Lingao",one:"Oneida",ong:"Olo",oni:"Onin",onj:"Onjob",onk:"Kabore One",onn:"Onobasulu",ono:"Onondaga",onp:"Sartang",onr:"Northern One",ons:"Ono",ont:"Ontenu",onu:"Unua",onw:"Old Nubian",onx:"Onin Based Pidgin",ood:"Tohono O'odham",oog:"Ong",oon:"\xD6nge",oor:"Oorlams",oos:"Old Ossetic",opa:"Okpamheri",opk:"Kopkaka",opm:"Oksapmin",opo:"Opao",opt:"Opata",opy:"Ofay\xE9",ora:"Oroha",orc:"Orma",ore:"Orej\xF3n",org:"Oring",orh:"Oroqen",ori:"Oriya (macrolanguage)",orm:"Oromo",orn:"Orang Kanaq",oro:"Orokolo",orr:"Oruma",ors:"Orang Seletar",ort:"Adivasi Oriya",oru:"Ormuri",orv:"Old Russian",orw:"Oro Win",orx:"Oro",ory:"Odia",orz:"Ormu",osa:"Osage",osc:"Oscan",osi:"Osing",oso:"Ososo",osp:"Old Spanish",oss:"Ossetian",ost:"Osatu",osu:"Southern One",osx:"Old Saxon",ota:"Ottoman Turkish (1500-1928)",otb:"Old Tibetan",otd:"Ot Danum",ote:"Mezquital Otomi",oti:"Oti",otk:"Old Turkish",otl:"Tilapa Otomi",otm:"Eastern Highland Otomi",otn:"Tenango Otomi",otq:"Quer\xE9taro Otomi",otr:"Otoro",ots:"Estado de M\xE9xico Otomi",ott:"Temoaya Otomi",otu:"Otuke",otw:"Ottawa",otx:"Texcatepec Otomi",oty:"Old Tamil",otz:"Ixtenco Otomi",oua:"Tagargrent",oub:"Glio-Oubi",oue:"Oune",oui:"Old Uighur",oum:"Ouma",ovd:"Elfdalian",owi:"Owiniga",owl:"Old Welsh",oyb:"Oy",oyd:"Oyda",oym:"Wayampi",oyy:"Oya'oya",ozm:"Koonzime",pab:"Parec\xEDs",pac:"Pacoh",pad:"Paumar\xED",pae:"Pagibete",paf:"Paranaw\xE1t",pag:"Pangasinan",pah:"Tenharim",pai:"Pe",pak:"Parakan\xE3",pal:"Pahlavi",pam:"Pampanga",pan:"Panjabi",pao:"Northern Paiute",pap:"Papiamento",paq:"Parya",par:"Panamint",pas:"Papasena",pat:"Papitalai",pau:"Palauan",pav:"Paka\xE1snovos",paw:"Pawnee",pax:"Pankarar\xE9",pay:"Pech",paz:"Pankarar\xFA",pbb:"P\xE1ez",pbc:"Patamona",pbe:"Mezontla Popoloca",pbf:"Coyotepec Popoloca",pbg:"Paraujano",pbh:"E'\xF1apa Woromaipu",pbi:"Parkwa",pbl:"Mak (Nigeria)",pbn:"Kpasam",pbo:"Papel",pbp:"Badyara",pbr:"Pangwa",pbs:"Central Pame",pbt:"Southern Pashto",pbu:"Northern Pashto",pbv:"Pnar",pby:"Pyu (Papua New Guinea)",pca:"Santa In\xE9s Ahuatempan Popoloca",pcb:"Pear",pcc:"Bouyei",pcd:"Picard",pce:"Ruching Palaung",pcf:"Paliyan",pcg:"Paniya",pch:"Pardhan",pci:"Duruwa",pcj:"Parenga",pck:"Paite Chin",pcl:"Pardhi",pcm:"Nigerian Pidgin",pcn:"Piti",pcp:"Pacahuara",pcw:"Pyapun",pda:"Anam",pdc:"Pennsylvania German",pdi:"Pa Di",pdn:"Podena",pdo:"Padoe",pdt:"Plautdietsch",pdu:"Kayan",pea:"Peranakan Indonesian",peb:"Eastern Pomo",ped:"Mala (Papua New Guinea)",pee:"Taje",pef:"Northeastern Pomo",peg:"Pengo",peh:"Bonan",pei:"Chichimeca-Jonaz",pej:"Northern Pomo",pek:"Penchal",pel:"Pekal",pem:"Phende",peo:"Old Persian (ca. 600-400 B.C.)",pep:"Kunja",peq:"Southern Pomo",pes:"Iranian Persian",pev:"P\xE9mono",pex:"Petats",pey:"Petjo",pez:"Eastern Penan",pfa:"P\xE1\xE1fang",pfe:"Peere",pfl:"Pfaelzisch",pga:"Sudanese Creole Arabic",pgd:"G\u0101ndh\u0101r\u012B",pgg:"Pangwali",pgi:"Pagi",pgk:"Rerep",pgl:"Primitive Irish",pgn:"Paelignian",pgs:"Pangseng",pgu:"Pagu",pgz:"Papua New Guinean Sign Language",pha:"Pa-Hng",phd:"Phudagi",phg:"Phuong",phh:"Phukha",phk:"Phake",phl:"Phalura",phm:"Phimbi",phn:"Phoenician",pho:"Phunoi",phq:"Phana'",phr:"Pahari-Potwari",pht:"Phu Thai",phu:"Phuan",phv:"Pahlavani",phw:"Phangduwali",pia:"Pima Bajo",pib:"Yine",pic:"Pinji",pid:"Piaroa",pie:"Piro",pif:"Pingelapese",pig:"Pisabo",pih:"Pitcairn-Norfolk",pii:"Pini",pij:"Pijao",pil:"Yom",pim:"Powhatan",pin:"Piame",pio:"Piapoco",pip:"Pero",pir:"Piratapuyo",pis:"Pijin",pit:"Pitta Pitta",piu:"Pintupi-Luritja",piv:"Pileni",piw:"Pimbwe",pix:"Piu",piy:"Piya-Kwonci",piz:"Pije",pjt:"Pitjantjatjara",pka:"Ardham\u0101gadh\u012B Pr\u0101krit",pkb:"Pokomo",pkc:"Paekche",pkg:"Pak-Tong",pkh:"Pankhu",pkn:"Pakanha",pko:"P\xF6koot",pkp:"Pukapuka",pkr:"Attapady Kurumba",pks:"Pakistan Sign Language",pkt:"Maleng",pku:"Paku",pla:"Miani",plb:"Polonombauk",plc:"Central Palawano",pld:"Polari",ple:"Palu'e",plg:"Pilag\xE1",plh:"Paulohi",pli:"Pali",plj:"Polci",plk:"Kohistani Shina",pll:"Shwe Palaung",pln:"Palenquero",plo:"Oluta Popoluca",plp:"Palpa",plq:"Palaic",plr:"Palaka Senoufo",pls:"San Marcos Tlacoyalco Popoloca",plt:"Plateau Malagasy",plu:"Palik\xFAr",plv:"Southwest Palawano",plw:"Brooke's Point Palawano",ply:"Bolyu",plz:"Paluan",pma:"Paama",pmb:"Pambia",pmd:"Pallanganmiddang",pme:"Pwaamei",pmf:"Pamona",pmh:"M\u0101h\u0101r\u0101\u1E63\u1E6Dri Pr\u0101krit",pmi:"Northern Pumi",pmj:"Southern Pumi",pmk:"Pamlico",pml:"Lingua Franca",pmm:"Pomo",pmn:"Pam",pmo:"Pom",pmq:"Northern Pame",pmr:"Paynamar",pms:"Piemontese",pmt:"Tuamotuan",pmw:"Plains Miwok",pmx:"Poumei Naga",pmy:"Papuan Malay",pmz:"Southern Pame",pna:"Punan Bah-Biau",pnb:"Western Panjabi",pnc:"Pannei",pne:"Western Penan",png:"Pongu",pnh:"Penrhyn",pni:"Aoheng",pnj:"Pinjarup",pnk:"Paunaka",pnl:"Paleni",pnm:"Punan Batu 1",pnn:"Pinai-Hagahai",pno:"Panobo",pnp:"Pancana",pnq:"Pana (Burkina Faso)",pnr:"Panim",pns:"Ponosakan",pnt:"Pontic",pnu:"Jiongnai Bunu",pnv:"Pinigura",pnw:"Panytyima",pnx:"Phong-Kniang",pny:"Pinyin",pnz:"Pana (Central African Republic)",poc:"Poqomam",poe:"San Juan Atzingo Popoloca",pof:"Poke",pog:"Potigu\xE1ra",poh:"Poqomchi'",poi:"Highland Popoluca",pok:"Pokang\xE1",pol:"Polish",pom:"Southeastern Pomo",pon:"Pohnpeian",poo:"Central Pomo",pop:"Pwapw\xE2",poq:"Texistepec Popoluca",por:"Portuguese",pos:"Sayula Popoluca",pot:"Potawatomi",pov:"Upper Guinea Crioulo",pow:"San Felipe Otlaltepec Popoloca",pox:"Polabian",poy:"Pogolo",ppe:"Papi",ppi:"Paipai",ppk:"Uma",ppl:"Pipil",ppm:"Papuma",ppn:"Papapana",ppo:"Folopa",ppp:"Pelende",ppq:"Pei",pps:"San Lu\xEDs Temalacayuca Popoloca",ppt:"Pare",ppu:"Papora",pqa:"Pa'a",pqm:"Malecite-Passamaquoddy",prc:"Parachi",prd:"Parsi-Dari",pre:"Principense",prf:"Paranan",prg:"Prussian",prh:"Porohanon",pri:"Paic\xEE",prk:"Parauk",prl:"Peruvian Sign Language",prm:"Kibiri",prn:"Prasuni",pro:"Old Proven\xE7al (to 1500)",prp:"Parsi",prq:"Ash\xE9ninka Peren\xE9",prr:"Puri",prs:"Dari",prt:"Phai",pru:"Puragi",prw:"Parawen",prx:"Purik",prz:"Providencia Sign Language",psa:"Asue Awyu",psc:"Persian Sign Language",psd:"Plains Indian Sign Language",pse:"Central Malay",psg:"Penang Sign Language",psh:"Southwest Pashai",psi:"Southeast Pashai",psl:"Puerto Rican Sign Language",psm:"Pauserna",psn:"Panasuan",pso:"Polish Sign Language",psp:"Philippine Sign Language",psq:"Pasi",psr:"Portuguese Sign Language",pss:"Kaulong",pst:"Central Pashto",psu:"Sauraseni Pr\u0101krit",psw:"Port Sandwich",psy:"Piscataway",pta:"Pai Tavytera",pth:"Patax\xF3 H\xE3-Ha-H\xE3e",pti:"Pintiini",ptn:"Patani",pto:"Zo'\xE9",ptp:"Patep",ptq:"Pattapu",ptr:"Piamatsina",ptt:"Enrekang",ptu:"Bambam",ptv:"Port Vato",ptw:"Pentlatch",pty:"Pathiya",pua:"Western Highland Purepecha",pub:"Purum",puc:"Punan Merap",pud:"Punan Aput",pue:"Puelche",puf:"Punan Merah",pug:"Phuie",pui:"Puinave",puj:"Punan Tubu",pum:"Puma",puo:"Puoc",pup:"Pulabu",puq:"Puquina",pur:"Purubor\xE1",pus:"Pushto",put:"Putoh",puu:"Punu",puw:"Puluwatese",pux:"Puare",puy:"Purisime\xF1o",pwa:"Pawaia",pwb:"Panawa",pwg:"Gapapaiwa",pwi:"Patwin",pwm:"Molbog",pwn:"Paiwan",pwo:"Pwo Western Karen",pwr:"Powari",pww:"Pwo Northern Karen",pxm:"Quetzaltepec Mixe",pye:"Pye Krumen",pym:"Fyam",pyn:"Poyan\xE1wa",pys:"Paraguayan Sign Language",pyu:"Puyuma",pyx:"Pyu (Myanmar)",pyy:"Pyen",pzn:"Para Naga",qaa:"Original audio",qad:"Audio Description",qua:"Quapaw",qub:"Huallaga Hu\xE1nuco Quechua",quc:"K'iche'",qud:"Calder\xF3n Highland Quichua",que:"Quechua",quf:"Lambayeque Quechua",qug:"Chimborazo Highland Quichua",quh:"South Bolivian Quechua",qui:"Quileute",quk:"Chachapoyas Quechua",qul:"North Bolivian Quechua",qum:"Sipacapense",qun:"Quinault",qup:"Southern Pastaza Quechua",quq:"Quinqui",qur:"Yanahuanca Pasco Quechua",qus:"Santiago del Estero Quichua",quv:"Sacapulteco",quw:"Tena Lowland Quichua",qux:"Yauyos Quechua",quy:"Ayacucho Quechua",quz:"Cusco Quechua",qva:"Ambo-Pasco Quechua",qvc:"Cajamarca Quechua",qve:"Eastern Apur\xEDmac Quechua",qvh:"Huamal\xEDes-Dos de Mayo Hu\xE1nuco Quechua",qvi:"Imbabura Highland Quichua",qvj:"Loja Highland Quichua",qvl:"Cajatambo North Lima Quechua",qvm:"Margos-Yarowilca-Lauricocha Quechua",qvn:"North Jun\xEDn Quechua",qvo:"Napo Lowland Quechua",qvp:"Pacaraos Quechua",qvs:"San Mart\xEDn Quechua",qvw:"Huaylla Wanca Quechua",qvy:"Queyu",qvz:"Northern Pastaza Quichua",qwa:"Corongo Ancash Quechua",qwc:"Classical Quechua",qwh:"Huaylas Ancash Quechua",qwm:"Kuman (Russia)",qws:"Sihuas Ancash Quechua",qwt:"Kwalhioqua-Tlatskanai",qxa:"Chiqui\xE1n Ancash Quechua",qxc:"Chincha Quechua",qxh:"Panao Hu\xE1nuco Quechua",qxl:"Salasaca Highland Quichua",qxn:"Northern Conchucos Ancash Quechua",qxo:"Southern Conchucos Ancash Quechua",qxp:"Puno Quechua",qxq:"Qashqa'i",qxr:"Ca\xF1ar Highland Quichua",qxs:"Southern Qiang",qxt:"Santa Ana de Tusi Pasco Quechua",qxu:"Arequipa-La Uni\xF3n Quechua",qxw:"Jauja Wanca Quechua",qya:"Quenya",qyp:"Quiripi",raa:"Dungmali",rab:"Camling",rac:"Rasawa",rad:"Rade",raf:"Western Meohang",rag:"Logooli",rah:"Rabha",rai:"Ramoaaina",raj:"Rajasthani",rak:"Tulu-Bohuai",ral:"Ralte",ram:"Canela",ran:"Riantana",rao:"Rao",rap:"Rapanui",raq:"Saam",rar:"Rarotongan",ras:"Tegali",rat:"Razajerdi",rau:"Raute",rav:"Sampang",raw:"Rawang",rax:"Rang",ray:"Rapa",raz:"Rahambuu",rbb:"Rumai Palaung",rbk:"Northern Bontok",rbl:"Miraya Bikol",rbp:"Barababaraba",rcf:"R\xE9union Creole French",rdb:"Rudbari",rea:"Rerau",reb:"Rembong",ree:"Rejang Kayan",reg:"Kara (Tanzania)",rei:"Reli",rej:"Rejang",rel:"Rendille",rem:"Remo",ren:"Rengao",rer:"Rer Bare",res:"Reshe",ret:"Retta",rey:"Reyesano",rga:"Roria",rge:"Romano-Greek",rgk:"Rangkas",rgn:"Romagnol",rgr:"Res\xEDgaro",rgs:"Southern Roglai",rgu:"Ringgou",rhg:"Rohingya",rhp:"Yahang",ria:"Riang (India)",rif:"Tarifit",ril:"Riang (Myanmar)",rim:"Nyaturu",rin:"Nungu",rir:"Ribun",rit:"Ritarungo",riu:"Riung",rjg:"Rajong",rji:"Raji",rjs:"Rajbanshi",rka:"Kraol",rkb:"Rikbaktsa",rkh:"Rakahanga-Manihiki",rki:"Rakhine",rkm:"Marka",rkt:"Rangpuri",rkw:"Arakwal",rma:"Rama",rmb:"Rembarunga",rmc:"Carpathian Romani",rmd:"Traveller Danish",rme:"Angloromani",rmf:"Kalo Finnish Romani",rmg:"Traveller Norwegian",rmh:"Murkim",rmi:"Lomavren",rmk:"Romkun",rml:"Baltic Romani",rmm:"Roma",rmn:"Balkan Romani",rmo:"Sinte Romani",rmp:"Rempi",rmq:"Cal\xF3",rms:"Romanian Sign Language",rmt:"Domari",rmu:"Tavringer Romani",rmv:"Romanova",rmw:"Welsh Romani",rmx:"Romam",rmy:"Vlax Romani",rmz:"Marma",rnd:"Ruund",rng:"Ronga",rnl:"Ranglong",rnn:"Roon",rnp:"Rongpo",rnr:"Nari Nari",rnw:"Rungwa",rob:"Tae'",roc:"Cacgia Roglai",rod:"Rogo",roe:"Ronji",rof:"Rombo",rog:"Northern Roglai",roh:"Romansh",rol:"Romblomanon",rom:"Romany",ron:"Romanian",roo:"Rotokas",rop:"Kriol",ror:"Rongga",rou:"Runga",row:"Dela-Oenale",rpn:"Repanbitip",rpt:"Rapting",rri:"Ririo",rro:"Waima",rrt:"Arritinngithigh",rsb:"Romano-Serbian",rsl:"Russian Sign Language",rsm:"Miriwoong Sign Language",rtc:"Rungtu Chin",rth:"Ratahan",rtm:"Rotuman",rts:"Yurats",rtw:"Rathawi",rub:"Gungu",ruc:"Ruuli",rue:"Rusyn",ruf:"Luguru",rug:"Roviana",ruh:"Ruga",rui:"Rufiji",ruk:"Che",run:"Rundi",ruo:"Istro Romanian",rup:"Macedo-Romanian",ruq:"Megleno Romanian",rus:"Russian",rut:"Rutul",ruu:"Lanas Lobu",ruy:"Mala (Nigeria)",ruz:"Ruma",rwa:"Rawo",rwk:"Rwa",rwm:"Amba (Uganda)",rwo:"Rawa",rwr:"Marwari (India)",rxd:"Ngardi",rxw:"Karuwali",ryn:"Northern Amami-Oshima",rys:"Yaeyama",ryu:"Central Okinawan",rzh:"R\u0101zi\u1E25\u012B",saa:"Saba",sab:"Buglere",sac:"Meskwaki",sad:"Sandawe",sae:"Saban\xEA",saf:"Safaliba",sag:"Sango",sah:"Yakut",saj:"Sahu",sak:"Sake",sam:"Samaritan Aramaic",san:"Sanskrit",sao:"Sause",saq:"Samburu",sar:"Saraveca",sas:"Sasak",sat:"Santali",sau:"Saleman",sav:"Saafi-Saafi",saw:"Sawi",sax:"Sa",say:"Saya",saz:"Saurashtra",sba:"Ngambay",sbb:"Simbo",sbc:"Kele (Papua New Guinea)",sbd:"Southern Samo",sbe:"Saliba",sbf:"Chabu",sbg:"Seget",sbh:"Sori-Harengan",sbi:"Seti",sbj:"Surbakhal",sbk:"Safwa",sbl:"Botolan Sambal",sbm:"Sagala",sbn:"Sindhi Bhil",sbo:"Sab\xFCm",sbp:"Sangu (Tanzania)",sbq:"Sileibi",sbr:"Sembakung Murut",sbs:"Subiya",sbt:"Kimki",sbu:"Stod Bhoti",sbv:"Sabine",sbw:"Simba",sbx:"Seberuang",sby:"Soli",sbz:"Sara Kaba",scb:"Chut",sce:"Dongxiang",scf:"San Miguel Creole French",scg:"Sanggau",sch:"Sakachep",sci:"Sri Lankan Creole Malay",sck:"Sadri",scl:"Shina",scn:"Sicilian",sco:"Scots",scp:"Helambu Sherpa",scq:"Sa'och",scs:"North Slavey",sct:"Southern Katang",scu:"Shumcho",scv:"Sheni",scw:"Sha",scx:"Sicel",sda:"Toraja-Sa'dan",sdb:"Shabak",sdc:"Sassarese Sardinian",sde:"Surubu",sdf:"Sarli",sdg:"Savi",sdh:"Southern Kurdish",sdj:"Suundi",sdk:"Sos Kundi",sdl:"Saudi Arabian Sign Language",sdm:"Semandang",sdn:"Gallurese Sardinian",sdo:"Bukar-Sadung Bidayuh",sdp:"Sherdukpen",sdr:"Oraon Sadri",sds:"Sened",sdt:"Shuadit",sdu:"Sarudu",sdx:"Sibu Melanau",sdz:"Sallands",sea:"Semai",seb:"Shempire Senoufo",sec:"Sechelt",sed:"Sedang",see:"Seneca",sef:"Cebaara Senoufo",seg:"Segeju",seh:"Sena",sei:"Seri",sej:"Sene",sek:"Sekani",sel:"Selkup",sen:"Nanerig\xE9 S\xE9noufo",seo:"Suarmin",sep:"S\xECc\xECt\xE9 S\xE9noufo",seq:"Senara S\xE9noufo",ser:"Serrano",ses:"Koyraboro Senni Songhai",set:"Sentani",seu:"Serui-Laut",sev:"Nyarafolo Senoufo",sew:"Sewa Bay",sey:"Secoya",sez:"Senthang Chin",sfb:"Langue des signes de Belgique Francophone",sfe:"Eastern Subanen",sfm:"Small Flowery Miao",sfs:"South African Sign Language",sfw:"Sehwi",sga:"Old Irish (to 900)",sgb:"Mag-antsi Ayta",sgc:"Kipsigis",sgd:"Surigaonon",sge:"Segai",sgg:"Swiss-German Sign Language",sgh:"Shughni",sgi:"Suga",sgj:"Surgujia",sgk:"Sangkong",sgm:"Singa",sgp:"Singpho",sgr:"Sangisari",sgs:"Samogitian",sgt:"Brokpake",sgu:"Salas",sgw:"Sebat Bet Gurage",sgx:"Sierra Leone Sign Language",sgy:"Sanglechi",sgz:"Sursurunga",sha:"Shall-Zwall",shb:"Ninam",shc:"Sonde",shd:"Kundal Shahi",she:"Sheko",shg:"Shua",shh:"Shoshoni",shi:"Tachelhit",shj:"Shatt",shk:"Shilluk",shl:"Shendu",shm:"Shahrudi",shn:"Shan",sho:"Shanga",shp:"Shipibo-Conibo",shq:"Sala",shr:"Shi",shs:"Shuswap",sht:"Shasta",shu:"Chadian Arabic",shv:"Shehri",shw:"Shwai",shx:"She",shy:"Tachawit",shz:"Syenara Senoufo",sia:"Akkala Sami",sib:"Sebop",sid:"Sidamo",sie:"Simaa",sif:"Siamou",sig:"Paasaal",sih:"Zire",sii:"Shom Peng",sij:"Numbami",sik:"Sikiana",sil:"Tumulung Sisaala",sim:"Mende (Papua New Guinea)",sin:"Sinhala",sip:"Sikkimese",siq:"Sonia",sir:"Siri",sis:"Siuslaw",siu:"Sinagen",siv:"Sumariup",siw:"Siwai",six:"Sumau",siy:"Sivandi",siz:"Siwi",sja:"Epena",sjb:"Sajau Basap",sjd:"Kildin Sami",sje:"Pite Sami",sjg:"Assangori",sjk:"Kemi Sami",sjl:"Sajalong",sjm:"Mapun",sjn:"Sindarin",sjo:"Xibe",sjp:"Surjapuri",sjr:"Siar-Lak",sjs:"Senhaja De Srair",sjt:"Ter Sami",sju:"Ume Sami",sjw:"Shawnee",ska:"Skagit",skb:"Saek",skc:"Ma Manda",skd:"Southern Sierra Miwok",ske:"Seke (Vanuatu)",skf:"Sakirabi\xE1",skg:"Sakalava Malagasy",skh:"Sikule",ski:"Sika",skj:"Seke (Nepal)",skm:"Kutong",skn:"Kolibugan Subanon",sko:"Seko Tengah",skp:"Sekapan",skq:"Sininkere",skr:"Saraiki",sks:"Maia",skt:"Sakata",sku:"Sakao",skv:"Skou",skw:"Skepi Creole Dutch",skx:"Seko Padang",sky:"Sikaiana",skz:"Sekar",slc:"S\xE1liba",sld:"Sissala",sle:"Sholaga",slf:"Swiss-Italian Sign Language",slg:"Selungai Murut",slh:"Southern Puget Sound Salish",sli:"Lower Silesian",slj:"Salum\xE1",slk:"Slovak",sll:"Salt-Yui",slm:"Pangutaran Sama",sln:"Salinan",slp:"Lamaholot",slq:"Salchuq",slr:"Salar",sls:"Singapore Sign Language",slt:"Sila",slu:"Selaru",slv:"Slovenian",slw:"Sialum",slx:"Salampasu",sly:"Selayar",slz:"Ma'ya",sma:"Southern Sami",smb:"Simbari",smc:"Som",smd:"Sama",sme:"Northern Sami",smf:"Auwe",smg:"Simbali",smh:"Samei",smj:"Lule Sami",smk:"Bolinao",sml:"Central Sama",smm:"Musasa",smn:"Inari Sami",smo:"Samoan",smp:"Samaritan",smq:"Samo",smr:"Simeulue",sms:"Skolt Sami",smt:"Simte",smu:"Somray",smv:"Samvedi",smw:"Sumbawa",smx:"Samba",smy:"Semnani",smz:"Simeku",sna:"Shona",snb:"Sebuyau",snc:"Sinaugoro",snd:"Sindhi",sne:"Bau Bidayuh",snf:"Noon",sng:"Sanga (Democratic Republic of Congo)",sni:"Sensi",snj:"Riverain Sango",snk:"Soninke",snl:"Sangil",snm:"Southern Ma'di",snn:"Siona",sno:"Snohomish",snp:"Siane",snq:"Sangu (Gabon)",snr:"Sihan",sns:"South West Bay",snu:"Senggi",snv:"Sa'ban",snw:"Selee",snx:"Sam",sny:"Saniyo-Hiyewe",snz:"Sinsauru",soa:"Thai Song",sob:"Sobei",soc:"So (Democratic Republic of Congo)",sod:"Songoora",soe:"Songomeno",sog:"Sogdian",soh:"Aka",soi:"Sonha",soj:"Soi",sok:"Sokoro",sol:"Solos",som:"Somali",soo:"Songo",sop:"Songe",soq:"Kanasi",sor:"Somrai",sos:"Seeku",sot:"Southern Sotho",sou:"Southern Thai",sov:"Sonsorol",sow:"Sowanda",sox:"Swo",soy:"Miyobe",soz:"Temi",spa:"Spanish",spb:"Sepa (Indonesia)",spc:"Sap\xE9",spd:"Saep",spe:"Sepa (Papua New Guinea)",spg:"Sian",spi:"Saponi",spk:"Sengo",spl:"Selepet",spm:"Akukem",spn:"Sanapan\xE1",spo:"Spokane",spp:"Supyire Senoufo",spq:"Loreto-Ucayali Spanish",spr:"Saparua",sps:"Saposa",spt:"Spiti Bhoti",spu:"Sapuan",spv:"Sambalpuri",spx:"South Picene",spy:"Sabaot",sqa:"Shama-Sambuga",sqh:"Shau",sqi:"Albanian",sqk:"Albanian Sign Language",sqm:"Suma",sqn:"Susquehannock",sqo:"Sorkhei",sqq:"Sou",sqr:"Siculo Arabic",sqs:"Sri Lankan Sign Language",sqt:"Soqotri",squ:"Squamish",sra:"Saruga",srb:"Sora",src:"Logudorese Sardinian",srd:"Sardinian",sre:"Sara",srf:"Nafi",srg:"Sulod",srh:"Sarikoli",sri:"Siriano",srk:"Serudung Murut",srl:"Isirawa",srm:"Saramaccan",srn:"Sranan Tongo",sro:"Campidanese Sardinian",srp:"Serbian",srq:"Sirion\xF3",srr:"Serer",srs:"Sarsi",srt:"Sauri",sru:"Suru\xED",srv:"Southern Sorsoganon",srw:"Serua",srx:"Sirmauri",sry:"Sera",srz:"Shahmirzadi",ssb:"Southern Sama",ssc:"Suba-Simbiti",ssd:"Siroi",sse:"Balangingi",ssf:"Thao",ssg:"Seimat",ssh:"Shihhi Arabic",ssi:"Sansi",ssj:"Sausi",ssk:"Sunam",ssl:"Western Sisaala",ssm:"Semnam",ssn:"Waata",sso:"Sissano",ssp:"Spanish Sign Language",ssq:"So'a",ssr:"Swiss-French Sign Language",sss:"S\xF4",sst:"Sinasina",ssu:"Susuami",ssv:"Shark Bay",ssw:"Swati",ssx:"Samberigi",ssy:"Saho",ssz:"Sengseng",sta:"Settla",stb:"Northern Subanen",std:"Sentinel",ste:"Liana-Seti",stf:"Seta",stg:"Trieng",sth:"Shelta",sti:"Bulo Stieng",stj:"Matya Samo",stk:"Arammba",stl:"Stellingwerfs",stm:"Setaman",stn:"Owa",sto:"Stoney",stp:"Southeastern Tepehuan",stq:"Saterfriesisch",str:"Straits Salish",sts:"Shumashti",stt:"Budeh Stieng",stu:"Samtao",stv:"Silt'e",stw:"Satawalese",sty:"Siberian Tatar",sua:"Sulka",sub:"Suku",suc:"Western Subanon",sue:"Suena",sug:"Suganga",sui:"Suki",suj:"Shubi",suk:"Sukuma",sun:"Sundanese",suq:"Suri",sur:"Mwaghavul",sus:"Susu",sut:"Subtiaba",suv:"Puroik",suw:"Sumbwa",sux:"Sumerian",suy:"Suy\xE1",suz:"Sunwar",sva:"Svan",svb:"Ulau-Suain",svc:"Vincentian Creole English",sve:"Serili",svk:"Slovakian Sign Language",svm:"Slavomolisano",svs:"Savosavo",svx:"Skalvian",swa:"Swahili (macrolanguage)",swb:"Maore Comorian",swc:"Congo Swahili",swe:"Swedish",swf:"Sere",swg:"Swabian",swh:"Swahili (individual language)",swi:"Sui",swj:"Sira",swk:"Malawi Sena",swl:"Swedish Sign Language",swm:"Samosa",swn:"Sawknah",swo:"Shanenawa",swp:"Suau",swq:"Sharwa",swr:"Saweru",sws:"Seluwasan",swt:"Sawila",swu:"Suwawa",swv:"Shekhawati",sww:"Sowa",swx:"Suruah\xE1",swy:"Sarua",sxb:"Suba",sxc:"Sicanian",sxe:"Sighu",sxg:"Shixing",sxk:"Southern Kalapuya",sxl:"Selian",sxm:"Samre",sxn:"Sangir",sxo:"Sorothaptic",sxr:"Saaroa",sxs:"Sasaru",sxu:"Upper Saxon",sxw:"Saxwe Gbe",sya:"Siang",syb:"Central Subanen",syc:"Classical Syriac",syi:"Seki",syk:"Sukur",syl:"Sylheti",sym:"Maya Samo",syn:"Senaya",syo:"Suoy",syr:"Syriac",sys:"Sinyar",syw:"Kagate",syx:"Samay",syy:"Al-Sayyid Bedouin Sign Language",sza:"Semelai",szb:"Ngalum",szc:"Semaq Beri",szd:"Seru",sze:"Seze",szg:"Sengele",szl:"Silesian",szn:"Sula",szp:"Suabo",szs:"Solomon Islands Sign Language",szv:"Isu (Fako Division)",szw:"Sawai",taa:"Lower Tanana",tab:"Tabassaran",tac:"Lowland Tarahumara",tad:"Tause",tae:"Tariana",taf:"Tapirap\xE9",tag:"Tagoi",tah:"Tahitian",taj:"Eastern Tamang",tak:"Tala",tal:"Tal",tam:"Tamil",tan:"Tangale",tao:"Yami",tap:"Taabwa",taq:"Tamasheq",tar:"Central Tarahumara",tas:"Tay Boi",tat:"Tatar",tau:"Upper Tanana",tav:"Tatuyo",taw:"Tai",tax:"Tamki",tay:"Atayal",taz:"Tocho",tba:"Aikan\xE3",tbb:"Tapeba",tbc:"Takia",tbd:"Kaki Ae",tbe:"Tanimbili",tbf:"Mandara",tbg:"North Tairora",tbh:"Thurawal",tbi:"Gaam",tbj:"Tiang",tbk:"Calamian Tagbanwa",tbl:"Tboli",tbm:"Tagbu",tbn:"Barro Negro Tunebo",tbo:"Tawala",tbp:"Taworta",tbr:"Tumtum",tbs:"Tanguat",tbt:"Tembo (Kitembo)",tbu:"Tubar",tbv:"Tobo",tbw:"Tagbanwa",tbx:"Kapin",tby:"Tabaru",tbz:"Ditammari",tca:"Ticuna",tcb:"Tanacross",tcc:"Datooga",tcd:"Tafi",tce:"Southern Tutchone",tcf:"Malinaltepec Me'phaa",tcg:"Tamagario",tch:"Turks And Caicos Creole English",tci:"W\xE1ra",tck:"Tchitchege",tcl:"Taman (Myanmar)",tcm:"Tanahmerah",tcn:"Tichurong",tco:"Taungyo",tcp:"Tawr Chin",tcq:"Kaiy",tcs:"Torres Strait Creole",tct:"T'en",tcu:"Southeastern Tarahumara",tcw:"Tecpatl\xE1n Totonac",tcx:"Toda",tcy:"Tulu",tcz:"Thado Chin",tda:"Tagdal",tdb:"Panchpargania",tdc:"Ember\xE1-Tad\xF3",tdd:"Tai N\xFCa",tde:"Tiranige Diga Dogon",tdf:"Talieng",tdg:"Western Tamang",tdh:"Thulung",tdi:"Tomadino",tdj:"Tajio",tdk:"Tambas",tdl:"Sur",tdm:"Taruma",tdn:"Tondano",tdo:"Teme",tdq:"Tita",tdr:"Todrah",tds:"Doutai",tdt:"Tetun Dili",tdv:"Toro",tdx:"Tandroy-Mahafaly Malagasy",tdy:"Tadyawan",tea:"Temiar",teb:"Tetete",tec:"Terik",ted:"Tepo Krumen",tee:"Huehuetla Tepehua",tef:"Teressa",teg:"Teke-Tege",teh:"Tehuelche",tei:"Torricelli",tek:"Ibali Teke",tel:"Telugu",tem:"Timne",ten:"Tama (Colombia)",teo:"Teso",tep:"Tepecano",teq:"Temein",ter:"Tereno",tes:"Tengger",tet:"Tetum",teu:"Soo",tev:"Teor",tew:"Tewa (USA)",tex:"Tennet",tey:"Tulishi",tfi:"Tofin Gbe",tfn:"Tanaina",tfo:"Tefaro",tfr:"Teribe",tft:"Ternate",tga:"Sagalla",tgb:"Tobilung",tgc:"Tigak",tgd:"Ciwogai",tge:"Eastern Gorkha Tamang",tgf:"Chalikha",tgh:"Tobagonian Creole English",tgi:"Lawunuia",tgj:"Tagin",tgk:"Tajik",tgl:"Tagalog",tgn:"Tandaganon",tgo:"Sudest",tgp:"Tangoa",tgq:"Tring",tgr:"Tareng",tgs:"Nume",tgt:"Central Tagbanwa",tgu:"Tanggu",tgv:"Tingui-Boto",tgw:"Tagwana Senoufo",tgx:"Tagish",tgy:"Togoyo",tgz:"Tagalaka",tha:"Thai",thd:"Thayore",the:"Chitwania Tharu",thf:"Thangmi",thh:"Northern Tarahumara",thi:"Tai Long",thk:"Tharaka",thl:"Dangaura Tharu",thm:"Aheu",thn:"Thachanadan",thp:"Thompson",thq:"Kochila Tharu",thr:"Rana Tharu",ths:"Thakali",tht:"Tahltan",thu:"Thuri",thv:"Tahaggart Tamahaq",thw:"Thudam",thy:"Tha",thz:"Tayart Tamajeq",tia:"Tidikelt Tamazight",tic:"Tira",tif:"Tifal",tig:"Tigre",tih:"Timugon Murut",tii:"Tiene",tij:"Tilung",tik:"Tikar",til:"Tillamook",tim:"Timbe",tin:"Tindi",tio:"Teop",tip:"Trimuris",tiq:"Ti\xE9fo",tir:"Tigrinya",tis:"Masadiit Itneg",tit:"Tinigua",tiu:"Adasen",tiv:"Tiv",tiw:"Tiwi",tix:"Southern Tiwa",tiy:"Tiruray",tiz:"Tai Hongjin",tja:"Tajuasohn",tjg:"Tunjung",tji:"Northern Tujia",tjl:"Tai Laing",tjm:"Timucua",tjn:"Tonjon",tjo:"Temacine Tamazight",tjs:"Southern Tujia",tju:"Tjurruru",tjw:"Djabwurrung",tka:"Truk\xE1",tkb:"Buksa",tkd:"Tukudede",tke:"Takwane",tkf:"Tukumanf\xE9d",tkg:"Tesaka Malagasy",tkl:"Tokelau",tkm:"Takelma",tkn:"Toku-No-Shima",tkp:"Tikopia",tkq:"Tee",tkr:"Tsakhur",tks:"Takestani",tkt:"Kathoriya Tharu",tku:"Upper Necaxa Totonac",tkv:"Mur Pano",tkw:"Teanu",tkx:"Tangko",tkz:"Takua",tla:"Southwestern Tepehuan",tlb:"Tobelo",tlc:"Yecuatla Totonac",tld:"Talaud",tlf:"Telefol",tlg:"Tofanma",tlh:"Klingon",tli:"Tlingit",tlj:"Talinga-Bwisi",tlk:"Taloki",tll:"Tetela",tlm:"Tolomako",tln:"Talondo'",tlo:"Talodi",tlp:"Filomena Mata-Coahuitl\xE1n Totonac",tlq:"Tai Loi",tlr:"Talise",tls:"Tambotalo",tlt:"Sou Nama",tlu:"Tulehu",tlv:"Taliabu",tlx:"Khehek",tly:"Talysh",tma:"Tama (Chad)",tmb:"Katbol",tmc:"Tumak",tmd:"Haruai",tme:"Trememb\xE9",tmf:"Toba-Maskoy",tmg:"Ternate\xF1o",tmh:"Tamashek",tmi:"Tutuba",tmj:"Samarokena",tmk:"Northwestern Tamang",tml:"Tamnim Citak",tmm:"Tai Thanh",tmn:"Taman (Indonesia)",tmo:"Temoq",tmq:"Tumleo",tmr:"Jewish Babylonian Aramaic (ca. 200-1200 CE)",tms:"Tima",tmt:"Tasmate",tmu:"Iau",tmv:"Tembo (Motembo)",tmw:"Temuan",tmy:"Tami",tmz:"Tamanaku",tna:"Tacana",tnb:"Western Tunebo",tnc:"Tanimuca-Retuar\xE3",tnd:"Angosturas Tunebo",tng:"Tobanga",tnh:"Maiani",tni:"Tandia",tnk:"Kwamera",tnl:"Lenakel",tnm:"Tabla",tnn:"North Tanna",tno:"Toromono",tnp:"Whitesands",tnq:"Taino",tnr:"M\xE9nik",tns:"Tenis",tnt:"Tontemboan",tnu:"Tay Khang",tnv:"Tangchangya",tnw:"Tonsawang",tnx:"Tanema",tny:"Tongwe",tnz:"Ten'edn",tob:"Toba",toc:"Coyutla Totonac",tod:"Toma",tof:"Gizrra",tog:"Tonga (Nyasa)",toh:"Gitonga",toi:"Tonga (Zambia)",toj:"Tojolabal",tol:"Tolowa",tom:"Tombulu",ton:"Tonga (Tonga Islands)",too:"Xicotepec De Ju\xE1rez Totonac",top:"Papantla Totonac",toq:"Toposa",tor:"Togbo-Vara Banda",tos:"Highland Totonac",tou:"Tho",tov:"Upper Taromi",tow:"Jemez",tox:"Tobian",toy:"Topoiyo",toz:"To",tpa:"Taupota",tpc:"Azoy\xFA Me'phaa",tpe:"Tippera",tpf:"Tarpia",tpg:"Kula",tpi:"Tok Pisin",tpj:"Tapiet\xE9",tpk:"Tupinikin",tpl:"Tlacoapa Me'phaa",tpm:"Tampulma",tpn:"Tupinamb\xE1",tpo:"Tai Pao",tpp:"Pisaflores Tepehua",tpq:"Tukpa",tpr:"Tupar\xED",tpt:"Tlachichilco Tepehua",tpu:"Tampuan",tpv:"Tanapag",tpw:"Tup\xED",tpx:"Acatepec Me'phaa",tpy:"Trumai",tpz:"Tinputz",tqb:"Temb\xE9",tql:"Lehali",tqm:"Turumsa",tqn:"Tenino",tqo:"Toaripi",tqp:"Tomoip",tqq:"Tunni",tqr:"Torona",tqt:"Western Totonac",tqu:"Touo",tqw:"Tonkawa",tra:"Tirahi",trb:"Terebu",trc:"Copala Triqui",trd:"Turi",tre:"East Tarangan",trf:"Trinidadian Creole English",trg:"Lish\xE1n Did\xE1n",trh:"Turaka",tri:"Tri\xF3",trj:"Toram",trl:"Traveller Scottish",trm:"Tregami",trn:"Trinitario",tro:"Tarao Naga",trp:"Kok Borok",trq:"San Mart\xEDn Itunyoso Triqui",trr:"Taushiro",trs:"Chicahuaxtla Triqui",trt:"Tunggare",tru:"Turoyo",trv:"Taroko",trw:"Torwali",trx:"Tringgus-Sembaan Bidayuh",try:"Turung",trz:"Tor\xE1",tsa:"Tsaangi",tsb:"Tsamai",tsc:"Tswa",tsd:"Tsakonian",tse:"Tunisian Sign Language",tsg:"Tausug",tsh:"Tsuvan",tsi:"Tsimshian",tsj:"Tshangla",tsk:"Tseku",tsl:"Ts'\xFCn-Lao",tsm:"Turkish Sign Language",tsn:"Tswana",tso:"Tsonga",tsp:"Northern Toussian",tsq:"Thai Sign Language",tsr:"Akei",tss:"Taiwan Sign Language",tst:"Tondi Songway Kiini",tsu:"Tsou",tsv:"Tsogo",tsw:"Tsishingini",tsx:"Mubami",tsy:"Tebul Sign Language",tsz:"Purepecha",tta:"Tutelo",ttb:"Gaa",ttc:"Tektiteko",ttd:"Tauade",tte:"Bwanabwana",ttf:"Tuotomb",ttg:"Tutong",tth:"Upper Ta'oih",tti:"Tobati",ttj:"Tooro",ttk:"Totoro",ttl:"Totela",ttm:"Northern Tutchone",ttn:"Towei",tto:"Lower Ta'oih",ttp:"Tombelala",ttq:"Tawallammat Tamajaq",ttr:"Tera",tts:"Northeastern Thai",ttt:"Muslim Tat",ttu:"Torau",ttv:"Titan",ttw:"Long Wat",tty:"Sikaritai",ttz:"Tsum",tua:"Wiarumus",tub:"T\xFCbatulabal",tuc:"Mutu",tud:"Tux\xE1",tue:"Tuyuca",tuf:"Central Tunebo",tug:"Tunia",tuh:"Taulil",tui:"Tupuri",tuj:"Tugutil",tuk:"Turkmen",tul:"Tula",tum:"Tumbuka",tun:"Tunica",tuo:"Tucano",tuq:"Tedaga",tur:"Turkish",tus:"Tuscarora",tuu:"Tututni",tuv:"Turkana",tux:"Tuxin\xE1wa",tuy:"Tugen",tuz:"Turka",tva:"Vaghua",tvd:"Tsuvadi",tve:"Te'un",tvk:"Southeast Ambrym",tvl:"Tuvalu",tvm:"Tela-Masbuar",tvn:"Tavoyan",tvo:"Tidore",tvs:"Taveta",tvt:"Tutsa Naga",tvu:"Tunen",tvw:"Sedoa",tvy:"Timor Pidgin",twa:"Twana",twb:"Western Tawbuid",twc:"Teshenawa",twd:"Twents",twe:"Tewa (Indonesia)",twf:"Northern Tiwa",twg:"Tereweng",twh:"Tai D\xF3n",twi:"Twi",twl:"Tawara",twm:"Tawang Monpa",twn:"Twendi",two:"Tswapong",twp:"Ere",twq:"Tasawaq",twr:"Southwestern Tarahumara",twt:"Turiw\xE1ra",twu:"Termanu",tww:"Tuwari",twx:"Tewe",twy:"Tawoyan",txa:"Tombonuo",txb:"Tokharian B",txc:"Tsetsaut",txe:"Totoli",txg:"Tangut",txh:"Thracian",txi:"Ikpeng",txj:"Tarjumo",txm:"Tomini",txn:"West Tarangan",txo:"Toto",txq:"Tii",txr:"Tartessian",txs:"Tonsea",txt:"Citak",txu:"Kayap\xF3",txx:"Tatana",txy:"Tanosy Malagasy",tya:"Tauya",tye:"Kyanga",tyh:"O'du",tyi:"Teke-Tsaayi",tyj:"Tai Do",tyl:"Thu Lao",tyn:"Kombai",typ:"Thaypan",tyr:"Tai Daeng",tys:"T\xE0y Sa Pa",tyt:"T\xE0y Tac",tyu:"Kua",tyv:"Tuvinian",tyx:"Teke-Tyee",tyz:"T\xE0y",tza:"Tanzanian Sign Language",tzh:"Tzeltal",tzj:"Tz'utujil",tzl:"Talossan",tzm:"Central Atlas Tamazight",tzn:"Tugun",tzo:"Tzotzil",tzx:"Tabriak",uam:"Uamu\xE9",uan:"Kuan",uar:"Tairuma",uba:"Ubang",ubi:"Ubi",ubl:"Buhi'non Bikol",ubr:"Ubir",ubu:"Umbu-Ungu",uby:"Ubykh",uda:"Uda",ude:"Udihe",udg:"Muduga",udi:"Udi",udj:"Ujir",udl:"Wuzlam",udm:"Udmurt",udu:"Uduk",ues:"Kioko",ufi:"Ufim",uga:"Ugaritic",ugb:"Kuku-Ugbanh",uge:"Ughele",ugn:"Ugandan Sign Language",ugo:"Ugong",ugy:"Uruguayan Sign Language",uha:"Uhami",uhn:"Damal",uig:"Uighur",uis:"Uisai",uiv:"Iyive",uji:"Tanjijili",uka:"Kaburi",ukg:"Ukuriguma",ukh:"Ukhwejo",ukk:"Muak Sa-aak",ukl:"Ukrainian Sign Language",ukp:"Ukpe-Bayobiri",ukq:"Ukwa",ukr:"Ukrainian",uks:"Urub\xFA-Kaapor Sign Language",uku:"Ukue",ukw:"Ukwuani-Aboh-Ndoni",uky:"Kuuk-Yak",ula:"Fungwa",ulb:"Ulukwumi",ulc:"Ulch",ule:"Lule",ulf:"Usku",uli:"Ulithian",ulk:"Meriam",ull:"Ullatan",ulm:"Ulumanda'",uln:"Unserdeutsch",ulu:"Uma' Lung",ulw:"Ulwa",uma:"Umatilla",umb:"Umbundu",umc:"Marrucinian",umd:"Umbindhamu",umg:"Umbuygamu",umi:"Ukit",umm:"Umon",umn:"Makyan Naga",umo:"Umot\xEDna",ump:"Umpila",umr:"Umbugarla",ums:"Pendau",umu:"Munsee",una:"North Watut",und:"Undetermined",une:"Uneme",ung:"Ngarinyin",unk:"Enawen\xE9-Naw\xE9",unm:"Unami",unn:"Kurnai",unr:"Mundari",unu:"Unubahe",unx:"Munda",unz:"Unde Kaili",upi:"Umeda",upv:"Uripiv-Wala-Rano-Atchin",ura:"Urarina",urb:"Urub\xFA-Kaapor",urc:"Urningangg",urd:"Urdu",ure:"Uru",urf:"Uradhi",urg:"Urigina",urh:"Urhobo",uri:"Urim",urk:"Urak Lawoi'",url:"Urali",urm:"Urapmin",urn:"Uruangnirin",uro:"Ura (Papua New Guinea)",urp:"Uru-Pa-In",urr:"Lehalurup",urt:"Urat",uru:"Urumi",urv:"Uruava",urw:"Sop",urx:"Urimo",ury:"Orya",urz:"Uru-Eu-Wau-Wau",usa:"Usarufa",ush:"Ushojo",usi:"Usui",usk:"Usaghade",usp:"Uspanteco",usu:"Uya",uta:"Otank",ute:"Ute-Southern Paiute",utp:"Amba (Solomon Islands)",utr:"Etulo",utu:"Utu",uum:"Urum",uun:"Kulon-Pazeh",uur:"Ura (Vanuatu)",uuu:"U",uve:"West Uvean",uvh:"Uri",uvl:"Lote",uwa:"Kuku-Uwanh",uya:"Doko-Uyanga",uzb:"Uzbek",uzn:"Northern Uzbek",uzs:"Southern Uzbek",vaa:"Vaagri Booli",vae:"Vale",vaf:"Vafsi",vag:"Vagla",vah:"Varhadi-Nagpuri",vai:"Vai",vaj:"Sekele",val:"Vehes",vam:"Vanimo",van:"Valman",vao:"Vao",vap:"Vaiphei",var:"Huarijio",vas:"Vasavi",vau:"Vanuma",vav:"Varli",vay:"Wayu",vbb:"Southeast Babar",vbk:"Southwestern Bontok",vec:"Venetian",ved:"Veddah",vel:"Veluws",vem:"Vemgo-Mabas",ven:"Venda",veo:"Venture\xF1o",vep:"Veps",ver:"Mom Jango",vgr:"Vaghri",vgt:"Vlaamse Gebarentaal",vic:"Virgin Islands Creole English",vid:"Vidunda",vie:"Vietnamese",vif:"Vili",vig:"Viemo",vil:"Vilela",vin:"Vinza",vis:"Vishavan",vit:"Viti",viv:"Iduna",vka:"Kariyarra",vki:"Ija-Zuba",vkj:"Kujarge",vkk:"Kaur",vkl:"Kulisusu",vkm:"Kamakan",vko:"Kodeoha",vkp:"Korlai Creole Portuguese",vkt:"Tenggarong Kutai Malay",vku:"Kurrama",vlp:"Valpei",vls:"Vlaams",vma:"Martuyhunira",vmb:"Barbaram",vmc:"Juxtlahuaca Mixtec",vmd:"Mudu Koraga",vme:"East Masela",vmf:"Mainfr\xE4nkisch",vmg:"Lungalunga",vmh:"Maraghei",vmi:"Miwa",vmj:"Ixtayutla Mixtec",vmk:"Makhuwa-Shirima",vml:"Malgana",vmm:"Mitlatongo Mixtec",vmp:"Soyaltepec Mazatec",vmq:"Soyaltepec Mixtec",vmr:"Marenje",vms:"Moksela",vmu:"Muluridyi",vmv:"Valley Maidu",vmw:"Makhuwa",vmx:"Tamazola Mixtec",vmy:"Ayautla Mazatec",vmz:"Mazatl\xE1n Mazatec",vnk:"Vano",vnm:"Vinmavis",vnp:"Vunapu",vol:"Volap\xFCk",vor:"Voro",vot:"Votic",vra:"Vera'a",vro:"V\xF5ro",vrs:"Varisi",vrt:"Burmbar",vsi:"Moldova Sign Language",vsl:"Venezuelan Sign Language",vsv:"Valencian Sign Language",vto:"Vitou",vum:"Vumbu",vun:"Vunjo",vut:"Vute",vwa:"Awa (China)",waa:"Walla Walla",wab:"Wab",wac:"Wasco-Wishram",wad:"Wandamen",wae:"Walser",waf:"Wakon\xE1",wag:"Wa'ema",wah:"Watubela",wai:"Wares",waj:"Waffa",wal:"Wolaytta",wam:"Wampanoag",wan:"Wan",wao:"Wappo",wap:"Wapishana",waq:"Wageman",war:"Waray (Philippines)",was:"Washo",wat:"Kaninuwa",wau:"Waur\xE1",wav:"Waka",waw:"Waiwai",wax:"Watam",way:"Wayana",waz:"Wampur",wba:"Warao",wbb:"Wabo",wbe:"Waritai",wbf:"Wara",wbh:"Wanda",wbi:"Vwanji",wbj:"Alagwa",wbk:"Waigali",wbl:"Wakhi",wbm:"Wa",wbp:"Warlpiri",wbq:"Waddar",wbr:"Wagdi",wbs:"West Bengal Sign Language",wbt:"Wanman",wbv:"Wajarri",wbw:"Woi",wca:"Yanom\xE1mi",wci:"Waci Gbe",wdd:"Wandji",wdg:"Wadaginam",wdj:"Wadjiginy",wdk:"Wadikali",wdu:"Wadjigu",wdy:"Wadjabangayi",wea:"Wewaw",wec:"W\xE8 Western",wed:"Wedau",weg:"Wergaia",weh:"Weh",wei:"Kiunum",wem:"Weme Gbe",weo:"Wemale",wep:"Westphalien",wer:"Weri",wes:"Cameroon Pidgin",wet:"Perai",weu:"Rawngtu Chin",wew:"Wejewa",wfg:"Yafi",wga:"Wagaya",wgb:"Wagawaga",wgg:"Wangganguru",wgi:"Wahgi",wgo:"Waigeo",wgu:"Wirangu",wgy:"Warrgamay",wha:"Sou Upaa",whg:"North Wahgi",whk:"Wahau Kenyah",whu:"Wahau Kayan",wib:"Southern Toussian",wic:"Wichita",wie:"Wik-Epa",wif:"Wik-Keyangan",wig:"Wik-Ngathana",wih:"Wik-Me'anha",wii:"Minidien",wij:"Wik-Iiyanh",wik:"Wikalkan",wil:"Wilawila",wim:"Wik-Mungkan",win:"Ho-Chunk",wir:"Wiraf\xE9d",wiu:"Wiru",wiv:"Vitu",wiy:"Wiyot",wja:"Waja",wji:"Warji",wka:"Kw'adza",wkb:"Kumbaran",wkd:"Wakde",wkl:"Kalanadi",wku:"Kunduvadi",wkw:"Wakawaka",wky:"Wangkayutyuru",wla:"Walio",wlc:"Mwali Comorian",wle:"Wolane",wlg:"Kunbarlang",wli:"Waioli",wlk:"Wailaki",wll:"Wali (Sudan)",wlm:"Middle Welsh",wln:"Walloon",wlo:"Wolio",wlr:"Wailapa",wls:"Wallisian",wlu:"Wuliwuli",wlv:"Wich\xED Lhamt\xE9s Vejoz",wlw:"Walak",wlx:"Wali (Ghana)",wly:"Waling",wma:"Mawa (Nigeria)",wmb:"Wambaya",wmc:"Wamas",wmd:"Mamaind\xE9",wme:"Wambule",wmh:"Waima'a",wmi:"Wamin",wmm:"Maiwa (Indonesia)",wmn:"Waamwang",wmo:"Wom (Papua New Guinea)",wms:"Wambon",wmt:"Walmajarri",wmw:"Mwani",wmx:"Womo",wnb:"Wanambre",wnc:"Wantoat",wnd:"Wandarang",wne:"Waneci",wng:"Wanggom",wni:"Ndzwani Comorian",wnk:"Wanukaka",wnm:"Wanggamala",wnn:"Wunumara",wno:"Wano",wnp:"Wanap",wnu:"Usan",wnw:"Wintu",wny:"Wanyi",woa:"Tyaraity",wob:"W\xE8 Northern",woc:"Wogeo",wod:"Wolani",woe:"Woleaian",wof:"Gambian Wolof",wog:"Wogamusin",woi:"Kamang",wok:"Longto",wol:"Wolof",wom:"Wom (Nigeria)",won:"Wongo",woo:"Manombai",wor:"Woria",wos:"Hanga Hundi",wow:"Wawonii",woy:"Weyto",wpc:"Maco",wra:"Warapu",wrb:"Warluwara",wrd:"Warduji",wrg:"Warungu",wrh:"Wiradhuri",wri:"Wariyangga",wrk:"Garrwa",wrl:"Warlmanpa",wrm:"Warumungu",wrn:"Warnang",wro:"Worrorra",wrp:"Waropen",wrr:"Wardaman",wrs:"Waris",wru:"Waru",wrv:"Waruna",wrw:"Gugu Warra",wrx:"Wae Rana",wry:"Merwari",wrz:"Waray (Australia)",wsa:"Warembori",wsg:"Adilabad Gondi",wsi:"Wusi",wsk:"Waskia",wsr:"Owenia",wss:"Wasa",wsu:"Wasu",wsv:"Wotapuri-Katarqalai",wtf:"Watiwa",wth:"Wathawurrung",wti:"Berta",wtk:"Watakataui",wtm:"Mewati",wtw:"Wotu",wua:"Wikngenchera",wub:"Wunambal",wud:"Wudu",wuh:"Wutunhua",wul:"Silimo",wum:"Wumbvu",wun:"Bungu",wur:"Wurrugu",wut:"Wutung",wuu:"Wu Chinese",wuv:"Wuvulu-Aua",wux:"Wulna",wuy:"Wauyai",wwa:"Waama",wwb:"Wakabunga",wwo:"Wetamut",wwr:"Warrwa",www:"Wawa",wxa:"Waxianghua",wxw:"Wardandi",wya:"Wyandot",wyb:"Wangaaybuwan-Ngiyambaa",wyi:"Woiwurrung",wym:"Wymysorys",wyr:"Wayor\xF3",wyy:"Western Fijian",xaa:"Andalusian Arabic",xab:"Sambe",xac:"Kachari",xad:"Adai",xae:"Aequian",xag:"Aghwan",xai:"Kaimb\xE9",xaj:"Ararandew\xE1ra",xak:"M\xE1ku",xal:"Kalmyk",xam:"/Xam",xan:"Xamtanga",xao:"Khao",xap:"Apalachee",xaq:"Aquitanian",xar:"Karami",xas:"Kamas",xat:"Katawixi",xau:"Kauwera",xav:"Xav\xE1nte",xaw:"Kawaiisu",xay:"Kayan Mahakam",xbb:"Lower Burdekin",xbc:"Bactrian",xbd:"Bindal",xbe:"Bigambal",xbg:"Bunganditj",xbi:"Kombio",xbj:"Birrpayi",xbm:"Middle Breton",xbn:"Kenaboi",xbo:"Bolgarian",xbp:"Bibbulman",xbr:"Kambera",xbw:"Kambiw\xE1",xby:"Batyala",xcb:"Cumbric",xcc:"Camunic",xce:"Celtiberian",xcg:"Cisalpine Gaulish",xch:"Chemakum",xcl:"Classical Armenian",xcm:"Comecrudo",xcn:"Cotoname",xco:"Chorasmian",xcr:"Carian",xct:"Classical Tibetan",xcu:"Curonian",xcv:"Chuvantsy",xcw:"Coahuilteco",xcy:"Cayuse",xda:"Darkinyung",xdc:"Dacian",xdk:"Dharuk",xdm:"Edomite",xdo:"Kwandu",xdy:"Malayic Dayak",xeb:"Eblan",xed:"Hdi",xeg:"//Xegwi",xel:"Kelo",xem:"Kembayan",xep:"Epi-Olmec",xer:"Xer\xE9nte",xes:"Kesawai",xet:"Xet\xE1",xeu:"Keoru-Ahia",xfa:"Faliscan",xga:"Galatian",xgb:"Gbin",xgd:"Gudang",xgf:"Gabrielino-Fernande\xF1o",xgg:"Goreng",xgi:"Garingbal",xgl:"Galindan",xgm:"Dharumbal",xgr:"Garza",xgu:"Unggumi",xgw:"Guwa",xha:"Harami",xhc:"Hunnic",xhd:"Hadrami",xhe:"Khetrani",xho:"Xhosa",xhr:"Hernican",xht:"Hattic",xhu:"Hurrian",xhv:"Khua",xib:"Iberian",xii:"Xiri",xil:"Illyrian",xin:"Xinca",xir:"Xiri\xE2na",xis:"Kisan",xiv:"Indus Valley Language",xiy:"Xipaya",xjb:"Minjungbal",xjt:"Jaitmatang",xka:"Kalkoti",xkb:"Northern Nago",xkc:"Kho'ini",xkd:"Mendalam Kayan",xke:"Kereho",xkf:"Khengkha",xkg:"Kagoro",xki:"Kenyan Sign Language",xkj:"Kajali",xkk:"Kaco'",xkl:"Mainstream Kenyah",xkn:"Kayan River Kayan",xko:"Kiorr",xkp:"Kabatei",xkq:"Koroni",xkr:"Xakriab\xE1",xks:"Kumbewaha",xkt:"Kantosi",xku:"Kaamba",xkv:"Kgalagadi",xkw:"Kembra",xkx:"Karore",xky:"Uma' Lasan",xkz:"Kurtokha",xla:"Kamula",xlb:"Loup B",xlc:"Lycian",xld:"Lydian",xle:"Lemnian",xlg:"Ligurian (Ancient)",xli:"Liburnian",xln:"Alanic",xlo:"Loup A",xlp:"Lepontic",xls:"Lusitanian",xlu:"Cuneiform Luwian",xly:"Elymian",xma:"Mushungulu",xmb:"Mbonga",xmc:"Makhuwa-Marrevone",xmd:"Mbudum",xme:"Median",xmf:"Mingrelian",xmg:"Mengaka",xmh:"Kuku-Muminh",xmj:"Majera",xmk:"Ancient Macedonian",xml:"Malaysian Sign Language",xmm:"Manado Malay",xmn:"Manichaean Middle Persian",xmo:"Morerebi",xmp:"Kuku-Mu'inh",xmq:"Kuku-Mangk",xmr:"Meroitic",xms:"Moroccan Sign Language",xmt:"Matbat",xmu:"Kamu",xmv:"Antankarana Malagasy",xmw:"Tsimihety Malagasy",xmx:"Maden",xmy:"Mayaguduna",xmz:"Mori Bawah",xna:"Ancient North Arabian",xnb:"Kanakanabu",xng:"Middle Mongolian",xnh:"Kuanhua",xni:"Ngarigu",xnk:"Nganakarti",xnn:"Northern Kankanay",xno:"Anglo-Norman",xnr:"Kangri",xns:"Kanashi",xnt:"Narragansett",xnu:"Nukunul",xny:"Nyiyaparli",xnz:"Kenzi",xoc:"O'chi'chi'",xod:"Kokoda",xog:"Soga",xoi:"Kominimung",xok:"Xokleng",xom:"Komo (Sudan)",xon:"Konkomba",xoo:"Xukur\xFA",xop:"Kopar",xor:"Korubo",xow:"Kowaki",xpa:"Pirriya",xpc:"Pecheneg",xpe:"Liberia Kpelle",xpg:"Phrygian",xpi:"Pictish",xpj:"Mpalitjanh",xpk:"Kulina Pano",xpm:"Pumpokol",xpn:"Kapinaw\xE1",xpo:"Pochutec",xpp:"Puyo-Paekche",xpq:"Mohegan-Pequot",xpr:"Parthian",xps:"Pisidian",xpt:"Punthamara",xpu:"Punic",xpy:"Puyo",xqa:"Karakhanid",xqt:"Qatabanian",xra:"Krah\xF4",xrb:"Eastern Karaboro",xrd:"Gundungurra",xre:"Kreye",xrg:"Minang",xri:"Krikati-Timbira",xrm:"Armazic",xrn:"Arin",xrq:"Karranga",xrr:"Raetic",xrt:"Aranama-Tamique",xru:"Marriammu",xrw:"Karawa",xsa:"Sabaean",xsb:"Sambal",xsc:"Scythian",xsd:"Sidetic",xse:"Sempan",xsh:"Shamang",xsi:"Sio",xsl:"South Slavey",xsm:"Kasem",xsn:"Sanga (Nigeria)",xso:"Solano",xsp:"Silopi",xsq:"Makhuwa-Saka",xsr:"Sherpa",xss:"Assan",xsu:"Sanum\xE1",xsv:"Sudovian",xsy:"Saisiyat",xta:"Alcozauca Mixtec",xtb:"Chazumba Mixtec",xtc:"Katcha-Kadugli-Miri",xtd:"Diuxi-Tilantongo Mixtec",xte:"Ketengban",xtg:"Transalpine Gaulish",xth:"Yitha Yitha",xti:"Sinicahua Mixtec",xtj:"San Juan Teita Mixtec",xtl:"Tijaltepec Mixtec",xtm:"Magdalena Pe\xF1asco Mixtec",xtn:"Northern Tlaxiaco Mixtec",xto:"Tokharian A",xtp:"San Miguel Piedras Mixtec",xtq:"Tumshuqese",xtr:"Early Tripuri",xts:"Sindihui Mixtec",xtt:"Tacahua Mixtec",xtu:"Cuyamecalco Mixtec",xtv:"Thawa",xtw:"Tawand\xEA",xty:"Yoloxochitl Mixtec",xtz:"Tasmanian",xua:"Alu Kurumba",xub:"Betta Kurumba",xud:"Umiida",xug:"Kunigami",xuj:"Jennu Kurumba",xul:"Ngunawal",xum:"Umbrian",xun:"Unggaranggu",xuo:"Kuo",xup:"Upper Umpqua",xur:"Urartian",xut:"Kuthant",xuu:"Kxoe",xve:"Venetic",xvi:"Kamviri",xvn:"Vandalic",xvo:"Volscian",xvs:"Vestinian",xwa:"Kwaza",xwc:"Woccon",xwd:"Wadi Wadi",xwe:"Xwela Gbe",xwg:"Kwegu",xwj:"Wajuk",xwk:"Wangkumara",xwl:"Western Xwla Gbe",xwo:"Written Oirat",xwr:"Kwerba Mamberamo",xwt:"Wotjobaluk",xww:"Wemba Wemba",xxb:"Boro (Ghana)",xxk:"Ke'o",xxm:"Minkin",xxr:"Korop\xF3",xxt:"Tambora",xya:"Yaygir",xyb:"Yandjibara",xyj:"Mayi-Yapi",xyk:"Mayi-Kulan",xyl:"Yalakalore",xyt:"Mayi-Thakurti",xyy:"Yorta Yorta",xzh:"Zhang-Zhung",xzm:"Zemgalian",xzp:"Ancient Zapotec",yaa:"Yaminahua",yab:"Yuhup",yac:"Pass Valley Yali",yad:"Yagua",yae:"Pum\xE9",yaf:"Yaka (Democratic Republic of Congo)",yag:"Y\xE1mana",yah:"Yazgulyam",yai:"Yagnobi",yaj:"Banda-Yangere",yak:"Yakama",yal:"Yalunka",yam:"Yamba",yan:"Mayangna",yao:"Yao",yap:"Yapese",yaq:"Yaqui",yar:"Yabarana",yas:"Nugunu (Cameroon)",yat:"Yambeta",yau:"Yuwana",yav:"Yangben",yaw:"Yawalapit\xED",yax:"Yauma",yay:"Agwagwune",yaz:"Lokaa",yba:"Yala",ybb:"Yemba",ybe:"West Yugur",ybh:"Yakha",ybi:"Yamphu",ybj:"Hasha",ybk:"Bokha",ybl:"Yukuben",ybm:"Yaben",ybn:"Yaba\xE2na",ybo:"Yabong",ybx:"Yawiyo",yby:"Yaweyuha",ych:"Chesu",ycl:"Lolopo",ycn:"Yucuna",ycp:"Chepya",yda:"Yanda",ydd:"Eastern Yiddish",yde:"Yangum Dey",ydg:"Yidgha",ydk:"Yoidik",yea:"Ravula",yec:"Yeniche",yee:"Yimas",yei:"Yeni",yej:"Yevanic",yel:"Yela",yer:"Tarok",yes:"Nyankpa",yet:"Yetfa",yeu:"Yerukula",yev:"Yapunda",yey:"Yeyi",yga:"Malyangapa",ygi:"Yiningayi",ygl:"Yangum Gel",ygm:"Yagomi",ygp:"Gepo",ygr:"Yagaria",ygs:"Yol\u014Bu Sign Language",ygu:"Yugul",ygw:"Yagwoia",yha:"Baha Buyang",yhd:"Judeo-Iraqi Arabic",yhl:"Hlepho Phowa",yhs:"Yan-nha\u014Bu Sign Language",yia:"Yinggarda",yid:"Yiddish",yif:"Ache",yig:"Wusa Nasu",yih:"Western Yiddish",yii:"Yidiny",yij:"Yindjibarndi",yik:"Dongshanba Lalo",yil:"Yindjilandji",yim:"Yimchungru Naga",yin:"Yinchia",yip:"Pholo",yiq:"Miqie",yir:"North Awyu",yis:"Yis",yit:"Eastern Lalu",yiu:"Awu",yiv:"Northern Nisu",yix:"Axi Yi",yiz:"Azhe",yka:"Yakan",ykg:"Northern Yukaghir",yki:"Yoke",ykk:"Yakaikeke",ykl:"Khlula",ykm:"Kap",ykn:"Kua-nsi",yko:"Yasa",ykr:"Yekora",ykt:"Kathu",yku:"Kuamasi",yky:"Yakoma",yla:"Yaul",ylb:"Yaleba",yle:"Yele",ylg:"Yelogu",yli:"Angguruk Yali",yll:"Yil",ylm:"Limi",yln:"Langnian Buyang",ylo:"Naluo Yi",ylr:"Yalarnnga",ylu:"Aribwaung",yly:"Ny\xE2layu",ymb:"Yambes",ymc:"Southern Muji",ymd:"Muda",yme:"Yameo",ymg:"Yamongeri",ymh:"Mili",ymi:"Moji",ymk:"Makwe",yml:"Iamalele",ymm:"Maay",ymn:"Yamna",ymo:"Yangum Mon",ymp:"Yamap",ymq:"Qila Muji",ymr:"Malasar",yms:"Mysian",ymx:"Northern Muji",ymz:"Muzi",yna:"Aluo",ynd:"Yandruwandha",yne:"Lang'e",yng:"Yango",ynk:"Naukan Yupik",ynl:"Yangulam",ynn:"Yana",yno:"Yong",ynq:"Yendang",yns:"Yansi",ynu:"Yahuna",yob:"Yoba",yog:"Yogad",yoi:"Yonaguni",yok:"Yokuts",yol:"Yola",yom:"Yombe",yon:"Yongkom",yor:"Yoruba",yot:"Yotti",yox:"Yoron",yoy:"Yoy",ypa:"Phala",ypb:"Labo Phowa",ypg:"Phola",yph:"Phupha",ypm:"Phuma",ypn:"Ani Phowa",ypo:"Alo Phola",ypp:"Phupa",ypz:"Phuza",yra:"Yerakai",yrb:"Yareba",yre:"Yaour\xE9",yrk:"Nenets",yrl:"Nhengatu",yrm:"Yirrk-Mel",yrn:"Yerong",yro:"Yaroam\xEB",yrs:"Yarsun",yrw:"Yarawata",yry:"Yarluyandi",ysc:"Yassic",ysd:"Samatao",ysg:"Sonaga",ysl:"Yugoslavian Sign Language",ysn:"Sani",yso:"Nisi (China)",ysp:"Southern Lolopo",ysr:"Sirenik Yupik",yss:"Yessan-Mayo",ysy:"Sanie",yta:"Talu",ytl:"Tanglang",ytp:"Thopho",ytw:"Yout Wam",yty:"Yatay",yua:"Yucateco",yub:"Yugambal",yuc:"Yuchi",yud:"Judeo-Tripolitanian Arabic",yue:"Yue Chinese",yuf:"Havasupai-Walapai-Yavapai",yug:"Yug",yui:"Yurut\xED",yuj:"Karkar-Yuri",yuk:"Yuki",yul:"Yulu",yum:"Quechan",yun:"Bena (Nigeria)",yup:"Yukpa",yuq:"Yuqui",yur:"Yurok",yut:"Yopno",yuw:"Yau (Morobe Province)",yux:"Southern Yukaghir",yuy:"East Yugur",yuz:"Yuracare",yva:"Yawa",yvt:"Yavitero",ywa:"Kalou",ywg:"Yinhawangka",ywl:"Western Lalu",ywn:"Yawanawa",ywq:"Wuding-Luquan Yi",ywr:"Yawuru",ywt:"Xishanba Lalo",ywu:"Wumeng Nasu",yww:"Yawarawarga",yxa:"Mayawali",yxg:"Yagara",yxl:"Yardliyawarra",yxm:"Yinwum",yxu:"Yuyu",yxy:"Yabula Yabula",yyr:"Yir Yoront",yyu:"Yau (Sandaun Province)",yyz:"Ayizi",yzg:"E'ma Buyang",yzk:"Zokhuo",zaa:"Sierra de Ju\xE1rez Zapotec",zab:"Western Tlacolula Valley Zapotec",zac:"Ocotl\xE1n Zapotec",zad:"Cajonos Zapotec",zae:"Yareni Zapotec",zaf:"Ayoquesco Zapotec",zag:"Zaghawa",zah:"Zangwal",zai:"Isthmus Zapotec",zaj:"Zaramo",zak:"Zanaki",zal:"Zauzou",zam:"Miahuatl\xE1n Zapotec",zao:"Ozolotepec Zapotec",zap:"Zapotec",zaq:"Alo\xE1pam Zapotec",zar:"Rinc\xF3n Zapotec",zas:"Santo Domingo Albarradas Zapotec",zat:"Tabaa Zapotec",zau:"Zangskari",zav:"Yatzachi Zapotec",zaw:"Mitla Zapotec",zax:"Xadani Zapotec",zay:"Zayse-Zergulla",zaz:"Zari",zbc:"Central Berawan",zbe:"East Berawan",zbl:"Blissymbols",zbt:"Batui",zbw:"West Berawan",zca:"Coatecas Altas Zapotec",zch:"Central Hongshuihe Zhuang",zdj:"Ngazidja Comorian",zea:"Zeeuws",zeg:"Zenag",zeh:"Eastern Hongshuihe Zhuang",zen:"Zenaga",zga:"Kinga",zgb:"Guibei Zhuang",zgh:"Standard Moroccan Tamazight",zgm:"Minz Zhuang",zgn:"Guibian Zhuang",zgr:"Magori",zha:"Zhuang",zhb:"Zhaba",zhd:"Dai Zhuang",zhi:"Zhire",zhn:"Nong Zhuang",zho:"Chinese",zhw:"Zhoa",zia:"Zia",zib:"Zimbabwe Sign Language",zik:"Zimakani",zil:"Zialo",zim:"Mesme",zin:"Zinza",zir:"Ziriya",ziw:"Zigula",ziz:"Zizilivakan",zka:"Kaimbulawa",zkb:"Koibal",zkd:"Kadu",zkg:"Koguryo",zkh:"Khorezmian",zkk:"Karankawa",zkn:"Kanan",zko:"Kott",zkp:"S\xE3o Paulo Kaing\xE1ng",zkr:"Zakhring",zkt:"Kitan",zku:"Kaurna",zkv:"Krevinian",zkz:"Khazar",zlj:"Liujiang Zhuang",zlm:"Malay (individual language)",zln:"Lianshan Zhuang",zlq:"Liuqian Zhuang",zma:"Manda (Australia)",zmb:"Zimba",zmc:"Margany",zmd:"Maridan",zme:"Mangerr",zmf:"Mfinu",zmg:"Marti Ke",zmh:"Makolkol",zmi:"Negeri Sembilan Malay",zmj:"Maridjabin",zmk:"Mandandanyi",zml:"Madngele",zmm:"Marimanindji",zmn:"Mbangwe",zmo:"Molo",zmp:"Mpuono",zmq:"Mituku",zmr:"Maranunggu",zms:"Mbesa",zmt:"Maringarr",zmu:"Muruwari",zmv:"Mbariman-Gudhinma",zmw:"Mbo (Democratic Republic of Congo)",zmx:"Bomitaba",zmy:"Mariyedi",zmz:"Mbandja",zna:"Zan Gula",zne:"Zande (individual language)",zng:"Mang",znk:"Manangkari",zns:"Mangas",zoc:"Copainal\xE1 Zoque",zoh:"Chimalapa Zoque",zom:"Zou",zoo:"Asunci\xF3n Mixtepec Zapotec",zoq:"Tabasco Zoque",zor:"Ray\xF3n Zoque",zos:"Francisco Le\xF3n Zoque",zpa:"Lachiguiri Zapotec",zpb:"Yautepec Zapotec",zpc:"Choapan Zapotec",zpd:"Southeastern Ixtl\xE1n Zapotec",zpe:"Petapa Zapotec",zpf:"San Pedro Quiatoni Zapotec",zpg:"Guevea De Humboldt Zapotec",zph:"Totomachapan Zapotec",zpi:"Santa Mar\xEDa Quiegolani Zapotec",zpj:"Quiavicuzas Zapotec",zpk:"Tlacolulita Zapotec",zpl:"Lachix\xEDo Zapotec",zpm:"Mixtepec Zapotec",zpn:"Santa In\xE9s Yatzechi Zapotec",zpo:"Amatl\xE1n Zapotec",zpp:"El Alto Zapotec",zpq:"Zoogocho Zapotec",zpr:"Santiago Xanica Zapotec",zps:"Coatl\xE1n Zapotec",zpt:"San Vicente Coatl\xE1n Zapotec",zpu:"Yal\xE1lag Zapotec",zpv:"Chichicapan Zapotec",zpw:"Zaniza Zapotec",zpx:"San Baltazar Loxicha Zapotec",zpy:"Mazaltepec Zapotec",zpz:"Texmelucan Zapotec",zqe:"Qiubei Zhuang",zra:"Kara (Korea)",zrg:"Mirgan",zrn:"Zerenkel",zro:"Z\xE1paro",zrp:"Zarphatic",zrs:"Mairasi",zsa:"Sarasira",zsk:"Kaskean",zsl:"Zambian Sign Language",zsm:"Standard Malay",zsr:"Southern Rincon Zapotec",zsu:"Sukurum",zte:"Elotepec Zapotec",ztg:"Xanagu\xEDa Zapotec",ztl:"Lapagu\xEDa-Guivini Zapotec",ztm:"San Agust\xEDn Mixtepec Zapotec",ztn:"Santa Catarina Albarradas Zapotec",ztp:"Loxicha Zapotec",ztq:"Quioquitani-Quier\xED Zapotec",zts:"Tilquiapan Zapotec",ztt:"Tejalapan Zapotec",ztu:"G\xFCil\xE1 Zapotec",ztx:"Zaachila Zapotec",zty:"Yatee Zapotec",zua:"Zeem",zuh:"Tokano",zul:"Zulu",zum:"Kumzari",zun:"Zuni",zuy:"Zumaya",zwa:"Zay",zxx:"No linguistic content",zyb:"Yongbei Zhuang",zyg:"Yang Zhuang",zyj:"Youjiang Zhuang",zyn:"Yongnan Zhuang",zyp:"Zyphe Chin",zza:"Zaza",zzj:"Zuojiang Zhuang"};function ih(t){var e;return t?(e=dre[t.toLowerCase()])!=null?e:t:"unknown"}var sGe="(AD)";function uGe(t,e){return e.findIndex(r=>r.id===t.id)}function lGe({player:t,className:e}){let r=fe(t,"audioTrack"),n=fe(t,"availableAudioTracks"),[i,a]=ds.useMemo(()=>n.length===0?[["Not available"],0]:[n.map(s=>ih(s.normalized)+(s.audioDescription?" "+sGe:"")),r?Math.max(uGe(r,n),0):0],[n,r]),o=ds.useCallback(({index:s})=>{let d=n[s];d!==void 0?t.actions.setAudioTrack(d):console.error("Error: audio track not found")},[n,t]);return ds.createElement(ti,{name:"Audio AudioTrack",ariaLabel:"Update the audio track",className:e,disabled:n.length<2,onChange:o,options:i,selected:{index:a,value:void 0}})}var cre=ds.memo(lGe);u();l();var cs=Se(Ie());var dGe="(CC)";function cGe(t,e){return e.findIndex(r=>r.id===t.id)}function fGe({player:t,className:e}){let r=fe(t,"subtitle"),n=fe(t,"availableSubtitles"),i=cs.useMemo(()=>["no subtitles",...n.map(s=>ih(s.normalized)+(s.closedCaption?" "+dGe:""))],[n]),a=r?cGe(r,n)+1:0,o=cs.useCallback(({index:s})=>{if(s>0){let d=n[s-1];d!==void 0?t.actions.setTextTrack(d):console.error("Error: subtitles track not found")}else t.actions.disableSubtitlesTrack()},[n,t]);return cs.createElement(ti,{name:"Subtitles Track",ariaLabel:"Update the current subtitles",className:e,disabled:i.length<=1,onChange:o,options:i,selected:{index:a,value:void 0}})}var fre=cs.memo(fGe);u();l();var fs=Se(Ie());function mGe(t,e){return e.findIndex(r=>r.id===t.id)}function pGe({player:t,className:e}){let r=fe(t,"videoTrack"),n=fe(t,"availableVideoTracks"),[i,a]=fs.useMemo(()=>n.length===0?[["Not available"],0]:[["no video track"].concat(n.map((s,d)=>`track ${d}: ${s.id}`)),r!=null?1+mGe(r,n):0],[r,n]),o=fs.useCallback(({index:s})=>{if(s>0){let d=n[s-1];d!==void 0?t.actions.setVideoTrack(d):console.error("Error: video track not found")}else t.actions.disableVideoTrack()},[n,t]);return fs.createElement(ti,{name:"Video Track",ariaLabel:"Update the video track",className:e,disabled:i.length<=1,onChange:o,options:i,selected:{index:a,value:void 0}})}var mre=fs.memo(pGe);u();l();var cc=Se(Ie());var RL=[.25,.5,.75,1,1.25,1.5,1.75,2,2.5,3],gGe={1:"Normal"},pre=RL.map(t=>{var e;return(e=gGe[t])!=null?e:String(t)});function hGe({player:t,className:e}){let r=fe(t,"playbackRate"),n=RL.findIndex(a=>r===a),i=cc.useCallback(({index:a})=>{if(a>-1){n=a;let o=RL[a];o!==void 0?t.actions.setPlaybackRate(o):console.error("Error: playback rate not found")}},[t]);return cc.createElement(ti,{className:e,ariaLabel:"Update the current playback speed",name:"Playback Rate",disabled:pre.length<2,onChange:i,options:pre,selected:{index:n,value:void 0}})}var gre=cc.memo(hGe);function yGe({shouldDisplay:t,close:e,player:r}){let n=fe(r,"lowLatencyMode");if(!fe(r,"isContentLoaded"))return null;let a="player-knobs settings"+(t?" fade-in-out":"");return dn.createElement("div",{className:a},dn.createElement("div",{className:"player-knobs-header"},dn.createElement("span",{className:"player-knobs-title"},"Settings"),dn.createElement("span",{className:"player-knobs-close",onKeyDown:o=>{(o.keyCode===13||o.code==="Enter")&&e()},onClick:e},"\uF00D")),dn.createElement("div",{className:"player-knobs-content"},n?null:dn.createElement(gre,{className:"black-knob",player:r}),dn.createElement(ure,{className:"black-knob",player:r}),dn.createElement(lre,{className:"black-knob",player:r}),dn.createElement(cre,{className:"black-knob",player:r}),dn.createElement(fre,{className:"black-knob",player:r}),dn.createElement(mre,{className:"black-knob",player:r})))}var hre=dn.memo(yGe);var{useCallback:Ci,useEffect:yre,useRef:ah,useState:ri}=Ht,vGe=300;function bGe(){let[t,e]=ri("reload"),[r,n]=ri("reload"),[i,a]=ri(null),[o,s]=ri(!1),[d,c]=ri(!1),[m,f]=ri(!1),[p,y]=ri(!1),[v,b]=ri(!1),[T,S]=ri(Mn.player),[I,E]=ri(Mn.loadVideo),[R,M]=ri(!1),[C,A]=ri(!1),x=ah(null),O=ah(null),D=ah(null),F=ah(null),K=ah(null),P=Ci(()=>{b(Z=>!Z)},[]),L=Ci(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]);yre(()=>{i!==null&&i.actions.updateWorkerMode(R)},[R,i]),yre(()=>{if(i===null)return;function Z(){if(i===null){x.current!==null&&(clearTimeout(x.current),x.current=null),c(!1);return}i.actions.setDefaultAudioRepresentationSwitchingMode(t),i.actions.setDefaultVideoRepresentationSwitchingMode(r);let $=i.getState("isSeeking"),ue=i.getState("isBuffering"),Le=i.getState("isLoading"),Re=i.getState("isReloading");Le||Re?(x.current!==null&&(clearTimeout(x.current),x.current=null),c(!0)):$||ue?x.current===null&&(x.current=window.setTimeout(()=>{c(!0)},vGe)):(x.current!==null&&(clearTimeout(x.current),x.current=null),c(!1))}return i.listenToState("defaultAudioRepresentationsSwitchingMode",$=>e($)),i.listenToState("defaultVideoRepresentationsSwitchingMode",$=>n($)),i.listenToState("autoPlayBlocked",$=>{s($)}),i.listenToState("videoTrackHasTrickMode",$=>{y($)}),i.listenToState("isSeeking",Z),i.listenToState("isBuffering",Z),i.listenToState("isLoading",Z),i.listenToState("isReloading",Z),Z(),()=>{i.destroy(),L()}},[i]);let V=Ci(()=>{if(O.current===null||D.current===null||F.current===null)return;i&&i.destroy();let Z=new ste(Object.assign({},{videoElement:O.current,textTrackElement:D.current,debugElement:F.current},T));return a(Z),Z},[T,i]),z=Ci(()=>{if(i===null)return;let Z=i.getState("isPaused");i.getState("isContentLoaded")&&(Z?i.actions.play():(i.actions.disableLiveCatchUp(),i.actions.pause()))},[i]),N=Ci(Z=>{let $=i;if($===null||C){A(!1);let ue=V();if(ue===void 0)return;ue.actions.updateWorkerMode(R),$=ue}SGe($,Z,I)},[i,R,C,V,I]),B=Ci(()=>{i==null||i.actions.stop()},[i]),U=Ci(()=>{f(!1)},[]),j=Ci(()=>{f(!m)},[m]),Y=Ci(Z=>{A(!0),S(Z)},[]),W=Ci(Z=>{if(i===null){e(Z),A(!0);return}i.actions.setDefaultAudioRepresentationSwitchingMode(Z)},[i]),se=Ci(Z=>{if(i===null){n(Z),A(!0);return}i.actions.setDefaultVideoRepresentationSwitchingMode(Z)},[i]);return Ht.createElement("section",{className:"video-player-section"},Ht.createElement("div",{className:"video-player-content"},Ht.createElement(zte,{loadVideo:N,showOptions:v,onOptionToggle:P}),Ht.createElement(Yte,{playerOptions:T,updatePlayerOptions:Y,loadVideoOptions:I,updateLoadVideoOptions:E,showOptions:v,defaultAudioRepresentationsSwitchingMode:t,updateDefaultAudioRepresentationsSwitchingMode:W,defaultVideoRepresentationsSwitchingMode:r,updateDefaultVideoRepresentationsSwitchingMode:se,tryRelyOnWorker:R,updateTryRelyOnWorker:M}),Ht.createElement("div",{className:"video-player-wrapper",ref:K},Ht.createElement("div",{className:"video-screen-parent"},Ht.createElement("div",{className:"video-screen",onKeyDown:Z=>{(Z.keyCode===32||Z.code==="Space")&&z()},onClick:()=>z()},i?Ht.createElement(Qte,{player:i}):null,o?Ht.createElement("div",{className:"video-player-manual-play-container"},Ht.createElement("img",{className:"video-player-manual-play",alt:"Play",src:"./assets/play.svg"})):null,!o&&d?Ht.createElement("img",{src:"./assets/spinner.gif",className:"video-player-spinner"}):null,Ht.createElement("div",{className:"text-track",ref:D}),Ht.createElement("div",{className:"debug-element",ref:F}),Ht.createElement("video",{ref:O})),i?Ht.createElement(hre,{close:U,shouldDisplay:m,player:i}):null),i&&K?Ht.createElement(kte,{player:i,playerWrapperElementRef:K,toggleSettings:j,stopVideo:B,enableVideoThumbnails:p}):null),Ht.createElement(sre,{player:i})))}function SGe(t,e,r){e.lowLatencyMode?t.actions.enableLiveCatchUp():t.actions.disableLiveCatchUp(),t.actions.setPlaybackRate(1),t.actions.load(Object.assign({},e,r))}var vre=bGe;function IGe(){return Gt.createElement(Gt.Fragment,null,Gt.createElement("header",null,Gt.createElement("div",{className:"left"},Gt.createElement("h1",{className:"title"},Gt.createElement("a",{href:"https://github.com/canalplus/rx-player"},Gt.createElement("img",{className:"logo",alt:"RxPlayer",src:"./assets/logo_white.png"})),Gt.createElement("a",{href:"https://developers.canal-plus.com/rx-player/demo_page_by_version.html",className:"version"}," v"+Fd.version)),Gt.createElement("nav",null,Gt.createElement("a",{href:"https://developers.canal-plus.com/rx-player/doc/Getting_Started/Welcome.html"},"Getting Started"),Gt.createElement("a",{href:"https://developers.canal-plus.com/rx-player/doc/api/Overview.html"},"API Docs"))),Gt.createElement("div",{className:"right"},Gt.createElement("a",{"aria-label":"Go to Canal+ website",href:"https://canalplus.com"},Gt.createElement("img",{className:"canal-logo",alt:"CANAL+",src:"./assets/canalp.svg"})),Gt.createElement(yP,{href:"https://github.com/canalplus/rx-player",ariaLabel:"Star the RxPlayer on GitHub",dataIcon:"octicon-star",dataShowCount:"true",dataText:"Star"}),Gt.createElement(yP,{href:"https://github.com/canalplus/rx-player/fork",ariaLabel:"Fork the RxPlayer on GitHub",dataIcon:"octicon-repo-forked",dataText:"Fork"}))),Gt.createElement(vre,null))}var bre=IGe;window.onload=function(){let t=document.getElementById("player-container");if(t===null){console.error("Error: missing `player-container` element");return}Sre.createRoot(t).render(oh.createElement(oh.StrictMode,null,oh.createElement(bre,null)))};})(); +/*! Bundled license information: + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +scheduler/cjs/scheduler.production.min.js: + (** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react-dom/cjs/react-dom.production.min.js: + (** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +github-buttons/dist/buttons.esm.js: + (*! + * github-buttons v2.27.0 + * (c) 2023 なつき + * @license BSD-2-Clause + *) +*/ diff --git a/versions/4.1.0/demo/fonts/FontAwesome.otf b/versions/4.1.0/demo/fonts/FontAwesome.otf new file mode 100644 index 0000000000..f7936cc1e7 Binary files /dev/null and b/versions/4.1.0/demo/fonts/FontAwesome.otf differ diff --git a/versions/4.1.0/demo/index.html b/versions/4.1.0/demo/index.html new file mode 100644 index 0000000000..4335564783 --- /dev/null +++ b/versions/4.1.0/demo/index.html @@ -0,0 +1,21 @@ + + + + + + + + + + + RxPlayer - CANAL+ + + +

+ + diff --git a/versions/4.1.0/demo/mpd-parser.wasm b/versions/4.1.0/demo/mpd-parser.wasm new file mode 100644 index 0000000000..14ff90f7e6 Binary files /dev/null and b/versions/4.1.0/demo/mpd-parser.wasm differ diff --git a/versions/4.1.0/demo/plus.ico b/versions/4.1.0/demo/plus.ico new file mode 100644 index 0000000000..a267e580e2 Binary files /dev/null and b/versions/4.1.0/demo/plus.ico differ diff --git a/versions/4.1.0/demo/styles/style.css b/versions/4.1.0/demo/styles/style.css new file mode 100644 index 0000000000..7477db48d7 --- /dev/null +++ b/versions/4.1.0/demo/styles/style.css @@ -0,0 +1,1326 @@ +@font-face { + font-family: "icons"; + src: url("../fonts/FontAwesome.otf"); + font-weight: normal; + font-style: normal; +} + +@keyframes fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes grow-generated-url { + from { + opacity: 0; + margin-top: -51px; + } + to { + opacity: 1; + margin-top: 0px; + } +} + +body { + margin: 0px; + font-family: "CanalDemiRomain", "Open Sans", sans-serif; + background-color: #ececec; +} + +.icon { + font-family: "icons", sans-serif; +} + +header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 15px; + background-color: #323435; +} + +header a { + color: #fff; + text-decoration: none; +} + +header a:hover { + color: #d6d6d6; +} + +header > div { + display: flex; + align-items: center; + justify-content: space-between; +} + +header .left { + gap: 35px; +} + +.title { + display: flex; + line-height: 1.05; + margin: 20px 0; + padding-bottom: 3px; +} + +.title .logo { + display: inline-block; + width: 150px; +} + +.title .version { + font-weight: normal; + font-size: 15px; + color: #c8c8c8; + position: relative; + top: 12px; +} + +.title a.version:hover { + color: #aaa; +} + +nav { + display: flex; + gap: 25px; +} + +header .right { + gap: 10px; +} + +.canal-logo { + display: inline-block; + height: 25px; +} + +.custom-input-wrapper { + border: 1px dashed #d1d1d1; + padding: 0px 10px 10px 10px; + margin-top: 10px; +} + +.player-logs-wrapper-bar { + display: flex; + flex-direction: row; +} + +#player-container { + width: 100%; +} + +.video-player-section { + padding: 25px 4px; +} + +.video-player-content { + max-width: 1050px; + margin: auto; + text-align: left; +} + +.white-select select { + /* styling */ + background-color: white; + color: #1d1d1d; + display: inline-block; + font: inherit; + + /* reset */ + + margin: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + + background-image: url("../assets/select_arrow_black.svg"); + background-size: 8px; + background-repeat: no-repeat; + background-position: calc(100% - 8px) 50%; + + border: 1px solid #d1d1d1; + padding: 2px 18px 2px 5px; +} + +.choice-input { + margin: 0px; + display: inline; +} + +.choice-input > select { + display: flex; + background-color: white; + border-radius: 3px; +} + +.choice-input.white-select select { + height: 41px; + padding: 10px 25px 10px 15px; +} + +.white-select option { + padding: 8px; +} + +.choice-inputs-wrapper { + margin: 10px auto 10px auto; + padding: 0 0 5px 0; +} + +.content-inputs { + display: flex; + align-items: center; +} + +.content-inputs > * { + display: flex; + justify-content: space-between; + align-items: center; +} + +.content-inputs-selects { + display: flex; + justify-content: space-between; + align-items: center; +} + +.content-inputs-middle { + display: flex; + flex-direction: row; +} + +.text-input { + font-family: CanalDemiRomain, "Open Sans", sans-serif; + font-size: 1rem; + width: 100%; + margin-right: 0px; + margin-left: 0px; + margin-bottom: 12px; + margin-top: 12px; + padding: 10px 25px 10px 15px; + border: 1px solid #d1d1d1; + border-radius: 3px; + display: flex; + background-color: white; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.content-choice { + margin: 0 5px; + width: 100%; +} + +.content-choice select { + width: 100%; +} + +.video-player-wrapper { + background-color: #000; + margin: auto; + margin-top: 5px; +} + +.video-player-wrapper video { + width: 100%; + height: 100%; +} + +.fullscreen.video-player-wrapper { + width: 100%; +} + +.video-screen-parent { + position: relative; +} + +.fullscreen .video-screen-parent { + position: fixed; + width: 100%; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.text-track { + color: white; + position: absolute; + height: 100%; + width: 100%; + z-index: 100; +} + +.debug-element { + color: white; + position: absolute; + height: 100%; + width: 100%; + z-index: 100; +} + +.video-player-spinner { + z-index: 1001; + position: absolute; + height: 50px; + width: 50px; + top: 50%; + margin-left: -25px; + left: 50%; + margin-top: -25px; +} + +.player-error { + color: white; + margin: 30px 35px; + text-align: left; + position: absolute; +} + +.error-icon { + margin-right: 10px; +} + +.error-intro { + margin-right: 10px; +} + +.controls-bar { + display: flex; + background-color: #111111; + height: 45px; + color: #fff; + text-align: left; +} + +.progress-current-position { + color: #fff; + display: inline-block; + position: relative; + margin: auto; + width: 41px; + text-align: center; +} + +.progress-duration { + color: #fff; + display: inline-block; + position: relative; + margin: auto; + width: 41px; + text-align: center; +} + +.thumbnail-wrapper { + position: absolute; + display: block; + left: 0px; + height: 100px; + width: 180px; + margin-left: -90px; + z-index: 1011; + transform: scaleY(1); + animation: fadein 0.6s; +} + +.thumbnail { + height: 100%; +} + +.controls-bar-container { + background-color: #111111; + margin-top: -4px; + z-index: 1000; +} + +.fullscreen .controls-bar-container { + position: fixed; + width: 100%; + bottom: 0; +} + +.fullscreen .controls-bar { + display: none; +} + +.progress-bar-parent { + position: relative; +} + +.progress-bar-wrapper { + height: 6px; + cursor: pointer; + display: flex; + position: relative; + background-color: #000; + width: 100%; + margin: auto; + transition: all 0.2s ease; + z-index: 9999; +} + +.progress-bar-wrapper:hover { + transform: scaleY(2); +} + +.progress-bar-current { + position: absolute; + left: 0; + height: 100%; + background-color: #eee; + z-index: 3; + transition-duration: 0.1s; +} + +.progress-bar-wrapper:hover .progress-bar-current { + background-color: #fff; +} + +.progress-bar-buffered { + position: absolute; + height: 100%; + background-color: #333; + z-index: 2; + transition-duration: 0.3s; +} + +.controls-right-side { + display: flex; + justify-content: flex-end; + align-items: center; + flex-grow: 1; + margin-right: 6px; +} + +.option-panel { + background-color: white; + position: absolute; + padding: 5px 10px 5px 20px; + border-radius: 3px; + z-index: 101; + transition: all 200ms; + opacity: 0; + transform: translate(-7px, 42px); + pointer-events: none; +} + +.option-panel > tr { + display: flex; + flex-direction: row; + align-items: center; +} + +.option-panel.fade-in-out { + opacity: 1; + transform: translate(-7px, 50px); + pointer-events: auto; + box-shadow: 0px 0px 20px 4px #0000001a; +} + +.choice-input-button-wrapper { + display: flex; + align-items: center; + justify-content: space-between; + flex-direction: row; + margin-right: -5px; + margin-left: auto; +} + +.choice-input-button-wrapper > button { + border-radius: 3px; +} + +.show-options { + margin-left: 8px; + margin-right: 8px; + flex-direction: row; + display: flex; + align-items: center; + font-size: 1.1em; + color: #2b2e2f; + border: dashed 1px #d1d1d1; + height: 39px; + border-radius: 3px; + padding-right: 5px; + text-align: center; +} + +.show-options > label:first-child { + margin: 5px; +} + +.option-desc { + font-weight: normal; + font-style: italic; + color: #242424; + font-size: 0.95em; +} + +.choice-input-button { + font-family: "icons", sans-serif; + border: solid 1px #d1d1d1; + margin: 5px; + height: 41px; + color: #2f3132; + background-color: #fff; +} + +.choice-input-button:hover { + color: #ec3655; + box-shadow: 0px 0px 30px 0px rgba(245, 245, 255, 0.75); +} + +.choice-input-button:disabled { + color: #999; +} + +.choice-input-button:disabled:hover { + box-shadow: none; +} + +.control-button { + font-size: 1.2em; + width: 35px; + border: none; + font-family: "icons", sans-serif; + color: #ccc; + background: transparent; + cursor: pointer; + outline: 0; + margin: 0 3px 0 3px; +} + +.running { + display: inline; + position: relative; + margin: auto; + background: none; + border: none; + padding: 6px; + cursor: pointer; +} + +.running:hover:after { + background: #ed3656; + background: rgba(237, 54, 86, 0.9); + bottom: 40px; + color: #fff; + content: attr(title); + left: 32%; + padding: 5px 15px; + position: absolute; + text-align: center; + z-index: 10000; + width: 175px; +} + +.running:hover:before { + border: solid; + border-color: #ed3656 transparent; + border-width: 6px 6px 0 6px; + bottom: 35px; + content: ""; + left: 32%; + position: absolute; + z-index: 10001; +} + +.running > svg { + width: 22px; + fill: #ccc; + transform: scale(-1, 1); +} + +.running:hover > svg { + fill: #fff; +} + +.running.clicked > svg { + fill: #ed3656; +} + +.running.clicked:hover > svg { + fill: #f3687f; +} + +.link { + background-color: white; + cursor: pointer; + width: 41px; + height: 41px; + padding: 10px; + border-radius: 3px; + border: #d1d1d1 1px solid; + margin-left: 5px; +} + +.link:hover { + color: #ed3656; +} + +.link.enabled { + color: #ffffff; + background-color: #ec3655; +} + +.catch-up { + color: #ed3656; + border: solid 1px #ed3656; + border-radius: 3px; + padding: 2px 9px; +} + +.control-button:hover { + color: #fff; +} + +.control-button.disabled { + color: #444; +} + +.play-pause-button { + margin-left: 14px; + position: relative; +} + +.options-button { + font-size: 1.1rem; + width: 90px; +} + +.load-button { + font-size: 1.5rem; + width: 60px; +} + +.update-control { + display: flex; + flex-direction: row; + align-items: center; +} + +.update-control-buttons { + display: flex; + flex-direction: row; + align-items: center; +} + +.content-button { + font-size: 1.1rem; + border-radius: 3px; + white-space: nowrap; +} + +.content-button.disabled { + background-color: #ececec; +} + +.save-button { + color: #fff; + background-color: #ec3655; +} + +.save-button:hover:not(.disabled) { + color: #fff; + background-color: #ff3655; +} + +.cancel-button:hover { + color: #ec3655; +} + +.need-to-fill { + font-weight: bold; +} + +.erase-button { + font-size: 1.5rem; + width: 60px; + border-radius: 3px; + background-color: #ececec; + border: dashed 1px #d1d1d1; +} + +.options-button.clicked { + background-color: #c6c6c6; +} + +.position-infos { + margin: auto; + margin-left: 10px; + font-size: 0.8em; +} + +.dot { + height: 10px; + width: 10px; + background-color: #666; + border-radius: 50%; + margin: auto; + margin-left: 6px; + border: none; + padding: 0; + cursor: pointer; +} + +.dot.live { + background-color: #ed3656; + cursor: default; +} + +.settings-button { + width: auto; +} + +.settings-title { + text-align: center; + margin-bottom: 12px; + font-size: 1.5em; +} + +.settings-note { + font-style: italic; + text-align: center; +} + +.volume { + position: relative; + display: flex; + padding: 1px 8px; +} + +.volume-button { + height: 100%; + margin-left: 0px; + margin-right: 4px; + width: 35px; + text-align: left; +} + +.progress-controls { + flex: 1; + display: flex; + position: relative; + margin: auto; +} + +.volume-bar-wrapper { + height: 5px; + position: relative; + background-color: #000; + cursor: pointer; + margin: auto; + margin-left: -8px; + width: 60px; + border-radius: 10px; +} + +.volume-bar-current { + height: 100%; + background-color: #333; + background-color: #ccc; + border-radius: 10px; +} + +.volume-bar-current:hover { + background-color: #fff; +} + +.volume-indicator { + background-color: #000; + color: #fff; + margin-top: -7px; +} + +.player-knobs-header { + padding: 9px 20px 9px 20px; + border-bottom: 1px dotted #555; +} + +.player-knobs { + width: 60%; + max-width: 380px; + min-width: 280px; + color: white; + position: absolute; + background-color: #000000; + opacity: 0; + transform: scale(0.9); + transition: opacity 200ms; + z-index: 1010; + pointer-events: none; +} + +.player-knobs.settings { + bottom: 10px; + right: 10px; +} + +.player-knobs.infos { + top: 10px; + left: 10px; +} + +.player-knobs.fade-in-out { + transform: scale(1); + pointer-events: auto; + opacity: 0.8; +} + +.player-knobs-title { + font-weight: bold; +} + +.player-knobs-close { + font-family: "icons", sans-serif; + color: #d0d0cf; + font-size: 14px; + margin-top: auto; + margin-bottom: auto; + cursor: pointer; +} + +.player-knobs-close:hover { + color: #ffffff; +} + +.player-knobs-content { + padding: 10px 20px 10px 20px; + display: flex; + flex-direction: column; +} + +.player-knobs > div { + display: flex; + justify-content: space-between; +} + +.knob { + display: flex; + margin: 5px 0 5px 0; +} + +.knob-name { + margin: auto 10px auto auto; + overflow: hidden; + white-space: nowrap; + flex: 1; +} + +.knob-value { + display: inline-block; + flex: 1; +} + +.black-knob select { + /* styling */ + background-color: #000; + display: inline-block; + font: inherit; + + margin: 0; + padding: 3px 21px 3px 3px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + + background-image: url("../assets/select_arrow_white.svg"); + background-size: 8px; + background-repeat: no-repeat; + background-position: calc(100% - 8px) 50%; +} + +.generated-url { + z-index: 1; + color: #3a3a3a; + font-size: 14px; + height: 21px; + background-color: rgba(255, 255, 255, 0.8); + border-radius: 3px; + padding: 10px; + display: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-bottom: 10px; +} + +.generated-url.enabled { + animation: grow-generated-url 0.6s; + display: flex; + flex-direction: row; + align-items: center; +} + +.generated-url-link.none { + color: #222; + text-decoration: none; + font-style: italic; +} +.generated-url-link { + color: #ec3655; + text-decoration: none; +} + +.knob-value > select { + width: 100%; + border: 0; + outline: 0; + background-color: rgba(0, 0, 0); + color: rgb(240, 240, 240); +} + +.black-knob select:disabled { + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; + background-image: none; +} + +.knob-value > select:disabled { + color: rgb(130, 130, 130); +} + +.knob-value > select:focus { + border: 0; + outline: 0; + color: rgb(240, 240, 240); +} + +.player-charts { + margin-top: 30px; +} + +.player-box { + background-color: white; + border-radius: 5px; + padding: 10px; + margin: 10px 0px; +} + +.custom-checkbox { + display: flex; + align-items: center; + justify-content: space-between; + margin: 0px 5px; +} + +.checkbox-indication { + font-style: italic; + font-size: 0.8em; +} + +.encryption-checkbox.disabled { + color: #888; +} + +.chart-checkbox { + color: #1d1d1d; + display: flex; + align-items: center; + justify-content: space-between; + margin: 0px 5px; + font-size: 0.9rem; +} + +.chart-checkbox > input { + margin: 10px; +} + +.switch { + position: relative; + display: inline-block; + width: 30px; + height: 17px; + margin-right: 5px; +} + +/* Hide default HTML checkbox */ +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: 0.2s; + transition: 0.2s; + width: 30px; +} + +.slider:before { + position: absolute; + content: ""; + height: 13px; + width: 13px; + left: 2px; + bottom: 2px; + background-color: white; + -webkit-transition: 0.2s; + transition: 0.2s; +} + +input:checked + .slider { + background-color: #ec3655; +} + +input:focus + .slider { + box-shadow: 0 0 1px #ec3655; +} + +input:checked + .slider:before { + -webkit-transform: translateX(26px); + -ms-transform: translateX(26px); + transform: translateX(13px); +} + +.slider.round { + border-radius: 34px; +} + +.slider.round:before { + border-radius: 50%; +} + +.checkbox { + color: #1d1d1d; + text-align: center; + font-size: 0.9rem; + display: flex; + align-items: center; + justify-content: space-between; +} + +.fallback-checkbox { + margin-right: 1px; +} + +.fallback-switch { + margin-right: 0px; +} + +.checkbox > input { + margin: 10px; +} + +.player-logs-wrapper { + margin-top: 20px; +} + +.player-logs-wrapper-title { + color: #242424; + margin: 10px; + width: 100%; +} + +.player-logs-wrapper-trash { + font-family: "icons", sans-serif; + color: gray; + border: none; + background: none; + font-size: 1.3rem; + float: right; +} + +.player-logs-wrapper-trash:hover { + color: white; +} + +.player-logs { + background-color: #242424; + border-radius: 3px; + color: #cccccc; + font-size: 0.8em; + padding: 10px; + height: 300px; + overflow: auto; + white-space: nowrap; +} + +.tooltip-wrapper { + position: absolute; + display: block; + left: 0px; + padding: 5px; + font-size: 12px; + z-index: 1012; + transform: scaleY(1); + animation: fadein 0.6s; + background-color: #1d1d1d; + color: white; +} + +.tooltip { + display: inline; + font-family: "CanalDemiRomain", "Open Sans", sans-serif; +} + +.buffer-content-tip { + font-family: "monospace", "mono", sans-serif; + pointer-events: none; +} + +.drm-button { + margin: 5px 10px 5px 0; + font-size: 1em; + padding: 10px; + border-radius: 3px; +} + +.drm-button.selected { + background-color: #ec3655; + color: #fff; +} + +.drm-button.selected:hover { + background-color: #ec3655; + color: #fff; +} + +.drm-settings { + background: #ffffff; + padding: 5px 14px 0px 14px; + margin: 4px 0 4px 0; +} + +@media only screen and (max-width: 800px) { + .content-inputs { + flex-direction: column; + } + + .choice-input-button-wrapper { + margin-left: 0px; + } + + .content-inputs-left { + flex-direction: column; + } + + .update-control { + flex-direction: column; + } + + .button-gh { + display: none; + } +} + +@media only screen and (max-width: 650px) { + .catch-up { + display: none; + } +} + +@media only screen and (max-width: 600px) { + header .canal-logo { + display: none; + } +} + +@media only screen and (max-width: 500px) { + header nav { + display: none; + } +} + +/* for IE10 & IE11 */ +@media all and (-ms-high-contrast: none) { + .player-knobs { + opacity: 0; + background-color: #000000; + } + .player-knobs.fade-in-out { + opacity: 1; + background-color: #000000; + } + .black-knob select { + background-image: none; + padding: 3px 3px 3px 3px; + } + .white-select select { + background-image: none; + padding: 10px 15px 10px 15px; + } + .content-choice select { + width: auto; + } + .position-infos { + margin: 15px auto; + } + header .logo { + display: none; + } +} + +.container-buffer-graph { + border: 1px dotted #999; + margin: 15px 5px; + padding: 5px; +} + +.canvas-buffer-graph-container { + position: relative; + margin: 0px 5px 5px 5px; + border: 1px solid black; + height: 15px; +} + +.canvas-buffer-graph { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + cursor: pointer; +} + +.canvas-buffer-size-container { + margin: 5px; +} + +.canvas-buffer-size { + position: relative; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + cursor: pointer; +} + +.buffer-graph-title { + font-size: 13px; + font-weight: bold; + margin: 5px; +} + +.buffer-content-no-content { + text-align: center; + padding: 10px; +} + +.video-player-manual-play-container { + position: absolute; + display: flex; + height: 100%; + width: 100%; +} + +.video-player-manual-play { + margin: auto; + height: 110px; +} + +.loadVideooptions { + list-style-type: none; + margin: 0; + padding: 0; + font-size: 15px; +} + +.spacer { + border: solid 1px #ec3655; + width: 90%; +} + +.loadVideooptions li { + padding: 10px; + border-top: dashed 1px black; + display: flex; + flex-direction: column; +} + +.loadVideooptions li:first-child { + border-top: none; +} + +.loadVideooptions label { + margin-bottom: 5px; +} + +.loadVideooptions input, +select { + margin: 5px 0; +} + +.optionWrapper { + background: white; + display: flex; + flex-direction: column; + padding: 5px; + margin-right: 10px; + margin-top: 10px; + flex: 1 1 0px; +} + +.optionWrapper:last-child { + margin-right: 0; +} + +.optionTitle { + margin-bottom: 5px; + text-align: center; +} + +.settingsWrapper { + border: 1px dashed #d1d1d1; + padding: 10px; + margin-top: 10px; +} + +.featureWrapperWithSelectMode { + display: flex; + flex-direction: column; +} + +.playerOptionInput { + display: flex; + flex-direction: column; + font-weight: bold; +} + +.playerOptionsCheckBoxTitle { + font-weight: bold; +} + +.playerOptionsCheckBox { + margin: 5px 0; +} + +.wrapperInputWithResetBtn { + display: flex; + align-items: center; +} + +.optionInput { + flex-grow: 1; +} + +.resetBtn { + font-family: "icons"; + border: 0; + background: transparent; + color: #ec3655; + cursor: pointer; +} + +.disabledResetBtn { + color: #b5b5b5; + cursor: auto; +} diff --git a/versions/4.1.0/demo/worker.js b/versions/4.1.0/demo/worker.js new file mode 100644 index 0000000000..ef993bd94d --- /dev/null +++ b/versions/4.1.0/demo/worker.js @@ -0,0 +1,8 @@ +"use strict";(()=>{var $s=Object.defineProperty,Xs=Object.defineProperties;var Zs=Object.getOwnPropertyDescriptors;var Ga=Object.getOwnPropertySymbols;var Js=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable;var Ka=(n,e,t)=>e in n?$s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ge=(n,e)=>{for(var t in e||(e={}))Js.call(e,t)&&Ka(n,t,e[t]);if(Ga)for(var t of Ga(e))eu.call(e,t)&&Ka(n,t,e[t]);return n},Me=(n,e)=>Xs(n,Zs(e));var b={PRODUCTION:0,DEV:1,CURRENT_ENV:0};var nu={DEFAULT_REQUEST_TIMEOUT:3e4,DEFAULT_CONNECTION_TIMEOUT:15e3,DEFAULT_TEXT_TRACK_MODE:"native",DEFAULT_ENABLE_FAST_SWITCHING:!0,DELTA_POSITION_AFTER_RELOAD:{bitrateSwitch:-.1,trackSwitch:{audio:0,video:0,other:0}},DEFAULT_CODEC_SWITCHING_BEHAVIOR:"continue",DEFAULT_AUTO_PLAY:!1,DEFAULT_WANTED_BUFFER_AHEAD:30,DEFAULT_MAX_BUFFER_AHEAD:1/0,DEFAULT_MAX_BUFFER_BEHIND:1/0,DEFAULT_MAX_VIDEO_BUFFER_SIZE:1/0,MAXIMUM_MAX_BUFFER_AHEAD:{text:18e3},MINIMUM_MAX_BUFFER_AHEAD:{text:120},MAXIMUM_MAX_BUFFER_BEHIND:{text:18e3},DEFAULT_BASE_BANDWIDTH:0,INACTIVITY_DELAY:6e4,DEFAULT_THROTTLE_VIDEO_BITRATE_WHEN_HIDDEN:!1,DEFAULT_VIDEO_RESOLUTION_LIMIT:"none",DEFAULT_LIVE_GAP:{DEFAULT:10,LOW_LATENCY:3.5},BUFFER_DISCONTINUITY_THRESHOLD:.2,BITRATE_REBUFFERING_RATIO:1.5,DEFAULT_MAX_MANIFEST_REQUEST_RETRY:4,DEFAULT_CDN_DOWNGRADE_TIME:60,DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR:4,INITIAL_BACKOFF_DELAY_BASE:{REGULAR:200,LOW_LATENCY:50},MAX_BACKOFF_DELAY_BASE:{REGULAR:3e3,LOW_LATENCY:1e3},SAMPLING_INTERVAL_MEDIASOURCE:1e3,SAMPLING_INTERVAL_LOW_LATENCY:500,SAMPLING_INTERVAL_NO_MEDIASOURCE:500,ABR_ENTER_BUFFER_BASED_ALGO:10,ABR_EXIT_BUFFER_BASED_ALGO:5,ABR_MINIMUM_TOTAL_BYTES:15e4,ABR_MINIMUM_CHUNK_SIZE:16e3,ABR_STARVATION_FACTOR:{DEFAULT:.72,LOW_LATENCY:.72},ABR_REGULAR_FACTOR:{DEFAULT:.72,LOW_LATENCY:.72},ABR_STARVATION_GAP:{DEFAULT:5,LOW_LATENCY:5},OUT_OF_STARVATION_GAP:{DEFAULT:7,LOW_LATENCY:7},ABR_STARVATION_DURATION_DELTA:.1,ABR_FAST_EMA:2,ABR_SLOW_EMA:10,RESUME_GAP_AFTER_SEEKING:{DEFAULT:1.5,LOW_LATENCY:.5},RESUME_GAP_AFTER_NOT_ENOUGH_DATA:{DEFAULT:.5,LOW_LATENCY:.5},RESUME_GAP_AFTER_BUFFERING:{DEFAULT:5,LOW_LATENCY:.5},REBUFFERING_GAP:{DEFAULT:.5,LOW_LATENCY:.2},MINIMUM_BUFFER_AMOUNT_BEFORE_FREEZING:2,UNFREEZING_SEEK_DELAY:6e3,FREEZING_STALLED_DELAY:600,UNFREEZING_DELTA_POSITION:.001,SEGMENT_SYNCHRONIZATION_DELAY:1500,MISSING_DATA_TRIGGER_SYNC_DELAY:.1,MAX_TIME_MISSING_FROM_COMPLETE_SEGMENT:.15,MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:.4,MAX_MANIFEST_BUFFERED_DURATION_DIFFERENCE:.3,MINIMUM_SEGMENT_SIZE:.001,APPEND_WINDOW_SECURITIES:{START:.2,END:.1},MAXIMUM_HTML_TEXT_TRACK_UPDATE_INTERVAL:50,TEXT_TRACK_SIZE_CHECKS_INTERVAL:250,BUFFER_PADDING:{audio:1,video:3,other:1},SEGMENT_PRIORITIES_STEPS:[2,4,8,12,18,25],MAX_HIGH_PRIORITY_LEVEL:1,MIN_CANCELABLE_PRIORITY:3,EME_DEFAULT_VIDEO_CODECS:['video/mp4;codecs="avc1.4d401e"','video/mp4;codecs="avc1.42e01e"','video/webm;codecs="vp8"'],EME_DEFAULT_AUDIO_CODECS:['audio/mp4;codecs="mp4a.40.2"',"audio/webm;codecs=opus"],EME_DEFAULT_WIDEVINE_ROBUSTNESSES:["HW_SECURE_ALL","HW_SECURE_DECODE","HW_SECURE_CRYPTO","SW_SECURE_DECODE","SW_SECURE_CRYPTO"],EME_DEFAULT_PLAYREADY_RECOMMENDATION_ROBUSTNESSES:["3000","2000"],EME_KEY_SYSTEMS:{clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.microsoft.playready.recommendation","com.microsoft.playready","com.chromecast.playready","com.youtube.playready"],fairplay:["com.apple.fps.1_0"]},MAX_CONSECUTIVE_MANIFEST_PARSING_IN_UNSAFE_MODE:10,MIN_MANIFEST_PARSING_TIME_TO_ENTER_UNSAFE_MODE:200,MIN_DASH_S_ELEMENTS_TO_PARSE_UNSAFELY:300,OUT_OF_SYNC_MANIFEST_REFRESH_DELAY:3e3,FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY:3e3,DASH_FALLBACK_LIFETIME_WHEN_MINIMUM_UPDATE_PERIOD_EQUAL_0:3,EME_DEFAULT_MAX_SIMULTANEOUS_MEDIA_KEY_SESSIONS:15,EME_MAX_STORED_PERSISTENT_SESSION_INFORMATION:1e3,EME_WAITING_DELAY_LOADED_SESSION_EMPTY_KEYSTATUSES:100,FORCED_ENDED_THRESHOLD:8e-4,ADAP_REP_SWITCH_BUFFER_PADDINGS:{video:{before:5,after:5},audio:{before:2,after:2.5},text:{before:0,after:0}},SOURCE_BUFFER_FLUSHING_INTERVAL:500,CONTENT_REPLACEMENT_PADDING:1.2,CACHE_LOAD_DURATION_THRESHOLDS:{video:50,audio:10},STREAM_EVENT_EMITTER_POLL_INTERVAL:250,DEFAULT_MAXIMUM_TIME_ROUNDING_ERROR:.001,BUFFERED_HISTORY_RETENTION_TIME:6e4,BUFFERED_HISTORY_MAXIMUM_ENTRIES:200,MIN_BUFFER_AHEAD:5,UPTO_CURRENT_POSITION_CLEANUP:5,DEFAULT_VIDEO_REPRESENTATIONS_SWITCHING_MODE:"seamless",DEFAULT_AUDIO_REPRESENTATIONS_SWITCHING_MODE:"seamless",DEFAULT_VIDEO_TRACK_SWITCHING_MODE:"reload",DEFAULT_AUDIO_TRACK_SWITCHING_MODE:"seamless"},ja=nu;function ru(n,...e){if(n==null)throw new TypeError("Cannot convert undefined or null to object");let t=Object(n);for(let r=0;r{this.removeEventListener(e,t)})}removeEventListener(e,t){if(v(e)){this._listeners={};return}let r=this._listeners[e];if(!Array.isArray(r))return;if(v(t)){delete this._listeners[e];return}let i=r.indexOf(t);i!==-1&&r.splice(i,1),r.length===0&&delete this._listeners[e]}trigger(e,t){let r=this._listeners[e];Array.isArray(r)&&r.slice().forEach(i=>{try{i(t)}catch(a){if(b.CURRENT_ENV===b.DEV)throw a instanceof Error?a:new Error("EventEmitter: listener error");console.error("RxPlayer: EventEmitter error",a instanceof Error?a:null)}})}};function D(){}var au="NONE",$t=class extends oe{constructor(){super(),this.error=D,this.warn=D,this.info=D,this.debug=D,this._levels={NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4},this._currentLevel=au}setLevel(e,t){let r,i=this._levels[e];typeof i=="number"?(r=i,this._currentLevel=e):(r=0,this._currentLevel="NONE"),t===void 0?(this.error=r>=this._levels.ERROR?console.error.bind(console):D,this.warn=r>=this._levels.WARNING?console.warn.bind(console):D,this.info=r>=this._levels.INFO?console.info.bind(console):D,this.debug=r>=this._levels.DEBUG?console.log.bind(console):D):(this.error=r>=this._levels.ERROR?(...a)=>t("ERROR",a):D,this.warn=r>=this._levels.WARNING?(...a)=>t("WARNING",a):D,this.info=r>=this._levels.INFO?(...a)=>t("INFO",a):D,this.debug=r>=this._levels.DEBUG?(...a)=>t("DEBUG",a):D),this.trigger("onLogLevelChange",this._currentLevel)}getLevel(){return this._currentLevel}hasLevel(e){return this._levels[e]>=this._levels[this._currentLevel]}};var ou=new $t,c=ou;var st=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope;var su=typeof window=="undefined"&&!st,nr=su;var rr;st?rr=self:nr?rr=global:rr=window;var Ee=rr;function ne(n,e,t){if(typeof Array.prototype.findIndex=="function")return n.findIndex(e,t);let r=n.length>>>0;for(let i=0;ithis.finish()))}getValue(){return this._value}setValue(e){if(this._isFinished){b.CURRENT_ENV===b.DEV&&console.error("Finished shared references cannot be updated");return}if(this._value=e,this._listeners.length===0)return;let t=this._listeners.slice();for(let r of t)try{r.hasBeenCleared||r.trigger(e,r.complete)}catch(i){}}setValueIfChanged(e){e!==this._value&&this.setValue(e)}onUpdate(e,t){let r=()=>{if((t==null?void 0:t.clearSignal)!==void 0&&t.clearSignal.deregister(r),i.hasBeenCleared)return;i.hasBeenCleared=!0;let a=this._listeners.indexOf(i);a>=0&&this._listeners.splice(a,1)},i={trigger:e,complete:r,hasBeenCleared:!1};if(this._listeners.push(i),(t==null?void 0:t.emitCurrentValue)===!0&&e(this._value,r),this._isFinished||i.hasBeenCleared){r();return}(t==null?void 0:t.clearSignal)!==void 0&&t.clearSignal.register(r)}waitUntilDefined(e,t){this.onUpdate((r,i)=>{r!==void 0&&(i(),e(this._value))},{clearSignal:t==null?void 0:t.clearSignal,emitCurrentValue:!0})}_onFinished(e,t){if(t.isCancelled())return D;let r=()=>{let o=ne(this._onFinishCbs,s=>s.trigger===i);o>=0&&(this._onFinishCbs[o].hasBeenCleared=!0,this._onFinishCbs.splice(o,1))},i=()=>{r(),e()},a=t.register(r);return this._onFinishCbs.push({trigger:i,hasBeenCleared:!1}),a}finish(){this._deregisterCancellation!==void 0&&this._deregisterCancellation(),this._isFinished=!0;let e=this._listeners.slice();for(let t of e)try{t.hasBeenCleared||(t.complete(),t.hasBeenCleared=!0)}catch(r){}if(this._listeners.length=0,this._onFinishCbs.length>0){let t=this._onFinishCbs.slice();for(let r of t)try{r.hasBeenCleared||(r.trigger(),r.hasBeenCleared=!0)}catch(i){}this._onFinishCbs.length=0}}};function Xt(n,e,t){let r=new ir(e(n.getValue()),t);return n.onUpdate(function(a){r.setValue(e(a))},{clearSignal:t}),n._onFinished(()=>{r.finish()},t),r}var j=ir;var jr=new j(0);function Ya({date:n,timestamp:e}){let t=n-e,r=typeof performance!="undefined"?Date.now()-performance.now():0;jr.setValueIfChanged(r-t)}var uu=typeof performance!="undefined"?()=>performance.now()+jr.getValue():()=>Date.now()+jr.getValue(),L=uu;var re=class n extends Error{constructor(e,t,r){let i;switch(r){case"TIMEOUT":i="The request timed out";break;case"ERROR_EVENT":i="An error prevented the request to be performed successfully";break;case"PARSE_ERROR":i="An error happened while formatting the response data";break;case"ERROR_HTTP_CODE":i="An HTTP status code indicating failure was received: "+String(t);break}super(i),Object.setPrototypeOf(this,n.prototype),this.name="RequestError",this.url=e,this.status=t,this.type=r}serialize(){return{url:this.url,status:this.status,type:this.type}}},ye={TIMEOUT:"TIMEOUT",ERROR_EVENT:"ERROR_EVENT",ERROR_HTTP_CODE:"ERROR_HTTP_CODE",PARSE_ERROR:"PARSE_ERROR"};var Yr=typeof Headers=="function"?Headers:null,Qr=typeof AbortController=="function"?AbortController:null;function ar(n){var m,p;let e;if(!v(n.headers))if(v(Yr))e=n.headers;else{e=new Yr;let g=Object.keys(n.headers);for(let h=0;h{r=!0,f!==void 0&&clearTimeout(f),s()},n.timeout));let f;n.connectionTimeout!==void 0&&(f=setTimeout(()=>{i=!0,u!==void 0&&clearTimeout(u),s()},n.connectionTimeout));let d=n.cancelSignal.register(function(h){t=h,s()}),l={method:"GET"};if(e!==void 0&&(l.headers=e),l.signal=v(o)?null:o.signal,c.hasLevel("DEBUG")){let g="FETCH: Sending GET "+n.url;n.timeout!==void 0&&(g+=" to="+String(n.timeout/1e3)),n.connectionTimeout!==void 0&&(g+=" cto="+String(n.connectionTimeout/1e3)),((m=n.headers)==null?void 0:m.Range)!==void 0&&(g+=" Range="+((p=n.headers)==null?void 0:p.Range)),c.debug(g)}return fetch(n.url,l).then(g=>{if(f!==void 0&&clearTimeout(f),g.status>=300)throw c.warn("Fetch: Request HTTP Error",g.status,g.url),new re(g.url,g.status,ye.ERROR_HTTP_CODE);if(v(g.body))throw new re(g.url,g.status,ye.PARSE_ERROR);let h=g.headers.get("Content-Length"),I=!v(h)&&!isNaN(+h)?+h:void 0,y=g.body.getReader(),T=0;return P();async function P(){let E=await y.read();if(!E.done&&!v(E.value)){T+=E.value.byteLength;let C=L(),R={url:g.url,currentTime:C,duration:C-a,sendingTime:a,chunkSize:E.value.byteLength,chunk:E.value.buffer,size:T,totalSize:I};return n.onData(R),P()}else if(E.done){u!==void 0&&clearTimeout(u),d();let C=L();return{requestDuration:C-a,receivedTime:C,sendingTime:a,size:T,status:g.status,url:g.url}}return P()}}).catch(g=>{throw t!==null?t:(d(),r?(c.warn("Fetch: Request timed out."),new re(n.url,0,ye.TIMEOUT)):i?(c.warn("Fetch: Request connection timed out."),new re(n.url,0,ye.TIMEOUT)):g instanceof re?g:(c.warn("Fetch: Request Error",g instanceof Error?g.toString():""),new re(n.url,0,ye.ERROR_EVENT)))})}function Zt(){return typeof Ee.fetch=="function"&&!v(Qr)&&!v(Yr)}function J(n){return typeof n=="string"&&n.length>0}var du="json";function $r(n){let e={url:n.url,headers:n.headers,responseType:v(n.responseType)?du:n.responseType,timeout:n.timeout,connectionTimeout:n.connectionTimeout};return new Promise((t,r)=>{let{onProgress:i,cancelSignal:a}=n,{url:o,headers:s,responseType:u,timeout:f,connectionTimeout:d}=e,l=new XMLHttpRequest;l.open("GET",o,!0);let m;f!==void 0&&(l.timeout=f,m=setTimeout(()=>{I(),r(new re(o,l.status,ye.TIMEOUT))},f+3e3));let p;if(d!==void 0&&(p=setTimeout(()=>{I(),l.readyState!==XMLHttpRequest.DONE&&l.abort(),r(new re(o,l.status,ye.TIMEOUT))},d)),l.responseType=u,l.responseType==="document"&&l.overrideMimeType("text/xml"),!v(s)){let y=s;for(let T in y)y.hasOwnProperty(T)&&l.setRequestHeader(T,y[T])}let g=L(),h=null;if(a!==void 0&&(h=a.register(function(T){I(),l.readyState!==XMLHttpRequest.DONE&&l.abort(),r(T)}),a.isCancelled()))return;if(l.onerror=function(){I(),r(new re(o,l.status,ye.ERROR_EVENT))},l.ontimeout=function(){I(),r(new re(o,l.status,ye.TIMEOUT))},d!==void 0&&(l.onreadystatechange=function(){l.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&clearTimeout(p)}),i!==void 0&&(l.onprogress=function(T){let P=L();i({url:o,duration:P-g,sendingTime:g,currentTime:P,size:T.loaded,totalSize:T.total})}),l.onload=function(T){if(l.readyState===XMLHttpRequest.DONE)if(I(),l.status>=200&&l.status<300){let P=L(),E=l.response instanceof ArrayBuffer?l.response.byteLength:T.total,C=l.status,R=l.responseType,k=J(l.responseURL)?l.responseURL:o,_;if(R==="json"?_=typeof l.response=="object"?l.response:lu(l.responseText):_=l.response,v(_)){r(new re(o,l.status,ye.PARSE_ERROR));return}t({status:C,url:k,responseType:R,sendingTime:g,receivedTime:P,requestDuration:P-g,size:E,responseData:_})}else r(new re(o,l.status,ye.ERROR_HTTP_CODE))},c.hasLevel("DEBUG")){let y="XHR: Sending GET "+o;n.responseType!==void 0&&(y+=" type="+n.responseType),f!==void 0&&(y+=" to="+String(f/1e3)),d!==void 0&&(y+=" cto="+String(d/1e3)),(s==null?void 0:s.Range)!==void 0&&(y+=" Range="+(s==null?void 0:s.Range)),c.debug(y)}l.send();function I(){m!==void 0&&clearTimeout(m),p!==void 0&&clearTimeout(p),h!==null&&h()}})}function lu(n){try{return JSON.parse(n)}catch(e){return null}}var le=$r;var St=ye,ze={NETWORK_ERROR:"NETWORK_ERROR",MEDIA_ERROR:"MEDIA_ERROR",ENCRYPTED_MEDIA_ERROR:"ENCRYPTED_MEDIA_ERROR",OTHER_ERROR:"OTHER_ERROR"};function $e(n,e){return`${n}: ${e}`}var Jt=class n extends Error{constructor(e,t,r){super($e(e,t)),Object.setPrototypeOf(this,n.prototype),this.name="EncryptedMediaError",this.type=ze.ENCRYPTED_MEDIA_ERROR,this.code=e,this._originalMessage=t,this.fatal=!1,typeof(r==null?void 0:r.keyStatuses)=="string"&&(this.keyStatuses=r.keyStatuses)}serialize(){return{name:this.name,code:this.code,reason:this._originalMessage,keyStatuses:this.keyStatuses}}};var Q=class n extends Error{constructor(e,t,r){super($e(e,t)),Object.setPrototypeOf(this,n.prototype),this.name="MediaError",this.type=ze.MEDIA_ERROR,this._originalMessage=t,this.code=e,this.fatal=!1,(r==null?void 0:r.tracks)!==void 0&&(r==null?void 0:r.tracks.length)>0&&(this.tracksInfo=r.tracks)}serialize(){return{name:this.name,code:this.code,reason:this._originalMessage,tracks:this.tracksInfo}}};var je=class n extends Error{constructor(e,t){super($e(e,t.message)),Object.setPrototypeOf(this,n.prototype),this.name="NetworkError",this.type=ze.NETWORK_ERROR,this.url=t.url,this.status=t.status,this.errorType=t.type,this._baseError=t,this.code=e,this.fatal=!1}isHttpError(e){return this.errorType===St.ERROR_HTTP_CODE&&this.status===e}serialize(){return{name:this.name,code:this.code,baseError:this._baseError.serialize()}}};var Re=class n extends Error{constructor(e,t){super($e(e,t)),Object.setPrototypeOf(this,n.prototype),this.name="OtherError",this.type=ze.OTHER_ERROR,this.code=e,this.fatal=!1,this._originalMessage=t}serialize(){return{name:this.name,code:this.code,reason:this._originalMessage}}};function wt(n){return(n instanceof Jt||n instanceof Q||n instanceof Re||n instanceof je)&&Object.keys(ze).indexOf(n.type)>=0}function he(n,{defaultCode:e,defaultReason:t}){if(wt(n))return n;let r=n instanceof Error?n.toString():t;return new Re(e,r)}var Ce=class n extends Error{constructor(e,t,r){super(t),Object.setPrototypeOf(this,n.prototype),this.name="SourceBufferError",this.errorName=e,this.isBufferFull=r}serialize(){return{errorName:this.name,message:this.message,isBufferFull:this.isBufferFull}}toString(){return`${this.errorName}: ${this.message}`}};var fu={dashParsers:{wasm:null,native:null,fastJs:null},codecSupportProber:null,createDebugElement:null,directfile:null,decrypt:null,htmlTextDisplayer:null,htmlTextTracksParsers:{},mainThreadMediaSourceInit:null,multithread:null,nativeTextDisplayer:null,nativeTextTracksParsers:{},transports:{}},Qa=fu;var ae=Qa;function K(n,e,t){if(typeof Array.prototype.find=="function")return n.find(e,t);let r=n.length>>>0;for(let i=0;i=0;t--)if(n[t]!==e[t])return!1;return!0}function Ae(){let n="",e=-1;return function(){return e++,e>=Number.MAX_SAFE_INTEGER&&(n+="0",e=0),n+String(e)}}var hu=Ae(),Xr=class{constructor(e,t){var r,i,a,o,s;if(this.id=e.id,this.uniqueId=hu(),this.bitrate=e.bitrate,this.codecs=[],e.isSpatialAudio!==void 0&&(this.isSpatialAudio=e.isSpatialAudio),e.height!==void 0&&(this.height=e.height),e.width!==void 0&&(this.width=e.width),e.mimeType!==void 0&&(this.mimeType=e.mimeType),e.contentProtections!==void 0&&(this.contentProtections=e.contentProtections),e.frameRate!==void 0&&(this.frameRate=e.frameRate),e.hdrInfo!==void 0&&(this.hdrInfo=e.hdrInfo),this.cdnMetadata=e.cdnMetadata,this.index=e.index,t==="audio"||t==="video")if(ae.codecSupportProber!==null){if(e.supplementalCodecs!==void 0){let u=ae.codecSupportProber.isSupported((r=this.mimeType)!=null?r:"",(i=e.supplementalCodecs)!=null?i:"");u!==!1&&(this.codecs=[e.supplementalCodecs],u===!0&&(this.isSupported=!0))}this.isSupported!==!0&&(this.codecs.length>0?this.codecs.push((a=e.codecs)!=null?a:""):(this.codecs=e.codecs===void 0?[]:[e.codecs],this.isSupported=ae.codecSupportProber.isSupported((o=this.mimeType)!=null?o:"",(s=e.codecs)!=null?s:"")))}else e.supplementalCodecs!==void 0&&this.codecs.push(e.supplementalCodecs),e.codecs!==void 0&&this.codecs.push(e.codecs);else e.codecs!==void 0&&this.codecs.push(e.codecs),this.isSupported=!0}refreshCodecSupport(e){var i;let t=(i=this.mimeType)!=null?i:"",r=this.codecs;r.length===0&&(r=[""]);for(let a=0;al.keyId);r.push({type:u.type,keyIds:d,values:[u.values[f]]}),s=!0}}return r}getAllEncryptionData(){var t,r;if(this.contentProtections===void 0||this.contentProtections.initData.length===0)return[];let e=(r=(t=this.contentProtections)==null?void 0:t.keyIds)==null?void 0:r.map(i=>i.keyId);return this.contentProtections.initData.map(i=>({type:i.type,keyIds:e,values:i.values}))}addProtectionData(e,t,r){let i=!1;if(this.contentProtections===void 0)return this.contentProtections={keyIds:t!==void 0?[{keyId:t}]:[],initData:[{type:e,values:r}]},!0;if(t!==void 0){let o=this.contentProtections.keyIds;if(o===void 0)this.contentProtections.keyIds=[{keyId:t}];else{let s=!1;for(let u of o)or(u.keyId,t)&&(s=!0);s||(c.warn("Manifest: found unanounced key id."),o.push({keyId:t}))}}let a=this.contentProtections.initData;for(let o=0;o0&&(this.trickModeTracks=r.map(f=>new n(f)));let o=e.representations,s=[],u;for(let f=0;fg);m.contentProtections.keyIds=p}l=i(m,{trackType:this.type,language:this.language,normalizedLanguage:this.normalizedLanguage,isClosedCaption:this.isClosedCaption,isDub:this.isDub,isAudioDescription:this.isAudioDescription,isSignInterpreted:this.isSignInterpreted})}l?(s.push(d),u===void 0&&(d.isSupported===!0?u=!0:d.isSupported===!1&&(u=!1))):c.debug("Filtering Representation due to representationFilter",this.type,`Adaptation: ${this.id}`,`Representation: ${d.id}`,`(${d.bitrate})`)}s.sort((f,d)=>f.bitrate-d.bitrate),this.representations=s,this.isSupported=u,this.manuallyAdded=a===!0}refreshCodecSupport(e){for(let t of this.representations)t.isSupported===void 0&&(t.refreshCodecSupport(e),this.isSupported!==!0&&t.isSupported===!0?this.isSupported=!0:this.isSupported===void 0&&t.isSupported===!1&&(this.isSupported=!1))}getRepresentation(e){return K(this.representations,({id:t})=>e===t)}getMetadataSnapshot(){let e=[],t=this.representations;for(let r of t)e.push(r.getMetadataSnapshot());return{id:this.id,type:this.type,isSupported:this.isSupported,language:this.language,isForcedSubtitles:this.isForcedSubtitles,isClosedCaption:this.isClosedCaption,isAudioDescription:this.isAudioDescription,isSignInterpreted:this.isSignInterpreted,normalizedLanguage:this.normalizedLanguage,representations:e,label:this.label,isDub:this.isDub}}};function se(n,e,t){if(typeof Array.prototype.includes=="function")return n.includes(e,t);let r=n.length>>>0;if(r===0)return!1;let i=t|0,a=i>=0?Math.min(i,r-1):Math.max(r+i,0),o=(s,u)=>s===u||typeof s=="number"&&typeof u=="number"&&isNaN(s)&&isNaN(u);for(;an[e])}var sr=typeof Object.values=="function"?Object.values:Zr;var Dt=["audio","video","text"];function no(n){var a,o;let e=n.timeBounds;if(e.timeshiftDepth===null)return(a=e.minimumSafePosition)!=null?a:0;let{maximumTimeData:t}=e,r;if(!e.maximumTimeData.isLinear)r=t.maximumSafePosition;else{let s=L()-t.time;r=t.maximumSafePosition+s/1e3}let i=r-e.timeshiftDepth;return Math.max((o=e.minimumSafePosition)!=null?o:0,i)}function ro(n){let{maximumTimeData:e}=n.timeBounds;if(!n.isLive||e.livePosition===void 0)return;if(!e.isLinear)return e.livePosition;let t=L()-e.time;return e.livePosition+t/1e3}function io(n){let{maximumTimeData:e}=n.timeBounds;if(!e.isLinear)return e.maximumSafePosition;let t=L()-e.time;return e.maximumSafePosition+t/1e3}function ao(n,e){if(e===void 0)return ei(n).filter(r=>r.isSupported===!0);let t=n.adaptations[e];return t===void 0?[]:t.filter(r=>r.isSupported===!0)}function oo(n,e){let t=null;for(let r=n.periods.length-1;r>=0;r--){let i=n.periods[r];if(Jr(i,e,t))return i;t=i}}function so(n,e){let t=e.end;if(t===void 0)return null;let r=K(n.periods,i=>i.end===void 0||t=n.start&&(n.end===void 0||en.end)}function ei(n){let e=n.adaptations;return Zr(e).reduce((t,r)=>v(r)?t:t.concat(r),[])}function Iu(n,e){var r,i;let t={language:(r=n.language)!=null?r:"",normalized:(i=n.normalizedLanguage)!=null?i:"",audioDescription:n.isAudioDescription===!0,id:n.id,representations:(e?n.representations.filter(a=>a.isSupported===!0&&a.decipherable!==!1):n.representations).map(yu),label:n.label};return n.isDub===!0&&(t.dub=!0),t}function bu(n){var e,t;return{language:(e=n.language)!=null?e:"",normalized:(t=n.normalizedLanguage)!=null?t:"",closedCaption:n.isClosedCaption===!0,id:n.id,label:n.label,forced:n.isForcedSubtitles}}function Su(n,e){let t=n.trickModeTracks!==void 0?n.trickModeTracks.map(i=>{let a=(e?i.representations.filter(s=>s.isSupported===!0&&s.decipherable!==!1):i.representations).map(to),o={id:i.id,representations:a,isTrickModeTrack:!0};return i.isSignInterpreted===!0&&(o.signInterpreted=!0),o}):void 0,r={id:n.id,representations:(e?n.representations.filter(i=>i.isSupported===!0&&i.decipherable!==!1):n.representations).map(to),label:n.label};return n.isSignInterpreted===!0&&(r.signInterpreted=!0),n.isTrickModeTrack===!0&&(r.isTrickModeTrack=!0),t!==void 0&&(r.trickModeTracks=t),r}function yu(n){let{id:e,bitrate:t,codecs:r,isSpatialAudio:i,isSupported:a,decipherable:o}=n;return{id:e,bitrate:t,codec:r==null?void 0:r[0],isSpatialAudio:i,isCodecSupported:a,decipherable:o}}function to(n){let{id:e,bitrate:t,frameRate:r,width:i,height:a,codecs:o,hdrInfo:s,isSupported:u,decipherable:f}=n;return{id:e,bitrate:t,frameRate:r,width:i,height:a,codec:o==null?void 0:o[0],hdrInfo:s,isCodecSupported:u,decipherable:f}}function dt(n){switch(n.type){case"audio":return{type:"audio",track:Iu(n,!1)};case"video":return{type:"video",track:Su(n,!1)};case"text":return{type:"text",track:bu(n)}}}function uo(n){return new Function(`return (${n}(arguments[0], arguments[1]))`)}var lt=class{constructor(e,t,r){if(this.id=e.id,this.adaptations=Object.keys(e.adaptations).reduce((i,a)=>{let o=e.adaptations[a];if(v(o))return i;let s=o.map(u=>{let f=new ut(u,{representationFilter:r});return f.representations.length>0&&f.isSupported===!1&&t.push(f),f}).filter(u=>u.representations.length>0);if(s.every(u=>u.isSupported===!1)&&o.length>0&&(a==="video"||a==="audio"))throw new Q("MANIFEST_INCOMPATIBLE_CODECS_ERROR","No supported "+a+" adaptations",{tracks:void 0});return s.length>0&&(i[a]=s),i},{}),!Array.isArray(this.adaptations.video)&&!Array.isArray(this.adaptations.audio))throw new Q("MANIFEST_PARSE_ERROR","No supported audio and video tracks.");this.duration=e.duration,this.start=e.start,!v(this.duration)&&!v(this.start)&&(this.end=this.start+this.duration),this.streamEvents=e.streamEvents===void 0?[]:e.streamEvents}refreshCodecSupport(e,t){Object.keys(this.adaptations).forEach(r=>{let i=this.adaptations[r];if(i===void 0)return;let a=!1;for(let o of i){let s=o.isSupported;o.refreshCodecSupport(e),s!==!1&&o.isSupported===!1&&t.push(o),a===!1?a=o.isSupported:a===void 0&&o.isSupported===!0&&(a=!0)}if((r==="video"||r==="audio")&&a===!1)throw new Q("MANIFEST_INCOMPATIBLE_CODECS_ERROR","No supported "+r+" adaptations",{tracks:void 0})},{})}getAdaptations(){return ei(this)}getAdaptationsForType(e){let t=this.adaptations[e];return t!=null?t:[]}getAdaptation(e){return K(this.getAdaptations(),({id:t})=>e===t)}getSupportedAdaptations(e){return ao(this,e)}containsTime(e,t){return Jr(this,e,t)}getMetadataSnapshot(){let e={},t=this.getAdaptations();for(let r of t){let i=e[r.type];i===void 0&&(i=[],e[r.type]=i),i.push(r.getMetadataSnapshot())}return{start:this.start,end:this.end,id:this.id,streamEvents:this.streamEvents,adaptations:e}}};function tn(n,e,t){let r={updatedAdaptations:[],removedAdaptations:[],addedAdaptations:[]};n.start=e.start,n.end=e.end,n.duration=e.duration,n.streamEvents=e.streamEvents;let i=n.getAdaptations(),a=e.getAdaptations();for(let o=0;of.id===s.id);if(u===-1){c.warn('Manifest: Adaptation "'+i[o].id+'" not found when merging.');let[f]=i.splice(o,1);o--,r.removedAdaptations.push({id:f.id,trackType:f.type})}else{let[f]=a.splice(u,1),d=[],l=[],m=[];r.updatedAdaptations.push({adaptation:s.id,trackType:s.type,updatedRepresentations:d,addedRepresentations:l,removedRepresentations:m});let p=s.representations,g=f.representations.slice();for(let h=0;hT.id===I.id);if(y===-1){c.warn(`Manifest: Representation "${p[h].id}" not found when merging.`);let[T]=p.splice(h,1);h--,m.push(T.id)}else{let[T]=g.splice(y,1);d.push(I.getMetadataSnapshot()),I.cdnMetadata=T.cdnMetadata,t===0?I.index._replace(T.index):I.index._update(T.index)}}g.length>0&&(c.warn(`Manifest: ${g.length} new Representations found when merging.`),s.representations.push(...g),l.push(...g.map(h=>h.getMetadataSnapshot())))}}if(a.length>0){c.warn(`Manifest: ${a.length} new Adaptations found when merging.`);for(let o of a){let s=n.adaptations[o.type];s===void 0?n.adaptations[o.type]=[o]:s.push(o),r.addedAdaptations.push(o.getMetadataSnapshot())}}return r}function lo(n,e){let t={updatedPeriods:[],addedPeriods:[],removedPeriods:[]},r=0;for(let a=0;a({id:p.id,start:p.start,end:p.end}))),t.addedPeriods.push(...d.map(p=>p.getMetadataSnapshot())),r=a+1}}if(r>n.length)return c.error("Manifest: error when updating Periods"),t;if(r({id:o.id,start:o.start,end:o.end})))}let i=e.slice(r,e.length);return i.length>0&&(n.push(...i),t.addedPeriods.push(...i.map(a=>a.getMetadataSnapshot()))),t}function fo(n,e){let t={updatedPeriods:[],addedPeriods:[],removedPeriods:[]};if(n.length===0)return n.splice(0,0,...e),t.addedPeriods.push(...e.map(s=>s.getMetadataSnapshot())),t;if(e.length===0)return t;let r=n[n.length-1];if(r.starts.getMetadataSnapshot())),t}let i=ne(n,({id:s})=>s===e[0].id);if(i<0)throw new Q("MANIFEST_UPDATE_ERROR","Cannot perform partial update: incoherent data");let a=tn(n[i],e[0],1);t.updatedPeriods.push({period:H(n[i].getMetadataSnapshot(),{adaptations:void 0}),result:a});let o=i+1;for(let s=1;s({id:p.id,start:p.start,end:p.end})))}else{if(f>o){c.warn("Manifest: old Periods not found in new when updating, removing");let l=n.splice(o,f-o);t.removedPeriods.push(...l.map(m=>({id:m.id,start:m.start,end:m.end}))),f=o}let d=tn(n[f],u,0);t.updatedPeriods.push({period:H(n[f].getMetadataSnapshot(),{adaptations:void 0}),result:d})}o++}if(o({id:u.id,start:u.start,end:u.end})))}return t}var _u=Ae(),nn=class extends oe{constructor(e,t,r){var s;super();let{representationFilter:i,manifestUpdateUrl:a}=t;this.manifestFormat=0,this.id=_u(),this.expired=(s=e.expired)!=null?s:null,this.transport=e.transportType,this.clockOffset=e.clockOffset;let o=[];if(this.periods=e.periods.map(u=>new lt(u,o,i)).sort((u,f)=>u.start-f.start),o.length>0){let u=new Q("MANIFEST_INCOMPATIBLE_CODECS_ERROR","An Adaptation contains only incompatible codecs.",{tracks:o.map(dt)});r.push(u)}this.adaptations=this.periods[0]===void 0?{}:this.periods[0].adaptations,this.timeBounds=e.timeBounds,this.isDynamic=e.isDynamic,this.isLive=e.isLive,this.isLastPeriodKnown=e.isLastPeriodKnown,this.uris=e.uris===void 0?[]:e.uris,this.updateUrl=a,this.lifetime=e.lifetime,this.clockOffset=e.clockOffset,this.suggestedPresentationDelay=e.suggestedPresentationDelay,this.availabilityStartTime=e.availabilityStartTime,this.publishTime=e.publishTime}refreshCodecSupport(e){let t=[];for(let r of this.periods)r.refreshCodecSupport(e,t);return t.length>0?new Q("MANIFEST_INCOMPATIBLE_CODECS_ERROR","An Adaptation contains only incompatible codecs.",{tracks:t.map(dt)}):null}getPeriod(e){return K(this.periods,t=>e===t.id)}getPeriodForTime(e){return oo(this,e)}getNextPeriod(e){return K(this.periods,t=>t.start>e)}getPeriodAfter(e){return so(this,e)}getUrls(){return this.uris}replace(e){this._performUpdate(e,0)}update(e){this._performUpdate(e,1)}getMinimumSafePosition(){return no(this)}getLivePosition(){return ro(this)}getMaximumSafePosition(){return io(this)}updateRepresentationsDeciperability(e){let t=Tu(this,e);t.length>0&&this.trigger("decipherabilityUpdate",t)}getAdaptations(){Xe("manifest.getAdaptations() is deprecated. Please use manifest.period[].getAdaptations() instead");let e=this.periods[0];if(e===void 0)return[];let t=e.adaptations,r=[];for(let i in t)if(t.hasOwnProperty(i)){let a=t[i];r.push(...a)}return r}getAdaptationsForType(e){Xe("manifest.getAdaptationsForType(type) is deprecated. Please use manifest.period[].getAdaptationsForType(type) instead");let t=this.periods[0];if(t===void 0)return[];let r=t.adaptations[e];return r===void 0?[]:r}getAdaptation(e){return Xe("manifest.getAdaptation(id) is deprecated. Please use manifest.period[].getAdaptation(id) instead"),K(this.getAdaptations(),({id:t})=>e===t)}getMetadataSnapshot(){let e=[];for(let t of this.periods)e.push(t.getMetadataSnapshot());return{manifestFormat:1,id:this.id,periods:e,isDynamic:this.isDynamic,isLive:this.isLive,isLastPeriodKnown:this.isLastPeriodKnown,suggestedPresentationDelay:this.suggestedPresentationDelay,clockOffset:this.clockOffset,uris:this.uris,availabilityStartTime:this.availabilityStartTime,timeBounds:this.timeBounds}}_performUpdate(e,t){this.availabilityStartTime=e.availabilityStartTime,this.expired=e.expired,this.isDynamic=e.isDynamic,this.isLive=e.isLive,this.isLastPeriodKnown=e.isLastPeriodKnown,this.lifetime=e.lifetime,this.clockOffset=e.clockOffset,this.suggestedPresentationDelay=e.suggestedPresentationDelay,this.transport=e.transport,this.publishTime=e.publishTime;let r;if(t===0)this.timeBounds=e.timeBounds,this.uris=e.uris,r=lo(this.periods,e.periods);else{this.timeBounds.maximumTimeData=e.timeBounds.maximumTimeData,this.updateUrl=e.uris[0],r=fo(this.periods,e.periods);let i=this.getMinimumSafePosition();for(;this.periods.length>0;){let a=this.periods[0];if(a.end===void 0||a.end>i)break;this.periods.shift()}}this.adaptations=this.periods[0]===void 0?{}:this.periods[0].adaptations,this.trigger("manifestUpdate",r)}};function Tu(n,e){let t=[];for(let r of n.periods)for(let i of r.getAdaptations())for(let a of i.representations){let o={manifest:n,period:r,adaptation:i,representation:a},s=e(o);s!==a.decipherable&&(t.push(o),a.decipherable=s,c.debug(`Decipherability changed for "${a.id}"`,`(${a.bitrate})`,String(a.decipherable)))}return t}function Ze(n,e){return n.segment.id===e.segment.id&&n.representation.uniqueId===e.representation.uniqueId}function yt(n){if(v(n))return"";let{period:e,adaptation:t,representation:r,segment:i}=n,a;return i.isInit?a="init":i.complete?a=`${i.time}-${i.duration}`:a=`${i.time}`,`${t.type} P: ${e.id} A: ${t.id} R: ${r.id} S: ${a}`}var Nt=nn;var ft=Ee,_t=ft===void 0?void 0:v(ft.MediaSource)?v(ft.MozMediaSource)?v(ft.WebKitMediaSource)?ft.MSMediaSource:ft.WebKitMediaSource:ft.MozMediaSource:ft.MediaSource;var Eu=200,ur=new Map;function ti(n){if(v(_t))return st&&c.error("Compat: Cannot request codec support in a worker without MSE."),!1;if(typeof _t.isTypeSupported=="function"){let e=ur.get(n);if(e!==void 0)return e;{let t=_t.isTypeSupported(n);return ur.size>=Eu&&ur.clear(),ur.set(n,t),t}}return!0}var Ru=50,ni=class{constructor(){this._cachedCodecSupport=new Map}isSupported(e,t){let r=`${e!=null?e:""};codecs="${t!=null?t:""}"`,i=this._cachedCodecSupport.get(r);if(i!==void 0)return i;this._cachedCodecSupport.size>=Ru&&this._cachedCodecSupport.clear();let a=ti(r);return this._cachedCodecSupport.set(r,a),a}},Pu=new ni,mo=Pu;var ri=class{constructor(){this._currentCacheSize=0,this._cachedCodecSupport=new Map}isSupported(e,t){var i;let r=(i=this._cachedCodecSupport.get(e))==null?void 0:i.get(t);if(r!==void 0)return r}updateCache(e,t,r){this._currentCacheSize>=50&&(this._cachedCodecSupport.clear(),this._currentCacheSize=0);let i=this._cachedCodecSupport.get(e);if(i!==void 0)i.set(t,r);else{let a=new Map;a.set(t,r),this._cachedCodecSupport.set(e,a)}}},co=new ri;var dr=class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype),this.name="AssertionError"}};function Ie(n,e){if(b.DEV===b.CURRENT_ENV&&!n)throw new dr(e===void 0?"invalid assertion":e)}function We(n){throw new dr("Unreachable path taken")}var vu="<";var po=">";var Cu=`\r + >/= `;function ii(n,e={}){var m,p;let t=(m=e.pos)!=null?m:0,r=e.keepComments===!0,i=e.keepWhitespace===!0,a;if(e.attrValue!==void 0)for(e.attrName=(p=e.attrName)!=null?p:"id",a=[];(t=l())!==-1;)t=n.lastIndexOf("<",t),t!==-1&&a.push(f()),n=n.substring(t),t=0;else a=o("");return e.filter&&(a=go(a,e.filter)),a;function o(g){let h=[];for(;n[t];)if(n.charCodeAt(t)===60){if(n.charCodeAt(t+1)===47){let y=t+2;if(t=n.indexOf(po,t),n.substring(y,t).indexOf(g)===-1){let P=n.substring(0,t).split(` +`);throw new Error(`Unexpected close tag +Line: `+(P.length-1)+` +Column: `+(P[P.length-1].length+1)+` +Char: `+n[t])}return t!==-1&&(t+=1),h}else if(n.charCodeAt(t+1)===33){if(n.charCodeAt(t+2)===45){let y=t;for(;t!==-1&&!(n.charCodeAt(t)===62&&n.charCodeAt(t-1)===45&&n.charCodeAt(t-2)===45);)t=n.indexOf(po,t+1);t===-1&&(t=n.length),r&&h.push(n.substring(y,t+1))}else if(n.charCodeAt(t+2)===91&&n.charCodeAt(t+8)===91&&n.substring(t+3,t+8).toLowerCase()==="cdata"){let y=n.indexOf("]]>",t);y===-1?(h.push(n.substring(t+9)),t=n.length):(h.push(n.substring(t+9,y)),t=y+3);continue}else{let y=t+1;t+=2;let T=!1;for(;(n.charCodeAt(t)!==62||T)&&n[t];)n.charCodeAt(t)===91?T=!0:T&&n.charCodeAt(t)===93&&(T=!1),t++;h.push(n.substring(y,t))}t++;continue}let I=f();h.push(I),I.tagName[0]==="?"&&(h.push(...I.children),I.children=[])}else{let I=s();if(i)I.length>0&&h.push(I);else{let y=I.trim();y.length>0&&h.push(y)}t++}return h}function s(){let g=t;return t=n.indexOf(vu,t)-1,t===-2&&(t=n.length),n.slice(g,t+1)}function u(){let g=t;for(;Cu.indexOf(n[t])===-1&&n[t];)t++;return n.slice(g,t)}function f(){let g=t;t++;let h=u(),I={},y=[];for(;n.charCodeAt(t)!==62&&n[t];){let T=n.charCodeAt(t);if(T>64&&T<91||T>96&&T<123){let P=u(),E=n.charCodeAt(t);for(;E&&E!==39&&E!==34&&!(E>64&&E<91||E>96&&E<123)&&E!==62;)t++,E=n.charCodeAt(t);let C;E===39||E===34?C=d():(C=null,t--),I[P]=C===null?null:ho(C)}t++}return n.charCodeAt(t-1)!==47?(t++,y=o(h)):t++,{tagName:h,attributes:I,children:y,posStart:g,posEnd:t}}function d(){let g=n[t],h=t+1;return t=n.indexOf(g,h),n.slice(h,t)}function l(){let g=new RegExp("\\s"+e.attrName+`\\s*=['"]`+e.attrValue+`['"]`).exec(n);return g?g.index:-1}}function go(n,e,t=0,r=""){let i=[];return n.forEach(function(a,o){if(typeof a=="object"&&(e(a,o,t,r)&&i.push(a),a.children.length>0)){let s=go(a.children,e,t+1,(r?r+".":"")+o+"."+a.tagName);i=i.concat(s)}}),i}function lr(n){if(Array.isArray(n)){let e="";return n.forEach(function(t){e+=" "+lr(t),e=e.trim()}),e}else return typeof n=="object"?lr(n.children):" "+ho(n)}function ho(n){return n.indexOf("&")<0?n:n.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&#x([A-Fa-f0-9]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16))).replace(/&/g,"&")}function ai(n,e,t){let{repeatCount:r}=n;if(r>=0)return r;let i;return v(e)?t!==void 0?i=t:i=Number.MAX_VALUE:i=e.start,Math.ceil((i-n.start)/n.duration)-1}function Ne(n,e,t){let{start:r,duration:i}=n;if(i<=0)return r;let a=ai(n,e,t);return r+(a+1)*i}function Pe(n,e){var t;return n*e.timescale+((t=e.indexTimeOffset)!=null?t:0)}function Ye(n,e){var t;return(n-((t=e.indexTimeOffset)!=null?t:0))/e.timescale}function Io(n,e,t){return[n*t,(n+e)*t]}function Au(n,e){let t=0,r=n.length;for(;t>>1;n[i].start<=e?t=i+1:r=i}return t-1}function bo(n,e,t){let{timeline:r}=n,i=Pe(e,n);if(i<0)return null;let a=Au(r,i);if(a<0||a>=r.length-1)return null;let o=r[a];if(o.duration<=0)return null;let s=r[a+1];if(s===void 0)return null;let u=s.start,f=Ne(o,s,t);return i>=f&&i=e?t:(new Array(e+1).join("0")+t).slice(-e)}function oi(n){return(e,t,r)=>{let i=J(r)?parseInt(r,10):1;return ku(String(n),i)}}function Be(n,e,t){return xu(n,e,t)}function xu(n,e,t){return n.indexOf("$")===-1?n:n.replace(/\$\$/g,"$").replace(/\$RepresentationID\$/g,String(e)).replace(/\$Bandwidth(\%0(\d+)d)?\$/g,oi(t===void 0?0:t))}function fr(n,e){return function(r){return r.indexOf("$")===-1?r:r.replace(/\$\$/g,"$").replace(/\$Number(\%0(\d+)d)?\$/g,(i,a,o)=>{if(e===void 0)throw new Error("Segment number not defined in a $Number$ scheme");return oi(e)(i,a,o)}).replace(/\$Time(\%0(\d+)d)?\$/g,(i,a,o)=>{if(n===void 0)throw new Error("Segment time not defined in a $Time$ scheme");return oi(n)(i,a,o)})}}function Mu(n,e,t){let r=t-n;return r>0?Math.floor(r/e):0}function rn(n,e,t,r,i,a){var T;let o=r.getEstimatedMaximumPosition((T=n.availabilityTimeOffset)!=null?T:0),s=Math.min(e+t,o!=null?o:1/0),u=Pe(e,n),f=Pe(s,n),{timeline:d,timescale:l,segmentUrlTemplate:m,startNumber:p,endNumber:g}=n,h=p!=null?p:1,I=[],y=d.length;for(let P=0;Pg)break;let O=m===null?null:fr(N,w)(m),B=N-n.indexTimeOffset,V=C;B<0&&(V=C+B,B=0);let q={id:String(N),time:B/l,end:(B+V)/l,duration:V/l,isInit:!1,range:k,timescale:1,url:O,number:w,timestampOffset:-(n.indexTimeOffset/l),complete:x,privateInfos:{isEMSGWhitelisted:a}};I.push(q),M++,N=R+M*C}if(N>=f||(h+=A+1,g!==void 0&&h>g))return I}return I}function Ou(n,e){if(e.timescale!==n.timescale){let{timescale:t}=n;n.timeline.push({start:e.time/e.timescale*t,duration:e.duration/e.timescale*t,repeatCount:e.count===void 0?0:e.count,range:e.range})}else n.timeline.push({start:e.time,duration:e.duration,repeatCount:e.count===void 0?0:e.count,range:e.range});return!0}var Tt=class{constructor(e,t){var g,h,I,y;let{periodStart:r,periodEnd:i,representationId:a,representationBitrate:o,isEMSGWhitelisted:s}=t,u=(g=e.timescale)!=null?g:1,d=((h=e.presentationTimeOffset)!=null?h:0)-r*u,l=((I=e.initialization)==null?void 0:I.media)===void 0?null:Be(e.initialization.media,a,o),m=e.media===void 0?null:Be(e.media,a,o),p;e.initialization!==void 0?p=e.initialization.range:e.indexRange!==void 0&&(p=[0,e.indexRange[0]-1]),this._index={indexRange:e.indexRange,indexTimeOffset:d,initialization:{url:l,range:p},segmentUrlTemplate:m,startNumber:e.startNumber,endNumber:e.endNumber,timeline:(y=e.timeline)!=null?y:[],timescale:u},this._manifestBoundsCalculator=t.manifestBoundsCalculator,this._scaledPeriodStart=Pe(r,this._index),this._scaledPeriodEnd=v(i)?void 0:Pe(i,this._index),this._isInitialized=this._index.timeline.length>0,this._isEMSGWhitelisted=s}getInitSegment(){return Je(this._index,this._isEMSGWhitelisted)}getSegments(e,t){return rn(this._index,e,t,this._manifestBoundsCalculator,this._scaledPeriodEnd,this._isEMSGWhitelisted)}shouldRefresh(){return!1}getFirstAvailablePosition(){let e=this._index;return e.timeline.length===0?null:Ye(Math.max(this._scaledPeriodStart,e.timeline[0].start),e)}getLastAvailablePosition(){var i;let{timeline:e}=this._index;if(e.length===0)return null;let t=e[e.length-1],r=Math.min(Ne(t,null,this._scaledPeriodEnd),(i=this._scaledPeriodEnd)!=null?i:1/0);return Ye(r,this._index)}getEnd(){return this.getLastAvailablePosition()}awaitSegmentBetween(){return!1}isSegmentStillAvailable(){return!0}checkDiscontinuity(){return null}canBeOutOfSyncError(){return!1}isStillAwaitingFutureSegments(){return!1}isInitialized(){return this._isInitialized}initialize(e){if(!this._isInitialized){for(let t=0;t({url:I.media===void 0?null:Be(I.media,a,o),mediaRange:I.mediaRange}));this._index={list:m,timescale:f,duration:e.duration,indexTimeOffset:d,indexRange:e.indexRange,initialization:v(e.initialization)?void 0:{url:l,range:e.initialization.range}}}getInitSegment(){let e=Je(this._index);return e.privateInfos===void 0&&(e.privateInfos={}),e.privateInfos.isEMSGWhitelisted=this._isEMSGWhitelisted,e}getSegments(e,t){let r=this._index,{duration:i,list:a,timescale:o}=r,s=i/o,u=e-this._periodStart,[f,d]=Io(u,t,o),l=Math.min(a.length-1,Math.floor(d/i)),m=[],p=Math.floor(f/i);for(;p<=l;){let g=a[p].mediaRange,h=a[p].url,I=p*s+this._periodStart,y={id:String(p),time:I,isInit:!1,range:g,duration:s,timescale:1,end:I+s,url:h,timestampOffset:-(r.indexTimeOffset/o),complete:!0,privateInfos:{isEMSGWhitelisted:this._isEMSGWhitelisted}};m.push(y),p++}return m}shouldRefresh(e,t){return!1}getFirstAvailablePosition(){return this._periodStart}getLastAvailablePosition(){var i;let e=this._index,{duration:t,list:r}=e;return Math.min(r.length*t/e.timescale+this._periodStart,(i=this._periodEnd)!=null?i:1/0)}getEnd(){return this.getLastAvailablePosition()}awaitSegmentBetween(){return!1}isSegmentStillAvailable(){return!0}checkDiscontinuity(){return null}canBeOutOfSyncError(){return!1}isStillAwaitingFutureSegments(){return!1}isInitialized(){return!0}initialize(){c.error("A `ListRepresentationIndex` does not need to be initialized")}addPredictedSegments(){c.warn("Cannot add predicted segments to a `ListRepresentationIndex`")}_replace(e){this._index=e._index}_update(){c.error("A `ListRepresentationIndex` cannot be updated")}};function Bt(n){return U.getCurrent().DEFAULT_MAXIMUM_TIME_ROUNDING_ERROR*n}var Rt=class{constructor(e,t){var y,T,P;let{availabilityTimeOffset:r,manifestBoundsCalculator:i,isDynamic:a,periodEnd:o,periodStart:s,representationId:u,representationBitrate:f,isEMSGWhitelisted:d}=t,l=(y=e.timescale)!=null?y:1;this._availabilityTimeOffset=r,this._manifestBoundsCalculator=i;let m=(T=e.presentationTimeOffset)!=null?T:0,p=s*l,g=m-p;if(e.duration===void 0)throw new Error("Invalid SegmentTemplate: no duration");let h=((P=e.initialization)==null?void 0:P.media)===void 0?null:Be(e.initialization.media,u,f),I=e.media===void 0?null:Be(e.media,u,f);this._index={duration:e.duration,timescale:l,indexRange:e.indexRange,indexTimeOffset:g,initialization:v(e.initialization)?void 0:{url:h,range:e.initialization.range},url:I,presentationTimeOffset:m,startNumber:e.startNumber,endNumber:e.endNumber},this._isDynamic=a,this._periodStart=s,this._scaledRelativePeriodEnd=o===void 0?void 0:(o-s)*l,this._isEMSGWhitelisted=d}getInitSegment(){return Je(this._index,this._isEMSGWhitelisted)}getSegments(e,t){let r=this._index,{duration:i,startNumber:a,endNumber:o,timescale:s,url:u}=r,f=this._periodStart*s,d=this._scaledRelativePeriodEnd,l=e*s-f,m=(e+t)*s-f,p=this._getFirstSegmentStart(),g=this._getLastSegmentStart();if(v(p)||v(g))return[];let h=Math.max(p,l),I=Math.min(g,m);if(I+i<=h)return[];let y=[],T=a!=null?a:1,P=Math.floor(h/i);for(let E=P*i;E<=I;E+=i){let C=P+T;if(o!==void 0&&C>o)return y;let R=!v(d)&&E+i>d?d-E:i,k=E+f,_=E+this._index.presentationTimeOffset,A=u===null?null:fr(_,C)(u),x={id:String(C),number:C,time:k/s,end:(k+R)/s,duration:R/s,timescale:1,isInit:!1,scaledDuration:R/s,url:A,timestampOffset:-(r.indexTimeOffset/s),complete:!0,privateInfos:{isEMSGWhitelisted:this._isEMSGWhitelisted}};y.push(x),P++}return y}getFirstAvailablePosition(){let e=this._getFirstSegmentStart();return v(e)?e:e/this._index.timescale+this._periodStart}getLastAvailablePosition(){let e=this._getLastSegmentStart();if(v(e))return e;let t=this._estimateRelativeScaledEnd();return Math.min(e+this._index.duration,t!=null?t:1/0)/this._index.timescale+this._periodStart}getEnd(){if(!this._isDynamic)return this.getLastAvailablePosition();let e=this._estimateRelativeScaledEnd();if(e===void 0)return;let{timescale:t}=this._index;return(e+this._periodStart*t)/t}awaitSegmentBetween(e,t){if(Ie(e<=t),!this._isDynamic)return!1;let{timescale:r}=this._index,i=Bt(r),a=this._periodStart*r,o=e*r-a,s=t*r-a,u=this._getLastSegmentStart();if(v(u)){let l=this._estimateRelativeScaledEnd();return l===void 0?s+i>=0:s+i>=0&&of-i:s>f-i&&othis._periodStart?(r-this._periodStart)*t:0;return Math.floor(i/e)*e}_getLastSegmentStart(){var a,o;let{duration:e,timescale:t,endNumber:r,startNumber:i=1}=this._index;if(this._isDynamic){let s=this._manifestBoundsCalculator.getEstimatedLiveEdge();if(s!==void 0&&this._scaledRelativePeriodEnd!==void 0&&this._scaledRelativePeriodEndd||u<2?f:(u-2)*e}}_estimateRelativeScaledEnd(){var e,t;if(this._index.endNumber!==void 0){let r=this._index.endNumber-((e=this._index.startNumber)!=null?e:1)+1;return Math.max(Math.min(r*this._index.duration,(t=this._scaledRelativePeriodEnd)!=null?t:1/0),0)}if(this._scaledRelativePeriodEnd!==void 0)return Math.max(this._scaledRelativePeriodEnd,0)}};function si(n,e){let t=0;for(;n.length>0;){let r=n[0];if(r.start>=e||r.repeatCount===-1)return t;if(r.repeatCount===0)n.shift(),t+=1;else{let i=n[1];if(i!==void 0&&i.start<=e)n.shift(),t+=1;else{if(r.duration<=0)return t;let a=r.start+r.duration,o=1;for(;ar.repeatCount)n.shift(),t=r.repeatCount+1;else{let s=r.repeatCount-o;return r.start=a,r.repeatCount=s,t+=o,t}}}}return t}function ui(n,e){if(n.length===0)return n.push(...e),!0;if(e.length===0)return!1;let t=n.length,r=e[0].start,i=n[t-1];if(Ne(i,e[0])=0;d--){let l=n[d].start;if(l===r){let m=t-d;return n.splice(d,m,...e),!1}else if(lr)return c.warn("RepresentationIndex: Manifest update removed all previous segments"),n.splice(0,t,...e),!0;if(m.repeatCount===void 0||m.repeatCount<=0)return m.repeatCount<0&&(m.repeatCount=Math.floor((r-m.start)/m.duration)-1),n.splice(d+1,t-(d+1),...e),!1;if(m.start+m.duration*(m.repeatCount+1)<=r)return n.splice(d+1,t-(d+1),...e),!1;let g=(r-m.start)/m.duration-1;if(g%1===0&&m.duration===e[0].duration){let h=e[0].repeatCount<0?-1:e[0].repeatCount+g+1;return n.splice(d,t-d,...e),n[d].start=m.start,n[d].repeatCount=h,!1}return c.warn("RepresentationIndex: Manifest update removed previous segments"),n[d].repeatCount=Math.floor(g),n.splice(d+1,t-(d+1),...e),!1}}let o=n[n.length-1],s=e[e.length-1];if(o.repeatCount!==void 0&&o.repeatCount<0)return o.start>s.start?(c.warn("RepresentationIndex: The new index is older than the previous one"),!1):(c.warn('RepresentationIndex: The new index is "bigger" than the previous one'),n.splice(0,t,...e),!0);let u=o.start+o.duration*(o.repeatCount+1),f=s.start+s.duration*(s.repeatCount+1);return u>=f?(c.warn("RepresentationIndex: The new index is older than the previous one"),!1):(c.warn('RepresentationIndex: The new index is "bigger" than the previous one'),n.splice(0,t,...e),!0)}function an(n,e,t){let r=n.start,i=n.duration,a=n.repeatCount;return r===void 0&&(e===null?r=0:v(e.duration)||(r=e.start+e.duration*(e.repeatCount+1))),(i===void 0||isNaN(i))&&t!==null&&t.start!==void 0&&!isNaN(t.start)&&r!==void 0&&!isNaN(r)&&(i=t.start-r),r!==void 0&&!isNaN(r)&&i!==void 0&&!isNaN(i)&&(a===void 0||!isNaN(a))?{start:r,duration:i,repeatCount:a===void 0?0:a}:(c.warn('DASH: A "S" Element could not have been parsed.'),null)}function on(n){let e={};for(let t of Object.keys(n.attributes)){let r=n.attributes[t];if(!v(r))switch(t){case"t":let i=parseInt(r,10);isNaN(i)?c.warn(`DASH: invalid t ("${r}")`):e.start=i;break;case"d":let a=parseInt(r,10);isNaN(a)?c.warn(`DASH: invalid d ("${r}")`):e.duration=a;break;case"r":let o=parseInt(r,10);isNaN(o)?c.warn(`DASH: invalid r ("${r}")`):e.repeatCount=o;break}}return e}function sn(n){let e={};for(let t=0;t0){let s=i-a.start;if(s%a.duration===0&&s/a.duration<=a.repeatCount)return{repeatNumberInPrevSegments:s/a.duration,prevSegmentsIdx:o,newElementsIdx:0,repeatNumberInNewElements:0}}if(o++,o>=n.length)return null;if(a=n[o],a.start===i)return{prevSegmentsIdx:o,newElementsIdx:0,repeatNumberInPrevSegments:0,repeatNumberInNewElements:0};if(a.start>i)return null}}else{let a=0,o=Array.isArray(e)?e[0]:null,s=Array.isArray(e)?null:e[0],u=i;for(;;){let f=o!==null?o.attributes.d:s==null?void 0:s.getAttribute("d"),d=v(f)?null:parseInt(f,10);if(d===null||Number.isNaN(d))return null;let l=o!==null?o.attributes.r:s==null?void 0:s.getAttribute("r"),m=v(l)?null:parseInt(l,10);if(m!==null){if(Number.isNaN(m)||m<0)return null;if(m>0){let h=t-u;if(h%d===0&&h/d<=m)return{repeatNumberInPrevSegments:0,repeatNumberInNewElements:h/d,prevSegmentsIdx:0,newElementsIdx:a}}u+=d*(m+1)}else u+=d;if(a++,a>=e.length)return null;Array.isArray(e)?o=e[a]:s=e[a];let p=o!==null?o.attributes.t:s==null?void 0:s.getAttribute("t"),g=v(p)?null:parseInt(p,10);if(g!==null){if(Number.isNaN(g))return null;u=g}if(u===t)return{newElementsIdx:a,prevSegmentsIdx:0,repeatNumberInPrevSegments:0,repeatNumberInNewElements:0};if(u>i)return null}}}function li(n,e){var h;let t=di(e,n);if(t===null)return c.warn('DASH: Cannot perform "based" update. Common segment not found.'),mt(n);let{prevSegmentsIdx:r,newElementsIdx:i,repeatNumberInPrevSegments:a,repeatNumberInNewElements:o}=t,u=e.length-r+i-1;if(u>=n.length)return c.info('DASH: Cannot perform "based" update. New timeline too short'),mt(n);let f=e.slice(r);if(a>0){let I=f[0];I.start+=I.duration*a,f[0].repeatCount-=a}if(o>0&&i!==0)return c.info('DASH: Cannot perform "based" update. The new timeline has a different form.'),mt(n);let d=f[f.length-1],l=Array.isArray(n)?on(n[u]):sn(n[u]),m=((h=l.repeatCount)!=null?h:0)-o;if(l.duration!==d.duration||d.repeatCount>m)return c.info('DASH: Cannot perform "based" update. The new timeline has a different form at the beginning.'),mt(n);l.repeatCount!==void 0&&l.repeatCount>d.repeatCount&&(d.repeatCount=l.repeatCount);let p=[],g=[];if(Array.isArray(n))for(let I=u+1;I=Math.min(o,(d=this._scaledPeriodEnd)!=null?d:1/0))return!1;let u=Pe(e,this._index);if(i.length>0&&s!==null&&!s.isLastOfTimeline){let l=i[i.length-1],p=Ne(l,null,this._scaledPeriodEnd)+a;if(uthis._scaledPeriodStart?void 0:!1:u-athis._scaledPeriodStart:!1}isSegmentStillAvailable(e){return e.isInit?!0:(this._refreshTimeline(),this._index.timeline===null&&(this._index.timeline=this._getTimeline()),wu(e,this._index,this._manifestBoundsCalculator,this._scaledPeriodEnd))}checkDiscontinuity(e){this._refreshTimeline();let t=this._index.timeline;return t===null&&(t=this._getTimeline(),this._index.timeline=t),bo({timeline:t,timescale:this._index.timescale,indexTimeOffset:this._index.indexTimeOffset},e,this._scaledPeriodEnd)}canBeOutOfSyncError(e){return this._isDynamic?e instanceof je&&e.isHttpError(404):!1}_replace(e){this._parseTimeline=e._parseTimeline,this._index=e._index,this._isDynamic=e._isDynamic,this._scaledPeriodStart=e._scaledPeriodStart,this._scaledPeriodEnd=e._scaledPeriodEnd,this._lastUpdate=e._lastUpdate,this._manifestBoundsCalculator=e._manifestBoundsCalculator,this._isLastPeriod=e._isLastPeriod}_update(e){this._index.timeline===null&&(this._index.timeline=this._getTimeline()),e._index.timeline===null&&(e._index.timeline=e._getTimeline()),ui(this._index.timeline,e._index.timeline)&&(this._index.startNumber=e._index.startNumber),this._index.availabilityTimeOffset=e._index.availabilityTimeOffset,this._index.availabilityTimeComplete=e._index.availabilityTimeComplete,this._index.endNumber=e._index.endNumber,this._isDynamic=e._isDynamic,this._scaledPeriodStart=e._scaledPeriodStart,this._scaledPeriodEnd=e._scaledPeriodEnd,this._lastUpdate=e._lastUpdate,this._isLastPeriod=e._isLastPeriod}isStillAwaitingFutureSegments(){var o;if(!this._isDynamic)return!1;this._refreshTimeline(),this._index.timeline===null&&(this._index.timeline=this._getTimeline());let{timeline:e}=this._index;if(e.length===0){if(this._scaledPeriodEnd!==void 0){let s=this._manifestBoundsCalculator.getEstimatedLiveEdge();if(s!==void 0&&Pe(s,this._index)>this._scaledPeriodEnd)return!1}return this._isLastPeriod}let t=Bt(this._index.timescale),r=mr(this._index,this._manifestBoundsCalculator,this._scaledPeriodEnd);if(r!==null&&!r.isLastOfTimeline){let s=Math.min(r.end,(o=this._scaledPeriodEnd)!=null?o:1/0);return!(this._scaledPeriodEnd!==void 0&&s+t>=this._scaledPeriodEnd)}if(!this._isLastPeriod)return!1;if(this._scaledPeriodEnd===void 0)return!0;let i=e[e.length-1];return Ne(i,null,this._scaledPeriodEnd)+tt){if(r===t+1)return n.slice(0,i+1);{let o=n.slice(0,i),s=ge({},a),u=r-a.repeatCount-1;return s.repeatCount=Math.max(0,t-u),o.push(s),o}}}return n}function wu(n,e,t,r){let i=mr(e,t,r);if(i===null)return!1;for(let a=0;an.time)return!1;if(s===n.time)return o.range===void 0?n.range===void 0:!v(n.range)&&o.range[0]===n.range[0]&&o.range[1]===n.range[1];if(o.repeatCount>=0&&o.duration!==void 0){let f=(s-o.start)/o.duration-1;return f%1===0&&f<=i.newRepeatCount}}return!1}function mr(n,e,t){if(n.timeline.length<=0)return null;if(n.availabilityTimeOffset===1/0){let i=n.timeline.length-1,a=n.timeline[i];return{isLastOfTimeline:!0,timelineIdx:i,newRepeatCount:a.repeatCount,end:Ne(a,null,t)}}let r=e.getEstimatedMaximumPosition(n.availabilityTimeOffset);if(r===void 0){let i=n.timeline.length-1,a=n.timeline[i];return{isLastOfTimeline:!0,timelineIdx:i,newRepeatCount:a.repeatCount,end:Ne(a,null,t)}}for(let i=n.timeline.length-1;i>=n.timeline.length;i--){let a=n.timeline[i],o=a.start+a.duration;if(Ye(o,n)<=r){let s=Ne(a,n.timeline[i+1],t);if(Ye(s,n)<=r)return{isLastOfTimeline:i===n.timeline.length-1,timelineIdx:i,newRepeatCount:a.repeatCount,end:o};{let f=Pe(r,n)-a.start,d=Math.floor(f/a.duration);return Ie(d>=1),{isLastOfTimeline:!1,timelineIdx:i,newRepeatCount:d-1,end:a.start+d*a.duration}}}}return null}var cr=un;function Ue(n,e,t){if(typeof String.prototype.startsWith=="function")return n.startsWith(e,t);let r=typeof t=="number"?Math.max(t,0):0;return n.substring(r,r+e.length)===e}var Du=/^(?:[a-z]+:)?\/\//i,Nu=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/;function pi(n){let e=n.lastIndexOf("/");if(e<0)return n.length;if(Du.test(n)){let r=n.indexOf("/");if(r>=0&&e===r+1)return n.length}let t=n.indexOf("?");return t>=0&&t=Uu&&dn.clear(),dn.set(n,t),t}function mi(n){let e="";return n.scheme&&(e+=n.scheme+":"),n.authority&&(e+="//"+n.authority),e+=n.path,n.query&&(e+="?"+n.query),n.fragment&&(e+="#"+n.fragment),e}function ci(n){let e=n.split(/(?=\/)/),t=[];for(let r=0;ro!==""),t=e.length;if(t===0)return"";if(t===1)return(r=e[0])!=null?r:"";{let o=(i=e[0])!=null?i:"",s=(a=e[1])!=null?a:"",u=Bu(o,s),f=e.slice(2);return yo(u,...f)}}var pr=yo;var ln=class{constructor(){this._refs=new Map,this._stored=[]}addReferences(e){for(let t of e)t.attributes.refId!==void 0&&this._refs.set(t.attributes.refId,t)}add(e,t){this._tryParsing(e,t,!1)||this._stored.push([e,t]),t.attributes.refId!==void 0&&(this._refs.set(t.attributes.refId,t),this._resolveStoredRefs(!1))}finalize(){this._resolveStoredRefs(!0)}_resolveStoredRefs(e){for(let t=this._stored.length-1;t>=0;t--){let[r,i]=this._stored[t];(this._tryParsing(r,i,e)||e)&&this._stored.splice(t,1)}return this._stored.length===0}_tryParsing(e,t,r){if(t.attributes.ref===void 0)return gi(e,t),!0;let i=this._getReferenced(t.attributes.ref);return i===void 0?(r&&(c.warn("DASH: forcing the parsing of a referencing ContentProtection"),gi(e,t)),!1):(t.children.cencPssh.push(...i.children.cencPssh),t.attributes.keyId===void 0&&i.attributes.keyId!==void 0&&(t.attributes.keyId=i.attributes.keyId),t.attributes.schemeIdUri===void 0&&i.attributes.schemeIdUri!==void 0&&(t.attributes.schemeIdUri=i.attributes.schemeIdUri),t.attributes.value===void 0&&i.attributes.value!==void 0&&(t.attributes.value=i.attributes.value),gi(e,t),!0)}_getReferenced(e){return this._refs.get(e)}};function gi(n,e){let t;if(e.attributes.schemeIdUri!==void 0&&e.attributes.schemeIdUri.substring(0,9)==="urn:uuid:"&&(t=e.attributes.schemeIdUri.substring(9).replace(/-/g,"").toLowerCase()),e.attributes.keyId!==void 0&&e.attributes.keyId.length>0){let o={keyId:e.attributes.keyId,systemId:t};n.contentProtections===void 0?n.contentProtections={keyIds:[o],initData:[]}:n.contentProtections.keyIds===void 0?n.contentProtections.keyIds=[o]:n.contentProtections.keyIds.push(o)}if(t===void 0)return;let{cencPssh:r}=e.children,i=[];for(let o of r)i.push({systemId:t,data:o});if(i.length===0)return;if(n.contentProtections===void 0){n.contentProtections={keyIds:[],initData:[{type:"cenc",values:i}]};return}let a=K(n.contentProtections.initData,o=>o.type==="cenc");a===void 0?n.contentProtections.initData.push({type:"cenc",values:i}):a.values.push(...i)}function gr(n){let e=Date.parse(n)-L();if(isNaN(e)){c.warn("DASH Parser: Invalid clock received: ",n);return}return e}function hi(n){let e=n.children.utcTimings.filter(t=>(t.schemeIdUri==="urn:mpeg:dash:utc:http-iso:2014"||t.schemeIdUri==="urn:mpeg:dash:utc:http-xsdate:2014")&&t.value!==void 0);return e.length>0?e[0].value:void 0}function hr(n){let{representations:e}=n,t=null;for(let r=0;r=0;e--){let t=n[e].adaptations,r=t.audio===void 0?void 0:t.audio[0],i=t.video===void 0?void 0:t.video[0];if(r!==void 0||i!==void 0){let a=null,o=null;if(r!==void 0){let s=hr(r);if(s===void 0)return{safe:void 0,unsafe:void 0};a=s}if(i!==void 0){let s=hr(i);if(s===void 0)return{safe:void 0,unsafe:void 0};o=s}if(r!==void 0&&a===null||i!==void 0&&o===null)return c.info("Parser utils: found Period with no segment. ","Going to previous one to calculate last position"),{safe:void 0,unsafe:void 0};if(o!==null)return a!==null?{safe:Math.min(a,o),unsafe:Math.max(a,o)}:{safe:o,unsafe:o};if(a!==null)return{safe:a,unsafe:a}}}return{safe:void 0,unsafe:void 0}}function Ir(n){let{representations:e}=n,t=null;for(let r=0;r{let i=e(r);return Array.isArray(i)?(t.push(...i),t):(t.push(i),t)},[])}var Fu=typeof Ee=="object"&&typeof Ee.TextDecoder=="function",zu=typeof Ee=="object"&&typeof Ee.TextEncoder=="function";function mn(n){if(zu)try{return new TextEncoder().encode(n)}catch(i){let a=i instanceof Error?i:"";c.warn("Utils: could not use TextEncoder to encode string into UTF-8, fallbacking to another implementation",a)}let e,t=encodeURIComponent(n);if(typeof unescape=="function")e=unescape(t);else{let i=/[0-9a-fA-F]/,a=t.length;e="";for(let o=0;o=e?t:new Array(e-t.length+1).join("0")+t}function Le(n){if(Fu)try{return new TextDecoder().decode(n)}catch(i){let a=i instanceof Error?i:"";c.warn("Utils: could not use TextDecoder to parse UTF-8, fallbacking to another implementation",a)}let e=n;e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3));let t=Wu(e),r;if(typeof escape=="function")r=escape(t);else{let i=/[A-Za-z0-9*_\+-\.\/]/;r="";for(let a=0;a=256?"%u"+_o(o,4):"%"+_o(o,2)}}return decodeURIComponent(r)}function cn(n){let e=n.length,t=new Uint8Array(e/2);for(let r=0,i=0;r>>4).toString(16),t+=(n[r]&15).toString(16),e.length>0&&rr.start)&&(c.warn("DASH: Updating overlapping Periods.",i==null?void 0:i.start,r.start),i.duration=r.start-i.start,i.end=r.start,!(i.duration>0));){if(e.pop(),e.length===0)break;i=e[e.length-1]}e.push(r)}return e}function Ri(n,e){let t=[];return n.forEach((r,i)=>{let a;if(!v(r.attributes.start))a=r.attributes.start;else if(i===0)a=!e.isDynamic||v(e.availabilityStartTime)?0:e.availabilityStartTime;else{let f=t[t.length-1];if(!v(f)&&!v(f.periodEnd))a=f.periodEnd;else throw new Error("Missing start time when parsing periods.")}let o,s=n[i+1];v(r.attributes.duration)?i===n.length-1?o=e.duration:v(s.attributes.start)||(o=s.attributes.start-a):o=r.attributes.duration;let u=v(o)?void 0:a+o;t.push({periodStart:a,periodDuration:o,periodEnd:u})}),t}function Vu(n,e){for(let t of e){let{adaptation:r,trickModeAttachedAdaptationIds:i}=t;for(let a of i)for(let o of Dt){let s=n[o];if(s!==void 0)for(let u of s)u.id===a&&(u.trickModeTracks===void 0&&(u.trickModeTracks=[]),u.trickModeTracks.push(r))}}}var Eo=Vu;var qu=["subtitle","caption"];function Pi(n,e,t,r){function i(o,s){let u=o.split("/")[0];if(se(Dt,u))return u;if(o==="application/ttml+xml")return"text";if(o==="application/mp4")return s!==null&&K(s,f=>f.schemeIdUri==="urn:mpeg:dash:role:2011"&&se(qu,f.value))!==void 0?"text":void 0}function a(o){switch(o.substring(0,3)){case"avc":case"hev":case"hvc":case"vp8":case"vp9":case"av1":return"video";case"vtt":return"text"}switch(o.substring(0,4)){case"mp4a":return"audio";case"wvtt":case"stpp":return"text"}}if(e!==null){let o=i(e,r);if(o!==void 0)return o}if(t!==null){let o=a(t);if(o!==void 0)return o}for(let o=0;of===void 0?!1:f.some(({schemeIdUri:T})=>T===y.schemeIdUri),isLastPeriod:d,manifestBoundsCalculator:r,isDynamic:i,periodEnd:a,periodStart:o,receivedTime:s,representationBitrate:n.attributes.bitrate,representationId:n.attributes.id},p;if(n.children.segmentBase!==void 0){let{segmentBase:y}=n.children;p=new Tt(y,m)}else if(n.children.segmentList!==void 0){let{segmentList:y}=n.children;p=new Et(y,m)}else if(n.children.segmentTemplate!==void 0||e.parentSegmentTemplates.length>0){let y=e.parentSegmentTemplates.slice(),T=n.children.segmentTemplate;T!==void 0&&y.push(T);let P=H({},...y);(P.availabilityTimeOffset!==void 0||e.availabilityTimeOffset!==void 0)&&(m.availabilityTimeOffset=((g=P.availabilityTimeOffset)!=null?g:0)+((h=e.availabilityTimeOffset)!=null?h:0)),(P.availabilityTimeComplete!==void 0||e.availabilityTimeComplete!==void 0)&&(m.availabilityTimeComplete=(I=P.availabilityTimeComplete)!=null?I:e.availabilityTimeComplete),p=cr.isTimelineIndexArgument(P)?new cr(P,m):new Rt(P,m)}else{let y=e.adaptation.children;if(y.segmentBase!==void 0){let{segmentBase:T}=y;p=new Tt(T,m)}else if(y.segmentList!==void 0){let{segmentList:T}=y;p=new Et(T,m)}else p=new Rt({duration:Number.MAX_VALUE,timescale:1,startNumber:0,media:""},m)}return p}function et(n,e){var i;if(e.length===0)return n;let t=e.map(a=>({url:a.value}));if(n.length===0)return t;let r=[];for(let a=0;as.schemeIdUri==="urn:mpeg:mpegB:cicp:TransferCharacteristics");if(o!==void 0)switch(o.value){case"15":return;case"16":return{eotf:"pq"};case"18":return{eotf:"hlg"}}if(i!==void 0&&/^vp(08|09|10)/.exec(i))return Po(i)}function Ci(n,e,t){var i,a,o,s,u,f,d;let r=[];for(let l of n){let m=l.attributes.id!==void 0?l.attributes.id:String(l.attributes.bitrate)+(l.attributes.height!==void 0?`-${l.attributes.height}`:"")+(l.attributes.width!==void 0?`-${l.attributes.width}`:"")+(l.attributes.mimeType!==void 0?`-${l.attributes.mimeType}`:"")+(l.attributes.codecs!==void 0?`-${l.attributes.codecs}`:"");for(;r.some(A=>A.id===m);)m+="-dup";let p=(a=(i=t.unsafelyBaseOnPreviousAdaptation)==null?void 0:i.getRepresentation(m))!=null?a:null,g=Gu(l,e),h=(o=l.attributes.availabilityTimeComplete)!=null?o:t.availabilityTimeComplete,I;(l.attributes.availabilityTimeOffset!==void 0||t.availabilityTimeOffset!==void 0)&&(I=((s=l.attributes.availabilityTimeOffset)!=null?s:0)+((u=t.availabilityTimeOffset)!=null?u:0));let y=H({},t,{availabilityTimeOffset:I,availabilityTimeComplete:h,unsafelyBaseOnPreviousRepresentation:p,adaptation:e,inbandEventStreams:g}),T=vi(l,y),P;l.attributes.bitrate===void 0?(c.warn("DASH: No usable bitrate found in the Representation."),P=0):P=l.attributes.bitrate;let E=et(t.baseURLs,l.children.baseURLs),C=E.length===0?[{baseUrl:"",id:void 0}]:E.map(A=>({baseUrl:A.url,id:A.serviceLocation})),R={bitrate:P,cdnMetadata:C,index:T,id:m};l.children.supplementalProperties!==void 0&&K(l.children.supplementalProperties,A=>A.schemeIdUri==="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&A.value==="JOC")&&(R.isSpatialAudio=!0);let k;l.attributes.codecs!==void 0?k=l.attributes.codecs:e.attributes.codecs!==void 0&&(k=e.attributes.codecs),k!==void 0&&(k=k==="mp4a.40.02"?"mp4a.40.2":k,R.codecs=k);let _;l.attributes.supplementalCodecs!==void 0?_=l.attributes.supplementalCodecs:e.attributes.supplementalCodecs!==void 0&&(_=e.attributes.supplementalCodecs),_!==void 0&&(R.supplementalCodecs=Ro(_)),l.attributes.frameRate!==void 0?R.frameRate=l.attributes.frameRate:e.attributes.frameRate!==void 0&&(R.frameRate=e.attributes.frameRate),l.attributes.height!==void 0?R.height=l.attributes.height:e.attributes.height!==void 0&&(R.height=e.attributes.height),l.attributes.mimeType!==void 0?R.mimeType=l.attributes.mimeType:e.attributes.mimeType!==void 0&&(R.mimeType=e.attributes.mimeType),l.attributes.width!==void 0?R.width=l.attributes.width:e.attributes.width!==void 0&&(R.width=e.attributes.width);{let A=[...(f=e.children.contentProtections)!=null?f:[],...(d=l.children.contentProtections)!=null?d:[]];for(let x of A)t.contentProtectionParser.add(R,x)}R.hdrInfo=Ku({adaptationProfiles:e.attributes.profiles,supplementalProperties:e.children.supplementalProperties,essentialProperties:e.children.essentialProperties,manifestProfiles:t.manifestProfiles,codecs:k}),r.push(R)}return r}function ju(n){if(n===void 0)return!1;let e=n.schemeIdUri==="urn:tva:metadata:cs:AudioPurposeCS:2007"&&n.value==="1",t=n.schemeIdUri==="urn:mpeg:dash:role:2011"&&n.value==="description";return e||t}function Yu(n,e){return!!(n!==void 0&&n.some(r=>r.schemeIdUri==="urn:tva:metadata:cs:AudioPurposeCS:2007"&&r.value==="2")||e!==void 0&&e.some(r=>r.schemeIdUri==="urn:mpeg:dash:role:2011"&&r.value==="caption"))}function Qu(n){return n===void 0?!1:n.schemeIdUri==="urn:mpeg:dash:role:2011"&&n.value==="sign"}function $u(n,e){if(J(n.attributes.id))return n.attributes.id;let{isClosedCaption:t,isForcedSubtitle:r,isAudioDescription:i,isSignInterpreted:a,isTrickModeTrack:o,type:s}=e,u=s;return J(n.attributes.language)&&(u+=`-${n.attributes.language}`),t===!0&&(u+="-cc"),r===!0&&(u+="-cc"),i===!0&&(u+="-ad"),a===!0&&(u+="-si"),o&&(u+="-trickMode"),J(n.attributes.contentType)&&(u+=`-${n.attributes.contentType}`),J(n.attributes.codecs)&&(u+=`-${n.attributes.codecs}`),J(n.attributes.mimeType)&&(u+=`-${n.attributes.mimeType}`),n.attributes.frameRate!==void 0&&(u+=`-${String(n.attributes.frameRate)}`),u}function Xu(n){if(!v(n.children.supplementalProperties)){let{supplementalProperties:e}=n.children;for(let t of e)if(t.schemeIdUri==="urn:mpeg:dash:adaptation-set-switching:2016"&&!v(t.value))return t.value.split(",").map(r=>r.trim()).filter(r=>r)}return[]}function Ai(n,e){var s,u,f,d,l,m,p;let t={video:[],audio:[],text:[]},r=[],i={},a=[];for(let g=0;gSe.value==="main")&&T.some(Se=>Se.schemeIdUri==="urn:mpeg:dash:role:2011"),C=h.children.representations,R=(s=h.attributes.availabilityTimeComplete)!=null?s:e.availabilityTimeComplete,k;(h.attributes.availabilityTimeOffset!==void 0||e.availabilityTimeOffset!==void 0)&&(k=((u=h.attributes.availabilityTimeOffset)!=null?u:0)+((f=e.availabilityTimeOffset)!=null?f:0));let _=h.attributes.mimeType,A=h.attributes.codecs,x=Pi(C,J(_)?_:null,J(A)?A:null,v(I.roles)?null:I.roles);if(x===void 0)continue;let M=(d=h.attributes.selectionPriority)!=null?d:1,N=h.attributes.id,w=Xu(h),O=[];e.segmentTemplate!==void 0&&O.push(e.segmentTemplate),h.children.segmentTemplate!==void 0&&O.push(h.children.segmentTemplate);let B={availabilityTimeComplete:R,availabilityTimeOffset:k,baseURLs:et(e.baseURLs,I.baseURLs),contentProtectionParser:e.contentProtectionParser,manifestBoundsCalculator:e.manifestBoundsCalculator,end:e.end,isDynamic:e.isDynamic,isLastPeriod:e.isLastPeriod,manifestProfiles:e.manifestProfiles,parentSegmentTemplates:O,receivedTime:e.receivedTime,start:e.start,unsafelyBaseOnPreviousAdaptation:null},V=Array.isArray(y)?K(y,Se=>Se.schemeIdUri==="http://dashif.org/guidelines/trickmode"):void 0,q=(l=V==null?void 0:V.value)==null?void 0:l.split(" "),Y=q!==void 0,{accessibilities:G}=I,z;T!==void 0&&T.some(Se=>Se.value==="dub")&&(z=!0);let X;x!=="text"?X=!1:X=Yu(G,T);let Z;x==="text"&&T!==void 0&&T.some(Se=>Se.value==="forced-subtitle"||Se.value==="forced_subtitle")&&(Z=!0);let me;x!=="audio"?me=!1:G!==void 0&&(me=G.some(ju));let ce;x!=="video"?ce=!1:G!==void 0&&(ce=G.some(Qu));let de=$u(h,{isAudioDescription:me,isForcedSubtitle:Z,isClosedCaption:X,isSignInterpreted:ce,isTrickModeTrack:Y,type:x});for(;se(a,de);)de+="-dup";let be=de;a.push(de),B.unsafelyBaseOnPreviousAdaptation=(p=(m=e.unsafelyBaseOnPreviousPeriod)==null?void 0:m.getAdaptation(de))!=null?p:null;let tr=Ci(C,h,B),pe={id:de,representations:tr,type:x,isTrickModeTrack:Y};if(v(h.attributes.language)||(pe.language=h.attributes.language),v(X)||(pe.closedCaption=X),v(me)||(pe.audioDescription=me),z===!0&&(pe.isDub=!0),Z!==void 0&&(pe.forcedSubtitles=Z),ce===!0&&(pe.isSignInterpreted=!0),P!==void 0&&(pe.label=P),q!==void 0)r.push({adaptation:pe,trickModeAttachedAdaptationIds:q});else{let Se=-1;for(let Yt of w){let Ge=i[Yt];if(Ge!==void 0&&Ge.newID!==be&&se(Ge.adaptationSetSwitchingIDs,N)){Se=ne(t[x],Ot=>Ot[0].id===Yt);let xe=t[x][Se];if(xe!==void 0&&xe[0].audioDescription===pe.audioDescription&&xe[0].closedCaption===pe.closedCaption&&xe[0].language===pe.language){c.info('DASH Parser: merging "switchable" AdaptationSets',N,Yt),xe[0].representations.push(...pe.representations),xe[1]={priority:Math.max(M,xe[1].priority),isMainAdaptation:E||xe[1].isMainAdaptation,indexInMpd:Math.min(g,xe[1].indexInMpd)};break}}}Se<0&&t[x].push([pe,{priority:M,isMainAdaptation:E,indexInMpd:g}])}!v(N)&&v(i[N])&&(i[N]={newID:be,adaptationSetSwitchingIDs:w})}let o=Dt.reduce((g,h)=>{let I=t[h];return I.length>0&&(I.sort(vo),g[h]=I.map(([y])=>y)),g},{});return t.video.sort(vo),Eo(o,r),o}function vo(n,e){let t=e[1].priority-n[1].priority;return t!==0?t:n[1].isMainAdaptation!==e[1].isMainAdaptation?n[1].isMainAdaptation?-1:1:n[1].indexInMpd-e[1].indexInMpd}var Zu=Ae();function ki(n,e){var o,s,u,f,d;let t=[],r=Ri(n,e);if(r.length!==n.length)throw new Error("MPD parsing error: the time information are incoherent.");let{isDynamic:i,manifestBoundsCalculator:a}=e;!i&&!v(e.duration)&&a.setLastPosition(e.duration);for(let l=n.length-1;l>=0;l--){let m=l===n.length-1,p=n[l],g=e.xlinkInfos.get(p),h=et(e.baseURLs,p.children.baseURLs),{periodStart:I,periodDuration:y,periodEnd:T}=r[l],P;for(v(p.attributes.id)?(c.warn("DASH: No usable id found in the Period. Generating one."),P="gen-dash-period-"+Zu()):P=p.attributes.id;t.some(V=>V.id===P);)P+="-dup";let E=g!==void 0?g.receivedTime:e.receivedTime,C=(s=(o=e.unsafelyBaseOnPreviousManifest)==null?void 0:o.getPeriod(P))!=null?s:null,R=p.attributes.availabilityTimeComplete,k=p.attributes.availabilityTimeOffset,{manifestProfiles:_,contentProtectionParser:A}=e,{segmentTemplate:x}=p.children;A.addReferences((u=p.children.contentProtections)!=null?u:[]);let M={availabilityTimeComplete:R,availabilityTimeOffset:k,baseURLs:h,contentProtectionParser:A,manifestBoundsCalculator:a,end:T,isDynamic:i,isLastPeriod:m,manifestProfiles:_,receivedTime:E,segmentTemplate:x,start:I,unsafelyBaseOnPreviousPeriod:C},N=Ai(p.children.adaptations,M),w=((f=e.xmlNamespaces)!=null?f:[]).concat((d=p.attributes.namespaces)!=null?d:[]),O=ed(p.children.eventStreams,I,w),B={id:P,start:I,end:T,duration:y,adaptations:N,streamEvents:O};if(t.unshift(B),!a.lastPositionIsKnown()){let V=Ju(N);if(!i)typeof V=="number"&&a.setLastPosition(V);else if(typeof V=="number"){let q=L()/1e3;a.setLastPosition(V,q)}else{let q=Co(e,I);if(q!==void 0){let[Y,G]=q;a.setLastPosition(Y,G)}}}}if(e.isDynamic&&!a.lastPositionIsKnown()){let l=Co(e,0);if(l!==void 0){let[m,p]=l;a.setLastPosition(m,p)}}return Ei(t)}function Co(n,e){if(v(n.clockOffset)){let t=Date.now()/1e3;if(t>=e){c.warn("DASH Parser: no clock synchronization mechanism found. Using the system clock instead.");let r=t-n.availabilityStartTime,i=L()/1e3;return[r,i]}}else{let t=n.clockOffset/1e3-n.availabilityStartTime,r=L()/1e3,i=r+t;if(i>=e)return[i,r]}}function Ju(n){let e=null,t=!0,r=sr(n).filter(a=>!v(a)),i=_i(r,a=>a);for(let a of i){let o=a.representations;for(let s of o){let u=s.index.getLastAvailablePosition();u!==null&&(t=!1,typeof u=="number"&&(e=v(e)?u:Math.max(e,u)))}}if(v(e)){if(t)return null}else return e}function ed(n,e,t){var i,a;let r=[];for(let o of n){let{schemeIdUri:s="",timescale:u=1}=o.attributes,f=t.concat((i=o.attributes.namespaces)!=null?i:[]);for(let d of o.children.events)if(d.eventStreamData!==void 0){let l=((a=d.presentationTime)!=null?a:0)/u+e,m=d.duration===void 0?void 0:l+d.duration/u,p,g;if(!st&&d.eventStreamData instanceof Element)p=d.eventStreamData;else try{g={namespaces:f,data:typeof d.eventStreamData=="string"?d.eventStreamData:Le(new Uint8Array(d.eventStreamData))}}catch(h){c.error("DASH: Error while parsing event-stream:",h instanceof Error?h.message:"Unknown error")}r.push({start:l,end:m,id:d.id,data:{type:"dash-event-stream",value:{schemeIdUri:s,timescale:u,element:p,xmlData:g}}})}}return r}function Ut(n,e,t,r,i=new WeakMap){let{children:a,attributes:o}=n;if(v(e.externalClockOffset)){let u=o.type==="dynamic",f=K(a.utcTimings,m=>m.schemeIdUri==="urn:mpeg:dash:utc:direct:2014"&&!v(m.value)),d=!v(f)&&!v(f.value)?gr(f.value):void 0,l=!v(d)&&!isNaN(d)?d:void 0;if(!v(l)&&r!==!0)e.externalClockOffset=l;else if(u&&r!==!0){let m=hi(n);if(!v(m)&&m.length>0)return{type:"needs-clock",value:{url:m,continue:function(g){return g.success?(e.externalClockOffset=gr(g.data),Ut(n,e,t,!0)):(t.push(g.error),c.warn("DASH Parser: Error on fetching the clock ressource",g.error),Ut(n,e,t,!0))}}}}}let s=[];for(let u=0;uu),continue:function(f){if(f.length!==s.length)throw new Error("DASH parser: wrong number of loaded ressources.");for(let d=f.length-1;d>=0;d--){let l=s[d].index,{parsed:m,warnings:p,receivedTime:g,sendingTime:h,url:I}=f[d];p.length>0&&t.push(...p);for(let y of m)i.set(y,{receivedTime:g,sendingTime:h,url:I});a.periods.splice(l,1,...m)}return Ut(n,e,t,r,i)}}}}function td(n,e,t,r){var w,O,B,V,q;let{children:i,attributes:a}=n,o=a.type==="dynamic",s=e.url!==void 0?[{url:e.url.substring(0,pi(e.url))}]:[],u=et(s,i.baseURLs),f=yi(a,e.referenceDateTime),d=a.timeShiftBufferDepth,{externalClockOffset:l,unsafelyBaseOnPreviousManifest:m}=e,{externalClockOffset:p}=e,g=new fn({availabilityStartTime:f,isDynamic:o,timeShiftBufferDepth:d,serverTimestampOffset:p}),h=new ln;h.addReferences((w=i.contentProtections)!=null?w:[]);let I={availabilityStartTime:f,baseURLs:u,clockOffset:l,contentProtectionParser:h,duration:a.duration,isDynamic:o,manifestBoundsCalculator:g,manifestProfiles:n.attributes.profiles,receivedTime:e.manifestReceivedTime,timeShiftBufferDepth:d,unsafelyBaseOnPreviousManifest:m,xlinkInfos:r,xmlNamespaces:n.attributes.namespaces},y=ki(i.periods,I);h.finalize();let T=a.duration,P,E,C=null,R;a.minimumUpdatePeriod!==void 0&&a.minimumUpdatePeriod>=0&&(P=a.minimumUpdatePeriod===0?U.getCurrent().DASH_FALLBACK_LIFETIME_WHEN_MINIMUM_UPDATE_PERIOD_EQUAL_0:a.minimumUpdatePeriod);let{minimumSafePosition:k,maximumSafePosition:_,maximumUnsafePosition:A}=Si(y),x=L();if(o){let Y;_!==void 0?Y=_:p===void 0?(c.warn("DASH Parser: use system clock to define maximum position"),Y=Date.now()/1e3-f):Y=(L()+p)/1e3-f;let G=g.getEstimatedLiveEdge();G===void 0&&(A!==void 0?G=A:G=Y),R={isLinear:!0,maximumSafePosition:Y,livePosition:G,time:x},E=k,C=d!=null?d:null,C!==null&&E!==void 0&&G-E>C&&(C=G-E)}else{E=k,E===void 0&&(E=(B=(O=y[0])==null?void 0:O.start)!=null?B:0);let Y=T!=null?T:1/0;if(y[y.length-1]!==void 0){let G=y[y.length-1],z=(V=G.end)!=null?V:G.duration!==void 0?G.start+G.duration:void 0;z!==void 0&&z=Ao.length)throw new Error("Unable to parse base64 string.");let e=Ao[n];if(e===255)throw new Error("Unable to parse base64 string.");return e}function yr(n){let e=n.length%4,t=n;e!==0&&(c.warn("base64ToBytes: base64 given miss padding"),t+=e===3?"=":e===2?"==":"===");let r=t.indexOf("=");if(r!==-1&&r>16,o[f+1]=s>>8&255,o[f+2]=s&255;return o.subarray(0,o.length-i)}var nd=/^P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,rd=/([0-9]+)-([0-9]+)/;function ve(n,e){return n==="true"?[!0,null]:n==="false"?[!1,null]:[!1,new Oe(`\`${e}\` property is not a boolean value but "${n}"`)]}function ee(n,e){let t=parseInt(n,10);return isNaN(t)?[null,new Oe(`\`${e}\` property is not an integer value but "${n}"`)]:[t,null]}function ke(n,e){if(n==="INF")return[1/0,null];let t=parseFloat(n);return isNaN(t)?[null,new Oe(`\`${e}\` property is invalid: "${n}"`)]:[t,null]}function xi(n,e){if(n==="true")return[!0,null];if(n==="false")return[!1,null];let t=parseInt(n,10);return isNaN(t)?[null,new Oe(`\`${e}\` property is not a boolean nor an integer but "${n}"`)]:[t,null]}function _r(n,e){let t=Date.parse(n);return isNaN(t)?[null,new Oe(`\`${e}\` is in an invalid date format: "${n}"`)]:[new Date(Date.parse(n)).getTime()/1e3,null]}function Ve(n,e){if(!J(n))return[0,new Oe(`\`${e}\` property is empty`)];let t=nd.exec(n);return t===null?[null,new Oe(`\`${e}\` property has an unrecognized format "${n}"`)]:[parseFloat(J(t[2])?t[2]:"0")*365*24*60*60+parseFloat(J(t[4])?t[4]:"0")*30*24*60*60+parseFloat(J(t[6])?t[6]:"0")*24*60*60+parseFloat(J(t[8])?t[8]:"0")*60*60+parseFloat(J(t[10])?t[10]:"0")*60+parseFloat(J(t[12])?t[12]:"0"),null]}function Pt(n,e){let t=rd.exec(n);return t===null?[null,new Oe(`\`${e}\` property has an unrecognized format "${n}"`)]:[[+t[1],+t[2]],null]}function ko(n,e){try{return[yr(n),null]}catch(t){return[null,new Oe(`\`${e}\` is not a valid base64 string: "${n}"`)]}}function Lt(n,e){let t=/^(\d+)\/(\d+)$/.exec(n);return t!==null?[+t[1]/+t[2],null]:ke(n,e)}function _e(n){let e,t;for(let r of Object.keys(n.attributes)){let i=n.attributes[r];if(!v(i))switch(r){case"schemeIdUri":e=i;break;case"value":t=i;break}}return{schemeIdUri:e,value:t}}function fe(n,e){return function(t,{asKey:r,parser:i,dashName:a}){let[o,s]=i(t,a);s!==null&&(c.warn(s.message),e.push(s)),o!==null&&(n[r]=o)}}var Oe=class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype),this.name="MPDError"}};function ct(n){return lr(n)}function tt(n){let e=typeof n=="string"?n:ct(n.children),t=[];return e===null||e.length===0?[void 0,t]:[{value:e},t]}function id(n){let e=[],t=[];for(let r=0;r0){let[o,s]=ko(a,"cenc:pssh");s!==null&&(c.warn(s.message),e.push(s)),o!==null&&t.push(o)}}}return[{cencPssh:t},e]}function ad(n){let e={};for(let t of Object.keys(n.attributes)){let r=n.attributes[t];if(!v(r))switch(t){case"schemeIdUri":e.schemeIdUri=r;break;case"value":e.value=r;break;case"cenc:default_KID":e.keyId=cn(r.replace(/-/g,""));break;case"ref":e.ref=r;break;case"refId":e.refId=r;break}}return e}function nt(n){let[e,t]=id(n.children),r=ad(n);return[{children:e,attributes:r},t]}function Mi(n){let e={};for(let t of Object.keys(n.attributes)){let r=n.attributes[t];if(!v(r))switch(t){case"id":e.id=r;break;case"lang":e.language=r;break;case"contentType":e.contentType=r;break;case"par":e.par=r;break}}return e}function Oi(n){let e={},t=[],r=fe(e,t);for(let i of Object.keys(n.attributes)){let a=n.attributes[i];if(!v(a))switch(i){case"range":r(a,{asKey:"range",parser:Pt,dashName:"range"});break;case"sourceURL":e.media=a;break}}return[e,t]}function rt(n){let e={},t=[],r=fe(e,t),i=n.children;for(let a=0;a=0;t--){let r=e[t];(typeof r=="string"||r.tagName!=="S")&&e.splice(t,1)}return e}}function vt(n){let[e,t]=rt(n),r=t,i;for(let s=0;s0&&(r=r.concat(f));break;case"SegmentList":let[d,l]=pn(a);r=r.concat(l),e.segmentList=d;break;case"SegmentTemplate":let[m,p]=vt(a);r=r.concat(p),e.segmentTemplate=m;break;case"ContentProtection":let[g,h]=nt(a);h.length>0&&(r=r.concat(h)),g!==void 0&&t.push(g);break;case"SupplementalProperty":v(e.supplementalProperties)?e.supplementalProperties=[_e(a)]:e.supplementalProperties.push(_e(a));break}}return t.length>0&&(e.contentProtections=t),[e,r]}function sd(n){let e={},t=[],r=fe(e,t);for(let i of Object.keys(n.attributes)){let a=n.attributes[i];if(!v(a))switch(i){case"audioSamplingRate":e.audioSamplingRate=a;break;case"bandwidth":r(a,{asKey:"bitrate",parser:ee,dashName:"bandwidth"});break;case"codecs":e.codecs=a;break;case"codingDependency":r(a,{asKey:"codingDependency",parser:ve,dashName:"codingDependency"});break;case"frameRate":r(a,{asKey:"frameRate",parser:Lt,dashName:"frameRate"});break;case"height":r(a,{asKey:"height",parser:ee,dashName:"height"});break;case"id":e.id=a;break;case"maxPlayoutRate":r(a,{asKey:"maxPlayoutRate",parser:ke,dashName:"maxPlayoutRate"});break;case"maximumSAPPeriod":r(a,{asKey:"maximumSAPPeriod",parser:ke,dashName:"maximumSAPPeriod"});break;case"mimeType":e.mimeType=a;break;case"profiles":e.profiles=a;break;case"qualityRanking":r(a,{asKey:"qualityRanking",parser:ee,dashName:"qualityRanking"});break;case"scte214:supplementalCodecs":e.supplementalCodecs=a;break;case"segmentProfiles":e.segmentProfiles=a;break;case"width":r(a,{asKey:"width",parser:ee,dashName:"width"});break;case"availabilityTimeOffset":r(a,{asKey:"availabilityTimeOffset",parser:ke,dashName:"availabilityTimeOffset"});break;case"availabilityTimeComplete":r(a,{asKey:"availabilityTimeComplete",parser:ve,dashName:"availabilityTimeComplete"});break}}return e.bitrate===void 0&&t.push(new Oe("No bitrate found on a Representation")),[e,t]}function xo(n){let[e,t]=od(n.children),[r,i]=sd(n),a=t.concat(i);return[{children:e,attributes:r},a]}function ud(n){let e={baseURLs:[],representations:[]},t=[],r=[];for(let i=0;i0&&(r=r.concat(s));break;case"ContentComponent":e.contentComponent=Mi(a);break;case"EssentialProperty":v(e.essentialProperties)?e.essentialProperties=[_e(a)]:e.essentialProperties.push(_e(a));break;case"InbandEventStream":e.inbandEventStreams===void 0&&(e.inbandEventStreams=[]),e.inbandEventStreams.push(_e(a));break;case"Label":let u=ct(a.children);u!=null&&(e.label=u);break;case"Representation":let[f,d]=xo(a);e.representations.push(f),d.length>0&&(r=r.concat(d));break;case"Role":v(e.roles)?e.roles=[_e(a)]:e.roles.push(_e(a));break;case"SupplementalProperty":v(e.supplementalProperties)?e.supplementalProperties=[_e(a)]:e.supplementalProperties.push(_e(a));break;case"SegmentBase":let[l,m]=rt(a);e.segmentBase=l,m.length>0&&(r=r.concat(m));break;case"SegmentList":let[p,g]=pn(a);e.segmentList=p,g.length>0&&(r=r.concat(g));break;case"SegmentTemplate":let[h,I]=vt(a);e.segmentTemplate=h,I.length>0&&(r=r.concat(I));break;case"ContentProtection":let[y,T]=nt(a);T.length>0&&(r=r.concat(T)),y!==void 0&&t.push(y);break}}return t.length>0&&(e.contentProtections=t),[e,r]}function dd(n){let e={},t=[],r=fe(e,t);for(let i of Object.keys(n.attributes)){let a=n.attributes[i];if(!v(a))switch(i){case"id":e.id=a;break;case"group":r(a,{asKey:"group",parser:ee,dashName:"group"});break;case"lang":e.language=a;break;case"contentType":e.contentType=a;break;case"par":e.par=a;break;case"minBandwidth":r(a,{asKey:"minBitrate",parser:ee,dashName:"minBandwidth"});break;case"maxBandwidth":r(a,{asKey:"maxBitrate",parser:ee,dashName:"maxBandwidth"});break;case"minWidth":r(a,{asKey:"minWidth",parser:ee,dashName:"minWidth"});break;case"maxWidth":r(a,{asKey:"maxWidth",parser:ee,dashName:"maxWidth"});break;case"minHeight":r(a,{asKey:"minHeight",parser:ee,dashName:"minHeight"});break;case"maxHeight":r(a,{asKey:"maxHeight",parser:ee,dashName:"maxHeight"});break;case"minFrameRate":r(a,{asKey:"minFrameRate",parser:Lt,dashName:"minFrameRate"});break;case"maxFrameRate":r(a,{asKey:"maxFrameRate",parser:Lt,dashName:"maxFrameRate"});break;case"selectionPriority":r(a,{asKey:"selectionPriority",parser:ee,dashName:"selectionPriority"});break;case"segmentAlignment":r(a,{asKey:"segmentAlignment",parser:xi,dashName:"segmentAlignment"});break;case"subsegmentAlignment":r(a,{asKey:"subsegmentAlignment",parser:xi,dashName:"subsegmentAlignment"});break;case"bitstreamSwitching":r(a,{asKey:"bitstreamSwitching",parser:ve,dashName:"bitstreamSwitching"});break;case"audioSamplingRate":e.audioSamplingRate=a;break;case"codecs":e.codecs=a;break;case"scte214:supplementalCodecs":e.supplementalCodecs=a;break;case"codingDependency":r(a,{asKey:"codingDependency",parser:ve,dashName:"codingDependency"});break;case"frameRate":r(a,{asKey:"frameRate",parser:Lt,dashName:"frameRate"});break;case"height":r(a,{asKey:"height",parser:ee,dashName:"height"});break;case"maxPlayoutRate":r(a,{asKey:"maxPlayoutRate",parser:ke,dashName:"maxPlayoutRate"});break;case"maximumSAPPeriod":r(a,{asKey:"maximumSAPPeriod",parser:ke,dashName:"maximumSAPPeriod"});break;case"mimeType":e.mimeType=a;break;case"profiles":e.profiles=a;break;case"segmentProfiles":e.segmentProfiles=a;break;case"width":r(a,{asKey:"width",parser:ee,dashName:"width"});break;case"availabilityTimeOffset":r(a,{asKey:"availabilityTimeOffset",parser:ke,dashName:"availabilityTimeOffset"});break;case"availabilityTimeComplete":r(a,{asKey:"availabilityTimeComplete",parser:ve,dashName:"availabilityTimeComplete"});break}}return[e,t]}function Mo(n){let e=n.children,[t,r]=ud(e),[i,a]=dd(n),o=r.concat(a);return[{children:t,attributes:i},o]}function ld(n){let e={},t=[],r=fe(e,t);for(let i of Object.keys(n.attributes)){let a=n.attributes[i];if(!v(a))switch(i){case"schemeIdUri":e.schemeIdUri=a;break;case"value":e.value=a;break;case"timescale":r(a,{asKey:"timescale",parser:ee,dashName:"timescale"});break;default:Ue(i,"xmlns:")&&(e.namespaces===void 0&&(e.namespaces=[]),e.namespaces.push({key:i.substring(6),value:a}));break}}return[e,t]}function Oo(n,e){let[t,r]=ld(n),i=[];for(let a of n.children)if(typeof a!="string"&&a.tagName==="Event"){let o={};if(v(a.attributes.id)||(o.id=a.attributes.id),!v(a.attributes.presentationTime)){let[s,u]=ee(a.attributes.presentationTime,"presentationTime");u!==null&&r.push(u),s!==null&&(o.presentationTime=s)}if(!v(a.attributes.duration)){let[s,u]=ee(a.attributes.duration,"duration");u!==null&&r.push(u),s!==null&&(o.duration=s)}if(a.posStart0&&(o=o.concat(y));break;case"ContentProtection":let[T,P]=nt(f);P.length>0&&(o=o.concat(P)),T!==void 0&&a.push(T);break}}return[{baseURLs:t,adaptations:r,eventStreams:s,segmentTemplate:i,contentProtections:a},o]}function md(n){let e={},t=[],r=fe(e,t);for(let i of Object.keys(n.attributes)){let a=n.attributes[i];if(!v(a))switch(i){case"id":e.id=a;break;case"start":r(a,{asKey:"start",parser:Ve,dashName:"start"});break;case"duration":r(a,{asKey:"duration",parser:Ve,dashName:"duration"});break;case"bitstreamSwitching":r(a,{asKey:"bitstreamSwitching",parser:ve,dashName:"bitstreamSwitching"});break;case"xlink:href":e.xlinkHref=a;break;case"xlink:actuate":e.xlinkActuate=a;break;default:Ue(i,"xmlns:")&&(e.namespaces===void 0&&(e.namespaces=[]),e.namespaces.push({key:i.substring(6),value:a}));break}}return[e,t]}function Tr(n,e){let[t,r]=fd(n.children,e),[i,a]=md(n),o=r.concat(a);return[{children:t,attributes:i},o]}function cd(n,e){let t=[],r=[],i=[],a=[],o=[],s=[];for(let u=0;u0&&(s=s.concat(I)),h!==void 0&&o.push(h);break}}return[{baseURLs:t,locations:r,periods:i,utcTimings:a,contentProtections:o},s]}function pd(n){let e={},t=[],r=fe(e,t);for(let i of Object.keys(n.attributes)){let a=n.attributes[i];if(!v(a))switch(i){case"id":e.id=a;break;case"profiles":e.profiles=a;break;case"type":e.type=a;break;case"availabilityStartTime":r(a,{asKey:"availabilityStartTime",parser:_r,dashName:"availabilityStartTime"});break;case"availabilityEndTime":r(a,{asKey:"availabilityEndTime",parser:_r,dashName:"availabilityEndTime"});break;case"publishTime":r(a,{asKey:"publishTime",parser:_r,dashName:"publishTime"});break;case"mediaPresentationDuration":r(a,{asKey:"duration",parser:Ve,dashName:"mediaPresentationDuration"});break;case"minimumUpdatePeriod":r(a,{asKey:"minimumUpdatePeriod",parser:Ve,dashName:"minimumUpdatePeriod"});break;case"minBufferTime":r(a,{asKey:"minBufferTime",parser:Ve,dashName:"minBufferTime"});break;case"timeShiftBufferDepth":r(a,{asKey:"timeShiftBufferDepth",parser:Ve,dashName:"timeShiftBufferDepth"});break;case"suggestedPresentationDelay":r(a,{asKey:"suggestedPresentationDelay",parser:Ve,dashName:"suggestedPresentationDelay"});break;case"maxSegmentDuration":r(a,{asKey:"maxSegmentDuration",parser:Ve,dashName:"maxSegmentDuration"});break;case"maxSubsegmentDuration":r(a,{asKey:"maxSubsegmentDuration",parser:Ve,dashName:"maxSubsegmentDuration"});break;default:Ue(i,"xmlns:")&&(e.namespaces===void 0&&(e.namespaces=[]),e.namespaces.push({key:i.substring(6),value:a}));break}}return[e,t]}function wo(n,e){let[t,r]=cd(n.children,e),[i,a]=pd(n),o=r.concat(a);return[{children:t,attributes:i},o]}function Ni(n,e){let t=ii(n),r=t[t.length-1];if(r===void 0||typeof r=="string"||r.tagName!=="MPD")throw new Error("DASH Parser: document root should be MPD");let[i,a]=wo(r,n),o=br(i,e,a);return s(o);function s(u){if(u.type==="done")return u;if(u.type==="needs-clock")return{type:"needs-resources",value:{urls:[u.value.url],format:"string",continue(f){if(f.length!==1)throw new Error("DASH parser: wrong number of loaded ressources.");let d=u.value.continue(f[0].responseData);return s(d)}}};if(u.type==="needs-xlinks")return{type:"needs-resources",value:{urls:u.value.xlinksUrls,format:"string",continue(f){let d=[];for(let m=0;m",T=ii(y),P=T[T.length-1];if(P===void 0||typeof P=="string")throw new Error("DASH parser: Invalid external ressources");let E=P.children,C=[],R=[];for(let k=0;k{o!==null&&(URL.revokeObjectURL(o),o=null),c.warn("Unable to call `instantiateStreaming` on WASM",g instanceof Error?g:"");let h=await s;if(h.status<200||h.status>=300)throw new Error("WebAssembly request failed. status: "+String(h.status));let I=await h.arrayBuffer();return WebAssembly.instantiate(I,a)}).then(g=>{o!==null&&(URL.revokeObjectURL(o),o=null),this._instance=g,this._linearMemory=this._instance.instance.exports.memory,this.status="initialized"}).catch(g=>{let h=g instanceof Error?g.toString():"Unknown error";throw c.warn("DW: Could not create DASH-WASM parser:",h),this.status="failure",g}),this._initProm;function f(g){return t.childrenParser(g)}function d(g){return t.popIfCurrent(g)}function l(g,h,I){return t.attributeParser(g,h,I)}function m(g,h,I){let y=i._linearMemory,T=new Uint8Array(y.buffer,h,I);if(g===1){let P=r.decode(T);c.warn("WASM Error Event:",P),i._warnings.push(new Error(P))}else if(g===0){let P=r.decode(T);c.warn("WASM Log Event:",P)}}function p(g,h){if(i._mpdData===null)throw new Error("DashWasmParser Error: No MPD to read.");let I=i._linearMemory,{mpd:y,cursor:T}=i._mpdData,P=Math.min(h,Id,y.byteLength-T);return new Uint8Array(I.buffer,g,P).set(new Uint8Array(y,T,P)),i._mpdData.cursor+=P,P}}runWasmParser(e,t){let[r,i]=this._parseMpd(e);if(r===null)throw new Error("DASH Parser: Unknown error while parsing the MPD");let a=br(r,t,i);return this._processParserReturnValue(a)}isCompatible(){return No&&typeof Ee.TextDecoder=="function"}_parseMpd(e){var s;if(this._instance===null)throw new Error("DashWasmParser not initialized");if(this._isParsing)throw new Error("Parsing operation already pending.");this._isParsing=!0,this._mpdData={mpd:e,cursor:0};let t={},r=this._linearMemory,i=Ui(t,r,this._parsersStack,e);this._parsersStack.pushParsers(null,i,D),this._warnings=[];try{this._instance.instance.exports.parse()}catch(u){throw this._parsersStack.reset(),this._warnings=[],this._isParsing=!1,u}let a=(s=t.mpd)!=null?s:null,o=this._warnings;return this._parsersStack.reset(),this._warnings=[],this._isParsing=!1,[a,o]}_parseXlink(e){if(this._instance===null)throw new Error("DashWasmParser not initialized");if(this._isParsing)throw new Error("Parsing operation already pending.");this._isParsing=!0,this._mpdData={mpd:e,cursor:0};let t={periods:[]},r=this._linearMemory,i=Ko(t,r,this._parsersStack,e);this._parsersStack.pushParsers(null,i,D),this._warnings=[];try{this._instance.instance.exports.parse()}catch(s){throw this._parsersStack.reset(),this._warnings=[],this._isParsing=!1,s}let{periods:a}=t,o=this._warnings;return this._parsersStack.reset(),this._warnings=[],this._isParsing=!1,[a,o]}_processParserReturnValue(e){if(e.type==="done")return e;if(e.type==="needs-clock"){let t=r=>{if(r.length!==1)throw new Error("DASH parser: wrong number of loaded ressources.");let i=e.value.continue(r[0].responseData);return this._processParserReturnValue(i)};return{type:"needs-resources",value:{urls:[e.value.url],format:"string",continue:t}}}else if(e.type==="needs-xlinks"){let t=r=>{let i=[];for(let o=0;onew Promise((a,o)=>{let s=Date.now()-L(),u=!1,m={reject:h=>{var P,E;if(u||i.isCancelled())return;u=!0,i.deregister(g);let I=h,y=(P=I==null?void 0:I.message)!=null?P:"Unknown error when fetching the Manifest through a custom manifestLoader.",T=new Ke(y,(E=I==null?void 0:I.canRetry)!=null?E:!1,I==null?void 0:I.xhr);o(T)},resolve:h=>{if(u||i.isCancelled())return;u=!0,i.deregister(g);let I=h.receivingTime!==void 0?h.receivingTime-s:void 0,y=h.sendingTime!==void 0?h.sendingTime-s:void 0;a({responseData:h.data,size:h.size,requestDuration:h.duration,url:h.url,receivedTime:I,sendingTime:y})},fallback:()=>{u||i.isCancelled()||(u=!0,i.deregister(g),e(t,r,i).then(a,o))}},p=n({url:t,timeout:r.timeout},m);i.register(g);function g(h){u||(u=!0,typeof p=="function"&&p(),o(h))}})}function bd(n){return function(t,r,i){if(t===void 0)throw new Error("Cannot perform HTTP(s) request. URL not known");switch(n){case"arraybuffer":return le({url:t,responseType:"arraybuffer",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:i});case"text":return le({url:t,responseType:"text",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:i});case"document":return le({url:t,responseType:"document",timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:i});default:We(n)}}}function Fi({customManifestLoader:n},e){let t=bd(e);return typeof n!="function"?t:Li(n,t)}function zi(n){let{referenceDateTime:e}=n,t=n.serverSyncInfos!==void 0?n.serverSyncInfos.serverTimestamp-n.serverSyncInfos.clientTime:void 0;return function(i,a,o,s,u){var T;let{responseData:f}=i,d=a.externalClockOffset,l=(T=i.url)!=null?T:a.originalUrl,m=t!=null?t:d,g={unsafelyBaseOnPreviousManifest:a.unsafeMode?a.previousManifest:null,url:l,referenceDateTime:e,externalClockOffset:m},h=ae.dashParsers;if(h.wasm===null||h.wasm.status==="uninitialized"||h.wasm.status==="failure")return c.debug("DASH: WASM MPD Parser not initialized. Running JS one."),I();{let P=Ed(f);if(!Rd(P))return c.info("DASH: MPD doesn't seem to be UTF-8-encoded. Running JS parser instead of the WASM one."),I();if(h.wasm.status==="initialized"){c.debug("DASH: Running WASM MPD Parser.");let E=h.wasm.runWasmParser(P,g);return y(E)}else return c.debug("DASH: Awaiting WASM initialization before parsing the MPD."),h.wasm.waitForInitialization().catch(()=>{}).then(()=>{if(h.wasm===null||h.wasm.status!=="initialized")return c.warn("DASH: WASM MPD parser initialization failed. Running JS parser instead"),I();c.debug("DASH: Running WASM MPD Parser.");let C=h.wasm.runWasmParser(P,g);return y(C)})}function I(){if(h.fastJs!==null){let P=_d(f),E=h.fastJs(P,g);return y(E)}else if(h.native!==null){let P=Td(f),E=h.native(P,g);return y(E)}else throw new Error("No MPD parser is imported")}function y(P){if(P.type==="done"){if(P.value.warnings.length>0&&o(P.value.warnings),s.isCancelled())return Promise.reject(s.cancellationError);let R=[];return{manifest:new Nt(P.value.parsed,n,R),url:l,warnings:R}}let{value:E}=P,C=E.urls.map(R=>u(()=>{let k=U.getCurrent().DEFAULT_REQUEST_TIMEOUT,_=U.getCurrent().DEFAULT_CONNECTION_TIMEOUT;return E.format==="string"?le({url:R,responseType:"text",timeout:k,connectionTimeout:_,cancelSignal:s}):le({url:R,responseType:"arraybuffer",timeout:k,connectionTimeout:_,cancelSignal:s})}).then(k=>{if(E.format==="string"){if(typeof k.responseData!="string")throw new Error("External DASH resources should have been a string");return H(k,{responseData:{success:!0,data:k.responseData}})}else{if(!(k.responseData instanceof ArrayBuffer))throw new Error("External DASH resources should have been ArrayBuffers");return H(k,{responseData:{success:!0,data:k.responseData}})}},k=>{let _=he(k,{defaultCode:"PIPELINE_PARSE_ERROR",defaultReason:"An unknown error occured when parsing ressources."});return H({},{size:void 0,requestDuration:void 0,responseData:{success:!1,error:_}})}));return Promise.all(C).then(R=>E.format==="string"?(Sd(R),y(E.continue(R))):(yd(R),y(E.continue(R))))}}}function Sd(n){b.CURRENT_ENV!==b.PRODUCTION&&n.forEach(e=>{let{responseData:t}=e;if(!(t.success&&typeof t.data=="string")&&t.success)throw new Error("Invalid data given to the LoadedRessource")})}function yd(n){b.CURRENT_ENV!==b.PRODUCTION&&n.forEach(e=>{let{responseData:t}=e;if(!(t.success&&t.data instanceof ArrayBuffer)&&t.success)throw new Error("Invalid data given to the LoadedRessource")})}function _d(n){if(n instanceof ArrayBuffer)return Le(new Uint8Array(n));if(typeof n=="string")return n;if(n instanceof Document)return n.documentElement.outerHTML;throw new Error("DASH Manifest Parser: Unrecognized Manifest format")}function Td(n){if(n instanceof ArrayBuffer)return new DOMParser().parseFromString(Le(new Uint8Array(n)),"text/xml");if(typeof n=="string")return new DOMParser().parseFromString(n,"text/xml");if(n instanceof Document)return n;throw new Error("DASH Manifest Parser: Unrecognized Manifest format")}function Ed(n){if(n instanceof ArrayBuffer)return n;if(typeof n=="string")return mn(n).buffer;if(n instanceof Document)return mn(n.documentElement.innerHTML).buffer;throw new Error("DASH Manifest Parser: Unrecognized Manifest format")}function Rd(n){let e=new DataView(n);return e.getUint16(0)===61371&&e.getUint8(2)===191?!0:!(e.getUint16(0)===65279||e.getUint16(0)===65534)}function we([n,e]){return e===1/0?`bytes=${n}-`:`bytes=${n}-${e}`}function He(n,e){if(n==="audio"||n==="video")return e==="video/mp4"||e==="audio/mp4"?"mp4":e==="video/webm"||e==="audio/webm"?"webm":void 0;if(n==="text")return e==="application/mp4"?"mp4":void 0}var W=class{constructor(){let[e,t]=Pd();this._isUsed=!1,this._trigger=e,this.signal=new Wi(t)}isUsed(){return this._isUsed}linkToSignal(e){let t=e.register(()=>{this.cancel()});return this.signal.register(t),t}cancel(e){if(this._isUsed)return;this._isUsed=!0;let t=e!=null?e:new ie;this._trigger(t)}static isCancellationError(e){return e instanceof ie}},Wi=class{constructor(e){this._isCancelled=!1,this.cancellationError=null,this._listeners=[],e(t=>{for(this.cancellationError=t,this._isCancelled=!0;this._listeners.length>0;)try{let r=this._listeners.pop();r==null||r(t)}catch(r){c.error("Error while calling clean up listener",r instanceof Error?r.toString():"Unknown error")}})}isCancelled(){return this._isCancelled}register(e){return this._isCancelled?(Ie(this.cancellationError!==null),e(this.cancellationError),D):(this._listeners.push(e),()=>this.deregister(e))}deregister(e){for(let t=this._listeners.length-1;t>=0;t--)this._listeners[t]===e&&this._listeners.splice(t,1)}},ie=class n extends Error{constructor(){let e="This task was cancelled.";super(e),Object.setPrototypeOf(this,n.prototype),this.name="CancellationError"}};function Pd(){let n=D;return[function(t){n(t)},function(t){n=t}]}function At(...n){let e=n.length,t=-1,r=0,i;for(;++t0&&(a.set(i,o),o+=i.length);return a}function Yo(n,e){return(n[e+0]<<8)+(n[e+1]<<0)}function Vi(n,e){return n[e+0]*65536+n[e+1]*256+n[e+2]}function te(n,e){return n[e+0]*16777216+n[e+1]*65536+n[e+2]*256+n[e+3]}function ht(n,e){return(n[e+0]*16777216+n[e+1]*65536+n[e+2]*256+n[e+3])*4294967296+n[e+4]*16777216+n[e+5]*65536+n[e+6]*256+n[e+7]}function Qe(n,e){let t=n.length,r=0;for(;r+8<=t;){let i=te(n,r);if(i===0)i=t-r;else if(i===1){if(r+16>t)return-1;i=ht(n,r+8)}if(isNaN(i)||i<=0)return-1;if(te(n,r+4)===e)return r+i<=t?r:-1;r+=i}return-1}function Cr(n){let e=0,t=[],r=null;for(;e<=n.length;){if(e===n.length){r=null;break}r=n.subarray(e,1/0);let i=Qe(r,1836019558);if(i<0)break;let a=te(n,i+e),o=e+i+a;if(o>n.length)break;let s=Qe(r,1835295092);if(s<0)break;let u=te(n,s+e),f=e+s+u;if(f>n.length)break;let d=Math.max(o,f),l=n.subarray(e,d);t.push(l),e=d}return t.length===0?[null,r]:[t,r]}function vd(n,e,t){return new Uint8Array(Array.prototype.slice.call(n,e,t))}function Cd(n,e,t){return n.slice(e,t)}var qi=typeof Uint8Array.prototype.slice=="function"?Cd:vd;function Hi(n,e){let t=n;for(let r of e){let i=ue(t,r);if(i===null)return null;t=i}return t}function ue(n,e){let t=Wt(n,e);return t!==null?n.subarray(t[1],t[2]):null}function Qo(n,e){let t=[],r=n;for(;;){let i=Wt(r,e);if(i===null)return t;Ie(i[2]!==0&&r.length!==0),t.push(r.subarray(i[1],i[2])),r=r.subarray(i[2])}}function Wt(n,e){let t=n.length,r=0,i,a=0,o;for(;r+8<=t;){if(o=r,a=te(n,o),o+=4,i=te(n,o),o+=4,a===0)a=t-r;else if(a===1){if(o+8>t)return null;a=ht(n,o),o+=8}if(a<0)throw new Error("ISOBMFF: Size out of range");if(i===e)return e===1970628964&&(o+=16),[r,o,r+a];r+=a}return null}function Ar(n){let e=0,t=ue(n,1836019574);if(t===null)return[];let r=[];for(;e1){c.warn("ISOBMFF: un-handled PSSH version");return}let t=e+4;if(t+16>n.length)return;let r=qi(n,t,t+16);return To(r)}function Gi(n){let e=ue(n,1836019558);return e===null?null:ue(e,1953653094)}function Xo(n){return Qo(n,1836019558).reduce((t,r)=>{let i=ue(r,1953653094);return i!==null&&t.push(i),t},[])}function Ki(n){return ue(n,1835295092)}function ji(n){let e=ue(n,1836019574);if(e===null)return null;let t=ue(e,1953653099);return t===null?null:ue(t,1835297121)}function Zo(n,e=0){return ue(n.subarray(e),1701671783)}function bn(n,e){let t=Wt(n,1936286840);if(t===null)return null;let r=e,i=t[2]-t[0],a=t[1],o=n[a];a+=8;let s=te(n,a);a+=4;let u;if(o===0)u=te(n,a),a+=4,r+=te(n,a)+i,a+=4;else if(o===1)u=ht(n,a),a+=8,r+=ht(n,a)+i,a+=8;else return null;let f=[];a+=2;let d=Yo(n,a);for(a+=2;--d>=0;){let l=te(n,a);a+=4;let m=(l&2147483648)>>>31,p=l&2147483647;if(m===1)throw new Error("sidx with reference_type `1` not yet implemented");let g=te(n,a);a+=4,a+=4,f.push({time:u,duration:g,timescale:s,range:[r,r+p-1]}),u+=g,r+=p}return f}function Yi(n){let e=Gi(n);if(e===null)return;let t=ue(e,1952867444);if(t===null)return;let r=t[0];if(r===1)return ht(t,4);if(r===0)return te(t,4)}function Ad(n){let e=ue(n,1952868452);if(e===null)return;let t=1,r=Vi(e,t);t+=3;let i=(r&1)>0,a=(r&2)>0;return(r&8)>0?(t+=4,i&&(t+=8),a&&(t+=4),te(e,t)):void 0}function Qi(n){let e=Xo(n);if(e.length===0)return;let t=0;for(let r of e){let i=ue(r,1953658222);if(i===null)return;let a=0,o=i[a];if(a+=1,o>1)return;let s=Vi(i,a);a+=3;let u=(s&256)>0,f=0;if(!u&&(f=Ad(r),f===void 0))return;let d=(s&1)>0,l=(s&4)>0,m=(s&512)>0,p=(s&1024)>0,g=(s&2048)>0,h=te(i,a);a+=4,d&&(a+=4),l&&(a+=4);let I=h,y=0;for(;I-- >0;)u?(y+=te(i,a),a+=4):y+=f,m&&(a+=4),p&&(a+=4),g&&(a+=4);t+=y}return t}function Sn(n){let e=ji(n);if(e===null)return;let t=ue(e,1835296868);if(t===null)return;let r=0,i=t[r];if(r+=4,i===1)return te(t,r+16);if(i===0)return te(t,r+8)}function Jo(n){let e=[],t=0;for(;ts===0)?null:o}function $i(n,e){if(e){if(Qe(n,1718909296)<0)throw new Re("INTEGRITY_ERROR","Incomplete `ftyp` box");if(Qe(n,1836019574)<0)throw new Re("INTEGRITY_ERROR","Incomplete `moov` box")}else{if(Qe(n,1836019558)<0)throw new Re("INTEGRITY_ERROR","Incomplete `moof` box");if(Qe(n,1835295092)<0)throw new Re("INTEGRITY_ERROR","Incomplete `mdat` box")}}function yn(n){return(e,t,r,i,a)=>{return new Promise((s,u)=>{let f=new W,d=f.linkToSignal(i);f.signal.register(u),n(e,t,r,f.signal,Me(ge({},a),{onNewChunk(m){try{o(m),a.onNewChunk(m)}catch(p){l(),f.cancel(),u(p)}}})).then(m=>{if(l(),!f.isUsed()){if(m.resultType==="segment-loaded")try{o(m.resultData.responseData)}catch(p){u(p);return}s(m)}},m=>{l(),u(m)});function l(){f.signal.deregister(u),d()}});function o(s){!(s instanceof ArrayBuffer)&&!(s instanceof Uint8Array)||He(t.type,t.mimeType)!=="mp4"||$i(new Uint8Array(s),t.segment.isInit)}}}function _n(n,e){return n===null?null:e.url===null?n.baseUrl:pr(n.baseUrl,e.url)}function Tn(n,e,t,r,i){if(e.range===void 0)return le({url:n,responseType:"arraybuffer",timeout:t.timeout,connectionTimeout:t.connectionTimeout,cancelSignal:r,onProgress:i.onProgress}).then(s=>({resultType:"segment-loaded",resultData:s}));if(e.indexRange===void 0)return le({url:n,headers:{Range:we(e.range)},responseType:"arraybuffer",timeout:t.timeout,connectionTimeout:t.connectionTimeout,cancelSignal:r,onProgress:i.onProgress}).then(s=>({resultType:"segment-loaded",resultData:s}));if(e.range[1]+1===e.indexRange[0])return le({url:n,headers:{Range:we([e.range[0],e.indexRange[1]])},responseType:"arraybuffer",timeout:t.timeout,connectionTimeout:t.connectionTimeout,cancelSignal:r,onProgress:i.onProgress}).then(s=>({resultType:"segment-loaded",resultData:s}));let a=le({url:n,headers:{Range:we(e.range)},responseType:"arraybuffer",timeout:t.timeout,connectionTimeout:t.connectionTimeout,cancelSignal:r,onProgress:i.onProgress}),o=le({url:n,headers:{Range:we(e.indexRange)},responseType:"arraybuffer",timeout:t.timeout,connectionTimeout:t.connectionTimeout,cancelSignal:r,onProgress:i.onProgress});return Promise.all([a,o]).then(([s,u])=>{let f=At(new Uint8Array(s.responseData),new Uint8Array(u.responseData)),d=Math.min(s.sendingTime,u.sendingTime),l=Math.max(s.receivedTime,u.receivedTime);return{resultType:"segment-loaded",resultData:{url:n,responseData:f,size:s.size+u.size,requestDuration:l-d,sendingTime:d,receivedTime:l}}})}function En(n,e,t,r,i){let{segment:a}=e,o=a.range!==void 0?{Range:we(a.range)}:void 0,s=null;function u(f){let d=new Uint8Array(f.chunk),l=s!==null?At(s,d):d,m=Cr(l),p=m[0];s=m[1],!(p!==null&&(p.forEach(g=>{r.onNewChunk(g)}),i.isCancelled()))&&(r.onProgress({duration:f.duration,size:f.size,totalSize:f.totalSize}),i.isCancelled())}return ar({url:n,headers:o,onData:u,timeout:t.timeout,connectionTimeout:t.connectionTimeout,cancelSignal:i}).then(f=>({resultType:"chunk-complete",resultData:f}))}function ts(n,e,t,r,i,a){if(e.segment.isInit)return Tn(n,e.segment,r,a,i);let o=He(e.type,e.mimeType);if(t&&(o==="mp4"||o===void 0)){if(Zt())return En(n,e,r,i,a);Xe("DASH: Your browser does not have the fetch API. You will have a higher chance of rebuffering when playing close to the live edge")}let{segment:s}=e;return le({url:n,responseType:"arraybuffer",headers:s.range!==void 0?{Range:we(s.range)}:void 0,timeout:r.timeout,connectionTimeout:r.connectionTimeout,cancelSignal:a,onProgress:i.onProgress}).then(u=>({resultType:"segment-loaded",resultData:u}))}function Xi({lowLatencyMode:n,segmentLoader:e,checkMediaSegmentIntegrity:t}){return t!==!0?r:yn(r);function r(i,a,o,s,u){let f=_n(i,a.segment);return f===null?Promise.resolve({resultType:"segment-created",resultData:null}):n||e===void 0?ts(f,a,n,o,u,s):new Promise((d,l)=>{let m=!1,y={reject:R=>{var x,M;if(m||s.isCancelled())return;m=!0,s.deregister(C);let k=R,_=(x=k==null?void 0:k.message)!=null?x:"Unknown error when fetching a DASH segment through a custom segmentLoader.",A=new Ke(_,(M=k==null?void 0:k.canRetry)!=null?M:!1,k==null?void 0:k.xhr);l(A)},resolve:R=>{m||s.isCancelled()||(m=!0,s.deregister(C),d({resultType:"segment-loaded",resultData:{responseData:R.data,size:R.size,requestDuration:R.duration}}))},progress:R=>{m||s.isCancelled()||u.onProgress({duration:R.duration,size:R.size,totalSize:R.totalSize})},fallback:()=>{m||s.isCancelled()||(m=!0,s.deregister(C),ts(f,a,n,o,u,s).then(d,l))}},T;a.segment.range!==void 0&&(T=[a.segment.range],a.segment.indexRange!==void 0&&T.push(a.segment.indexRange));let P={isInit:a.segment.isInit,timeout:o.timeout,byteRanges:T,trackType:a.type,url:f},E=e(P,y);s.register(C);function C(R){m||(m=!0,typeof E=="function"&&E(),l(R))}})}}var Ji=408125543,ns=357149030,kd=2807729,xd=17545,Md=475249515,Od=187,wd=179,Dd=183,Nd=241;function It(n,e,t,[r,i]){let a=r;for(;a0){for(let h=0;h=Math.pow(2,8-t))return t}function Ud(n,e){let t=rs(n,e);if(t===void 0)return c.warn("webm: unrepresentable length"),null;if(e+t>n.length)return c.warn("webm: impossible length"),null;let r=0;for(let i=0;in.length)return c.warn("webm: impossible length"),null;let r=(n[e]&(1<<8-t)-1)*Math.pow(2,(t-1)*8);for(let i=1;i=a)return!0}return!1}function ta(n,e){if(n.length===0)return;let{manifestRefreshEventsFromEMSGs:t,EMSGs:r}=n.reduce((o,s)=>(s.schemeIdUri==="urn:mpeg:dash:event:2012"&&s.value==="1"?(o.manifestRefreshEventsFromEMSGs===void 0&&(o.manifestRefreshEventsFromEMSGs=[]),o.manifestRefreshEventsFromEMSGs.push(s)):(o.EMSGs===void 0&&(o.EMSGs=[]),o.EMSGs.push(s)),o),{manifestRefreshEventsFromEMSGs:void 0,EMSGs:void 0}),i=r==null?void 0:r.map(o=>({type:"emsg",value:o})),a=e===void 0||t===void 0?!1:Wd(t,e);return{inbandEvents:i,needsManifestRefresh:a}}function na({__priv_patchLastSegmentInSidx:n}){return function(t,r,i){var P,E;let{segment:a,periodStart:o,periodEnd:s}=r,{data:u,isChunked:f}=t,d=[o,s];if(u===null)return a.isInit?{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0}:{segmentType:"media",chunkData:null,chunkSize:0,chunkInfos:null,chunkOffset:0,protectionData:[],appendWindow:d};let l=u instanceof Uint8Array?u:new Uint8Array(u),m=He(r.type,r.mimeType),p=m==="mp4"||m===void 0,g=[];if(p){let C=Ar(l),R;a.isInit&&(R=(P=es(l))!=null?P:void 0),(C.length>0||R!==void 0)&&g.push({initDataType:"cenc",keyId:R,initData:C})}if(!a.isInit){let C=p?Rn(l,f,a,i):null,R=(E=a.timestampOffset)!=null?E:0;if(p){let k=Jo(l);if(k!==void 0){let _=k.filter(x=>a.privateInfos===void 0||a.privateInfos.isEMSGWhitelisted===void 0?!1:a.privateInfos.isEMSGWhitelisted(x)),A=ta(_,r.manifestPublishTime);if(A!==void 0){let{needsManifestRefresh:x,inbandEvents:M}=A;return{segmentType:"media",chunkData:l,chunkSize:l.length,chunkInfos:C,chunkOffset:R,appendWindow:d,inbandEvents:M,protectionData:g,needsManifestRefresh:x}}}}return{segmentType:"media",chunkData:l,chunkSize:l.length,chunkInfos:C,chunkOffset:R,protectionData:g,appendWindow:d}}let{indexRange:h}=a,I;if(m==="webm")I=ea(l,0);else if(p&&(I=bn(l,Array.isArray(h)?h[0]:0),n===!0&&I!==null&&I.length>0)){let C=I[I.length-1];Array.isArray(C.range)&&(C.range[1]=1/0)}let y;p?y=Sn(l):m==="webm"&&(y=kr(l,0));let T=v(y)?void 0:y;return{segmentType:"init",initializationData:l,initializationDataSize:l.length,protectionData:g,initTimescale:T,segmentList:I!=null?I:void 0}}}function ra({lowLatencyMode:n,checkMediaSegmentIntegrity:e}){return e!==!0?t:yn(t);function t(r,i,a,o,s){let{segment:u}=i,{range:f}=u,d=_n(r,u);if(d===null)return Promise.resolve({resultType:"segment-created",resultData:null});if(u.isInit)return Tn(d,u,a,o,s);let l=He(i.type,i.mimeType),m=l==="mp4"||l===void 0;if(n&&m){if(Zt())return En(d,i,a,s,o);Xe("DASH: Your browser does not have the fetch API. You will have a higher chance of rebuffering when playing close to the live edge")}return m?le({url:d,responseType:"arraybuffer",headers:Array.isArray(f)?{Range:we(f)}:null,timeout:a.timeout,connectionTimeout:a.connectionTimeout,onProgress:s.onProgress,cancelSignal:o}).then(p=>({resultType:"segment-loaded",resultData:p})):le({url:d,responseType:"text",headers:Array.isArray(f)?{Range:we(f)}:null,timeout:a.timeout,connectionTimeout:a.connectionTimeout,onProgress:s.onProgress,cancelSignal:o}).then(p=>({resultType:"segment-loaded",resultData:p}))}}function Vd(n){let e=Ki(n);return e===null?"":Le(e)}function qd(n){if(n===void 0)throw new Error("Cannot parse subtitles: unknown format");switch(n.toLowerCase()){case"stpp":case"stpp.ttml.im1t":return"ttml";case"wvtt":return"vtt"}throw new Error(`The codec used for the subtitles "${n}" is not managed yet.`)}function Hd(n,e){switch(e){case"application/ttml+xml":return"ttml";case"application/x-sami":case"application/smil":return"sami";case"text/vtt":return"vtt"}if(n!==void 0&&n.toLowerCase()==="srt")return"srt";throw new Error(`could not find a text-track parser for the type ${e!=null?e:""}`)}function is({segment:n,language:e,codecs:t},r,i,a){if(n.isInit)return null;let o,s;i===null?a?(o=n.time,s=n.end):c.warn("Transport: Unavailable time data for current text track."):(o=i.time,i.duration!==void 0?s=o+i.duration:!a&&n.complete&&(s=o+n.duration));let u=qd(t);return{data:Vd(r),type:u,language:e,start:o,end:s}}function as(n,e,t){let{segment:r}=n;if(r.isInit)return null;let i,a;t?c.warn("Transport: Unavailable time data for current text track."):(i=r.time,r.complete&&(a=r.time+r.duration));let o=Hd(n.codecs,n.mimeType);return{data:e,type:o,language:n.language,start:i,end:a}}function Gd(n,e,t,r,i){var m;let{segment:a}=t,{isInit:o,indexRange:s}=a,u;if(typeof n=="string"?u=mn(n):n instanceof Uint8Array?u=n:u=new Uint8Array(n),o){let p=bn(u,Array.isArray(s)?s[0]:0);if(i===!0&&p!==null&&p.length>0){let h=p[p.length-1];Array.isArray(h.range)&&(h.range[1]=1/0)}let g=Sn(u);return{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:g,segmentList:p!=null?p:void 0}}let f=Rn(u,e,a,r),d=is(t,u,f,e),l=(m=a.timestampOffset)!=null?m:0;return{segmentType:"media",chunkData:d,chunkSize:u.length,chunkInfos:f,chunkOffset:l,protectionData:[],appendWindow:[t.periodStart,t.periodEnd]}}function Kd(n,e,t){let{periodStart:r,periodEnd:i,segment:a}=t,{timestampOffset:o=0}=a;if(a.isInit)return{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0};let s,u;if(typeof n!="string"){let d=n instanceof Uint8Array?n:new Uint8Array(n);s=Le(d),u=d.length}else s=n;return{segmentType:"media",chunkData:as(t,s,e),chunkSize:u,chunkInfos:null,chunkOffset:o,protectionData:[],appendWindow:[r,i]}}function ia({__priv_patchLastSegmentInSidx:n}){return function(t,r,i){var l;let{periodStart:a,periodEnd:o,segment:s}=r,{data:u,isChunked:f}=t;if(u===null)return s.isInit?{segmentType:"init",initializationData:null,initializationDataSize:0,protectionData:[],initTimescale:void 0}:{segmentType:"media",chunkData:null,chunkSize:0,chunkInfos:null,chunkOffset:(l=s.timestampOffset)!=null?l:0,protectionData:[],appendWindow:[a,o]};let d=He(r.type,r.mimeType);if(d==="webm")throw new Error("Text tracks with a WEBM container are not yet handled.");return d==="mp4"?Gd(u,f,r,i,n):Kd(u,f,r)}}function os(n){let e=Fi({customManifestLoader:n.manifestLoader},jd()?"text":"arraybuffer"),t=zi(n),r=Xi(n),i=na(n),a=ra(n),o=ia(n);return{manifest:{loadManifest:e,parseManifest:t},audio:{loadSegment:r,parseSegment:i},video:{loadSegment:r,parseSegment:i},text:{loadSegment:a,parseSegment:o}}}function jd(){return ae.dashParsers.wasm!==null&&(ae.dashParsers.wasm.status==="initialized"||ae.dashParsers.wasm.status==="initializing")}var ss=os;var kt=typeof queueMicrotask=="function"?queueMicrotask:function(e){Promise.resolve().then(e,()=>e())};var xt=class{constructor(e){this._array=[],this._sortingFn=e}add(...e){e.sort(this._sortingFn);let t=0;for(let r=0;r=this._array.length)throw new Error("Invalid index.");return this._array[e]}toArray(){return this._array.slice()}findFirst(e){return K(this._array,e)}has(e){return se(this._array,e)}removeElement(e){let t=this._array.indexOf(e);if(t>=0)return this._array.splice(t,1),t}head(){return this._array[0]}last(){return this._array[this._array.length-1]}shift(){return this._array.shift()}pop(){return this._array.pop()}};var Pn=class{constructor(e){this._weakMap=new WeakMap,this._fn=e}get(e){let t=this._weakMap.get(e);if(t===void 0){let r=this._fn(e);return this._weakMap.set(e,r),r}else return t}destroy(e){this._weakMap.delete(e)}};var Yd=.016666666666666666;function us(n,e){return Math.abs(n-e)=0;t--){let r=n[t].start;if(e>=r){let i=n[t].end;if(e=o?r.push({start:a,end:o}):t={start:a,end:o}}return{outerRanges:r,innerRange:t}}function xr(n,e){let t=Xd(n,e);return t!==null?t.end-e:1/0}function Vt(n,e){if(e.start===e.end)return n;let t=e,r=0;for(;r0)for(let s=0;ss&&t.push({start:s,end:a[u].start}),s=a[u].end;s{a=u.position.getWanted(),o=u.buffered[n.bufferType],s()},{includeLastObservation:!0,clearSignal:i});function s(){o!==null&&Jd(n,a,o,t.getValue(),r.getValue(),i).catch(u=>{let f=u instanceof Error?u.message:"Unknown error";c.error("Could not run BufferGarbageCollector:",f)})}t.onUpdate(s,{clearSignal:i}),r.onUpdate(s,{clearSignal:i}),s()}async function Jd(n,e,t,r,i,a){if(!isFinite(r)&&!isFinite(i))return Promise.resolve();let o=[],{innerRange:s,outerRanges:u}=cs(t,e),f=()=>{if(isFinite(r)){for(let l of u)e-r>=l.end?o.push(l):e>=l.end&&e-r>l.start&&e-rs.start&&o.push({start:s.start,end:e-r})}},d=()=>{if(isFinite(i)){for(let l of u)e+i<=l.start?o.push(l):e<=l.start&&e+il.start&&o.push({start:e+i,end:l.end});v(s)||e+iZe(t.context,e))}_cleanHistory(e){let t=e-this._lifetime,r=0;for(let i of this._history)if(i.date0&&(this._history=this._history.splice(r)),this._history.length>this._maxHistoryLength){let i=this._history.length-this._maxHistoryLength;this._history=this._history.splice(i)}}};var Cn=class{constructor(){let{BUFFERED_HISTORY_RETENTION_TIME:e,BUFFERED_HISTORY_MAXIMUM_ENTRIES:t}=U.getCurrent();this._inventory=[],this._bufferedHistory=new vn(e,t)}reset(){this._inventory.length=0}synchronizeBuffered(e){var u,f,d,l,m,p,g;let t=this._inventory,r=0,i=t[0],{MINIMUM_SEGMENT_SIZE:a}=U.getCurrent(),o=i==null?void 0:i.infos.adaptation.type;if(c.hasLevel("DEBUG")){let h=e.map(I=>`${I.start}-${I.end}`).join(",");c.debug(`SI: synchronizing ${o!=null?o:"unknown"} buffered ranges:`,h)}let s=e.length;for(let h=0;h0){let R=t[T+E-1];P={end:(f=R.bufferedEnd)!=null?f:R.end,precizeEnd:R.precizeEnd},c.debug(`SI: ${E} segments GCed.`,o);let k=t.splice(T,E);for(let _ of k)_.bufferedStart===void 0&&_.bufferedEnd===void 0&&_.status!==2&&this._bufferedHistory.addBufferedSegment(_.infos,null);r=T}if(i===void 0)return;if(y-((d=i.bufferedStart)!=null?d:i.start)>=a){if(el(i,I,P,o),r===t.length-1){gs(i,y,o);return}i=t[++r];let R=(l=i.bufferedStart)!=null?l:i.start,k=(m=i.bufferedEnd)!=null?m:i.end,_=h=a||_!==void 0&&y-R=h&&(c.debug("SI: A segment at the end has been completely GCed",o,`${T.start}-${T.end}`),T.bufferedStart===void 0&&T.bufferedEnd===void 0&&T.status!==2&&this._bufferedHistory.addBufferedSegment(T.infos,null),t.splice(y,1),y--)}}o!==void 0&&c.hasLevel("DEBUG")&&c.debug(`SI: current ${o} inventory timeline: +`+tl(this._inventory))}insertChunk({period:e,adaptation:t,representation:r,segment:i,chunkSize:a,start:o,end:s},u,f){if(i.isInit)return;let d=t.type;if(o>=s){c.warn("SI: Invalid chunked inserted: starts before it ends",d,o,s);return}let l=this._inventory,m={status:u?0:2,insertionTs:f,chunkSize:a,splitted:!1,start:o,end:s,precizeStart:!1,precizeEnd:!1,bufferedStart:void 0,bufferedEnd:void 0,infos:{segment:i,period:e,adaptation:t,representation:r}};for(let g=l.length-1;g>=0;g--){let h=l[g];if(h.start<=o)if(h.end<=o){for(c.debug("SI: Pushing segment strictly after previous one.",d,o,h.end),this._inventory.splice(g+1,0,m),g+=2;gm.end){c.debug("SI: Segment pushed updates the start of the next one",d,m.end,l[g].start),l[g].start=m.end,l[g].bufferedStart=void 0,l[g].precizeStart=l[g].precizeStart&&m.precizeEnd;return}c.debug("SI: Segment pushed removes the next one",d,o,s,l[g].start,l[g].end),l.splice(g,1)}return}else if(h.start===o)if(h.end<=s){for(c.debug("SI: Segment pushed replace another one",d,o,s,h.end),this._inventory.splice(g,1,m),g+=1;gm.end){c.debug("SI: Segment pushed updates the start of the next one",d,m.end,l[g].start),l[g].start=m.end,l[g].bufferedStart=void 0,l[g].precizeStart=l[g].precizeStart&&m.precizeEnd;return}c.debug("SI: Segment pushed removes the next one",d,o,s,l[g].start,l[g].end),l.splice(g,1)}return}else{c.debug("SI: Segment pushed ends before another with the same start",d,o,s,h.end),l.splice(g,0,m),h.start=m.end,h.bufferedStart=void 0,h.precizeStart=h.precizeStart&&m.precizeEnd;return}else if(h.end<=m.end){for(c.debug("SI: Segment pushed updates end of previous one",d,o,s,h.start,h.end),this._inventory.splice(g+1,0,m),h.end=m.start,h.bufferedEnd=void 0,h.precizeEnd=h.precizeEnd&&m.precizeStart,g+=2;gm.end){c.debug("SI: Segment pushed updates the start of the next one",d,m.end,l[g].start),l[g].start=m.end,l[g].bufferedStart=void 0,l[g].precizeStart=l[g].precizeStart&&m.precizeEnd;return}c.debug("SI: Segment pushed removes the next one",d,o,s,l[g].start,l[g].end),l.splice(g,1)}return}else{c.warn("SI: Segment pushed is contained in a previous one",d,o,s,h.start,h.end);let I={status:h.status,insertionTs:h.insertionTs,chunkSize:h.chunkSize,splitted:!0,start:m.end,end:h.end,precizeStart:h.precizeStart&&h.precizeEnd&&m.precizeEnd,precizeEnd:h.precizeEnd,bufferedStart:void 0,bufferedEnd:h.end,infos:h.infos};h.end=m.start,h.splitted=!0,h.bufferedEnd=void 0,h.precizeEnd=h.precizeEnd&&m.precizeStart,l.splice(g+1,0,m),l.splice(g+2,0,I);return}}let p=this._inventory[0];if(p===void 0){c.debug("SI: first segment pushed",d,o,s),this._inventory.push(m);return}if(p.start>=s)c.debug("SI: Segment pushed comes before all previous ones",d,o,s,p.start),this._inventory.splice(0,0,m);else if(p.end<=s){for(c.debug("SI: Segment pushed starts before and completely recovers the previous first one",d,o,s,p.start,p.end),this._inventory.splice(0,1,m);l.length>1&&l[1].startm.end){c.debug("SI: Segment pushed updates the start of the next one",d,m.end,l[1].start),l[1].start=m.end,l[1].bufferedStart=void 0,l[1].precizeStart=m.precizeEnd;return}c.debug("SI: Segment pushed removes the next one",d,o,s,l[1].start,l[1].end),l.splice(1,1)}return}else{c.debug("SI: Segment pushed start of the next one",d,o,s,p.start,p.end),p.start=s,p.bufferedStart=void 0,p.precizeStart=m.precizeEnd,this._inventory.splice(0,0,m);return}}completeSegment(e){if(e.segment.isInit)return;let t=this._inventory,r=[];for(let i=0;i0&&(a=!0,r.length===1&&(c.warn("SI: Completed Segment is splitted.",e.segment.id,e.segment.time,e.segment.end),r[0].splitted=!0));let o=i,s=t[i].chunkSize;for(i+=1;i0&&(this._inventory.splice(o+1,f),i-=f),this._inventory[o].status===0&&(this._inventory[o].status=1),this._inventory[o].chunkSize=s,this._inventory[o].end=d,this._inventory[o].bufferedEnd=l,this._inventory[o].splitted=a,r.push(this._inventory[o])}if(r.length===0)c.warn("SI: Completed Segment not found",e.segment.id,e.segment.time);else for(let i of r)i.bufferedStart!==void 0&&i.bufferedEnd!==void 0?i.status!==2&&this._bufferedHistory.addBufferedSegment(i.infos,{start:i.bufferedStart,end:i.bufferedEnd}):c.debug("SI: buffered range not known after sync. Skipping history.",i.start,i.end)}getInventory(){return this._inventory}getHistoryFor(e){return this._bufferedHistory.getHistoryFor(e)}};function sa(n){if(n.bufferedStart===void 0||n.status!==1)return!1;let{start:e,end:t}=n,r=t-e,{MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:i,MAX_MANIFEST_BUFFERED_DURATION_DIFFERENCE:a}=U.getCurrent();return Math.abs(e-n.bufferedStart)<=i&&(n.bufferedEnd===void 0||n.bufferedEnd>n.bufferedStart&&Math.abs(n.bufferedEnd-n.bufferedStart-r)<=Math.min(a,r/3))}function ps(n){if(n.bufferedEnd===void 0||!n.infos.segment.complete||n.status!==1)return!1;let{start:e,end:t}=n,r=t-e,{MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:i,MAX_MANIFEST_BUFFERED_DURATION_DIFFERENCE:a}=U.getCurrent();return Math.abs(t-n.bufferedEnd)<=i&&n.bufferedStart!==void 0&&n.bufferedEnd>n.bufferedStart&&Math.abs(n.bufferedEnd-n.bufferedStart-r)<=Math.min(a,r/3)}function el(n,e,t,r){let{MAX_MANIFEST_BUFFERED_START_END_DIFFERENCE:i,MISSING_DATA_TRIGGER_SYNC_DELAY:a,SEGMENT_SYNCHRONIZATION_DELAY:o}=U.getCurrent();if(n.bufferedStart!==void 0)n.bufferedStarte&&(t.precizeEnd||n.start-t.end<=i))c.debug("SI: buffered start is end of previous segment",r,e,n.start,t.end),n.bufferedStart=t.end,sa(n)&&(n.start=t.end,n.precizeStart=!0);else if(n.start-e<=i){let s=L();if(n.start-e>=a&&s-n.insertionTs=a&&s-n.insertionTse&&(c.debug("SI: Segment partially GCed at the end",t,n.bufferedEnd,e),n.bufferedEnd=e),!n.precizeEnd&&e-n.end<=r&&ps(n)&&(n.precizeEnd=!0,n.end=e);else if(n.precizeEnd)c.debug("SI: buffered end is precize end",t,n.end),n.bufferedEnd=n.end;else if(e-n.end<=r||!n.infos.segment.complete){let o=L();if(e-n.end>=i&&o-n.insertionTsn.end)c.debug("SI: range end too far from expected end",t,e,n.end),n.bufferedEnd=n.end;else{let o=L();if(e-n.end>=i&&o-n.insertionTs{var f;s+=` +[${u.letter}] P: ${u.periodId} || R: ${u.representationId}(${(f=u.bitrate)!=null?f:"unknown bitrate"})`}),s}function qt(n,e){for(let t=0;t=e.start)return t>0?n[t-1]:null;return n.length>0?n[n.length-1]:null}function Ht(n,e){for(let t of n)if(t.infos.period.start>e.start)return t;return null}var hs=Cn;var Gt=class{constructor(){this._segmentInventory=new hs}synchronizeInventory(e){this._segmentInventory.synchronizeBuffered(e)}getLastKnownInventory(){return this._segmentInventory.getInventory()}getSegmentHistory(e){return this._segmentInventory.getHistoryFor(e)}};var An=class extends Gt{constructor(e,t,r){super(),c.info("AVSB: calling `mediaSource.addSourceBuffer`",t);let i=r.addSourceBuffer(e,t);this.bufferType=e,this._sourceBuffer=i,this._lastInitSegmentUniqueId=null,this.codec=t,this._initSegmentsMap=new Map,this._pendingOperations=[]}declareInitSegment(e,t){Is(t),this._initSegmentsMap.set(e,t)}freeInitSegment(e){this._initSegmentsMap.delete(e)}async pushChunk(e){Is(e.data.chunk),c.debug("AVSB: receiving order to push data to the SourceBuffer",this.bufferType,yt(e.inventoryInfos));let t=this._getActualDataToPush(e.data);t.length===0&&t.push(new Uint8Array);let r=Promise.all(t.map(o=>{let{codec:s,timestampOffset:u,appendWindow:f}=e.data;return c.debug("AVSB: pushing segment",this.bufferType,yt(e.inventoryInfos)),this._sourceBuffer.appendBuffer(o,{codec:s,timestampOffset:u,appendWindow:f})}));this._addToOperationQueue(r,{type:0,value:e});let i;try{i=await r}catch(o){throw this._segmentInventory.insertChunk(e.inventoryInfos,!1,L()),o}e.inventoryInfos!==null&&this._segmentInventory.insertChunk(e.inventoryInfos,!0,L());let a=i[i.length-1];return this._segmentInventory.synchronizeBuffered(a),a}async removeBuffer(e,t){c.debug("AVSB: receiving order to remove data from the SourceBuffer",this.bufferType,e,t);let r=this._sourceBuffer.remove(e,t);this._addToOperationQueue(r,{type:1,value:{start:e,end:t}});let i=await r;return this._segmentInventory.synchronizeBuffered(i),i}async signalSegmentComplete(e){if(this._pendingOperations.length>0){let{promise:t}=this._pendingOperations[this._pendingOperations.length-1];this._addToOperationQueue(t,{type:2,value:e});try{await t}catch(r){}}this._segmentInventory.completeSegment(e)}getPendingOperations(){return this._pendingOperations.map(e=>e.operation)}dispose(){try{c.debug("AVSB: Calling `dispose` on the SourceBufferInterface"),this._sourceBuffer.dispose()}catch(e){c.debug(`AVSB: Failed to dispose a ${this.bufferType} SourceBufferInterface:`,e instanceof Error?e:"")}}_getActualDataToPush(e){let t=[];if(e.initSegmentUniqueId!==null&&!this._isLastInitSegment(e.initSegmentUniqueId)){let r=this._initSegmentsMap.get(e.initSegmentUniqueId);if(r===void 0)throw new Error("Invalid initialization segment uniqueId");let i=new ArrayBuffer(r.byteLength),a=new Uint8Array(i);a.set(r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer)),r=a,t.push(r),this._lastInitSegmentUniqueId=e.initSegmentUniqueId}return e.chunk!==null&&t.push(e.chunk),t}_isLastInitSegment(e){return this._lastInitSegmentUniqueId===null?!1:this._lastInitSegmentUniqueId===e}_addToOperationQueue(e,t){let r={operation:t,promise:e};this._pendingOperations.push(r);let i=()=>{let a=this._pendingOperations.indexOf(r);a>=0&&this._pendingOperations.splice(a,1)};e.then(i,i)}};function Is(n){if(b.CURRENT_ENV!==b.PRODUCTION&&(typeof n!="object"||n!==null&&!(n instanceof ArrayBuffer)&&!(n.buffer instanceof ArrayBuffer)))throw new Error("Invalid data given to the AudioVideoSegmentSink")}var Dr=An;function Mt(n,e){let t;return new Promise((r,i)=>{if(n.cancellationError!==null)return i(n.cancellationError);let a=!1;t=e(function(u){n.deregister(o),a=!0,r(u)},function(u){n.deregister(o),a=!0,i(u)}),a||n.register(o);function o(s){t!==void 0&&t(),i(s)}})}var kn=class extends Gt{constructor(e){c.debug("HTSB: Creating TextSegmentSink"),super(),this.bufferType="text",this._sender=e,this._pendingOperations=[],this._sender.reset()}declareInitSegment(e){c.warn("HTSB: Declaring initialization segment for Text SegmentSink",e)}freeInitSegment(e){c.warn("HTSB: Freeing initialization segment for Text SegmentSink",e)}async pushChunk(e){let{data:t}=e;rl(t.chunk);let r=this._sender.pushTextData(Me(ge({},t),{chunk:t.chunk}));this._addToOperationQueue(r,{type:0,value:e});let i=await r;return e.inventoryInfos!==null&&this._segmentInventory.insertChunk(e.inventoryInfos,!0,L()),this._segmentInventory.synchronizeBuffered(i),i}async removeBuffer(e,t){let r=this._sender.remove(e,t);this._addToOperationQueue(r,{type:1,value:{start:e,end:t}});let i=await r;return this._segmentInventory.synchronizeBuffered(i),i}async signalSegmentComplete(e){if(this._pendingOperations.length>0){let{promise:t}=this._pendingOperations[this._pendingOperations.length-1];this._addToOperationQueue(t,{type:2,value:e});try{await t}catch(r){}}this._segmentInventory.completeSegment(e)}getPendingOperations(){return this._pendingOperations.map(e=>e.operation)}dispose(){c.debug("HTSB: Disposing TextSegmentSink"),this._sender.reset()}_addToOperationQueue(e,t){let r={operation:t,promise:e};this._pendingOperations.push(r);let i=()=>{let a=this._pendingOperations.indexOf(r);a>=0&&this._pendingOperations.splice(a,1)};e.then(i,i)}};function rl(n){if(b.CURRENT_ENV!==b.PRODUCTION&&(typeof n!="object"||n===null||typeof n.data!="string"||typeof n.type!="string"||n.language!==void 0&&typeof n.language!="string"||n.start!==void 0&&typeof n.start!="number"||n.end!==void 0&&typeof n.end!="number"))throw new Error("Invalid format given to a TextSegmentSink")}b.CURRENT_ENV===b.DEV&&(il=function(e){function t(r){}});var il;var bs=kn;var al=["audio","video","text"],xn=class n{static isNative(e){return Ss(e)}constructor(e,t,r){this._mediaSource=e,this._textInterface=r,this._hasVideo=t,this._initializedSegmentSinks={},this._onNativeBufferAddedOrDisabled=[]}getBufferTypes(){let e=this.getNativeBufferTypes();return this._textInterface!==null&&e.push("text"),e}getNativeBufferTypes(){return this._hasVideo?["video","audio"]:["audio"]}getStatus(e){let t=this._initializedSegmentSinks[e];return t===void 0?{type:"uninitialized"}:t===null?{type:"disabled"}:{type:"initialized",value:t}}waitForUsableBuffers(e){return this._areNativeBuffersUsable()?Promise.resolve():Mt(e,t=>{let r,i=()=>{let a=this._onNativeBufferAddedOrDisabled.indexOf(r);a>=0&&this._onNativeBufferAddedOrDisabled.splice(a,1)};return r=()=>{this._areNativeBuffersUsable()&&(i(),t())},this._onNativeBufferAddedOrDisabled.push(r),i})}disableSegmentSink(e){let t=this._initializedSegmentSinks[e];if(t===null){c.warn(`SBS: The ${e} SegmentSink was already disabled.`);return}if(t!==void 0)throw new Error("Cannot disable an active SegmentSink.");this._initializedSegmentSinks[e]=null,n.isNative(e)&&this._onNativeBufferAddedOrDisabled.forEach(r=>r())}createSegmentSink(e,t){let r=this._initializedSegmentSinks[e];if(Ss(e)){if(!v(r))return r instanceof Dr&&r.codec!==t?c.warn("SB: Reusing native SegmentSink with codec",r.codec,"for codec",t):c.info("SB: Reusing native SegmentSink with codec",t),r;c.info("SB: Adding native SegmentSink with codec",t);let a=e==="audio"?"audio":"video",o=new Dr(a,t,this._mediaSource);return this._initializedSegmentSinks[e]=o,this._onNativeBufferAddedOrDisabled.forEach(s=>s()),o}if(!v(r))return c.info("SB: Reusing a previous custom SegmentSink for the type",e),r;let i;if(e==="text"){if(c.info("SB: Creating a new text SegmentSink"),this._textInterface===null)throw new Error("HTML Text track feature not activated");return i=new bs(this._textInterface),this._initializedSegmentSinks.text=i,i}throw c.error("SB: Unknown buffer type:",e),new Q("BUFFER_TYPE_UNKNOWN","The player wants to create a SegmentSink of an unknown type.")}disposeSegmentSink(e){let t=this._initializedSegmentSinks[e];if(v(t)){c.warn("SB: Trying to dispose a SegmentSink that does not exist");return}c.info("SB: Aborting SegmentSink",e),t.dispose(),delete this._initializedSegmentSinks[e]}disposeAll(){al.forEach(e=>{this.getStatus(e).type==="initialized"&&this.disposeSegmentSink(e)})}_areNativeBuffersUsable(){let e=this.getNativeBufferTypes();return!(e.some(i=>this._initializedSegmentSinks[i]===void 0)||e.every(i=>this._initializedSegmentSinks[i]===null))}createSegmentSinkMetricsForType(e){var t,r;return{bufferType:e,codec:(t=this._initializedSegmentSinks[e])==null?void 0:t.codec,segmentInventory:(r=this._initializedSegmentSinks[e])==null?void 0:r.getLastKnownInventory().map(i=>Me(ge({},i),{infos:ol(i.infos)}))}}getSegmentSinksMetrics(){return{segmentSinks:{audio:this.createSegmentSinkMetricsForType("audio"),video:this.createSegmentSinkMetricsForType("video"),text:this.createSegmentSinkMetricsForType("text")}}}};function Ss(n){return n==="audio"||n==="video"}function ol(n){return{adaptation:n.adaptation.getMetadataSnapshot(),period:n.period.getMetadataSnapshot(),representation:n.representation.getMetadataSnapshot()}}var bt=xn;function Mn(n,e){return Mt(e,t=>{let r=setTimeout(()=>t(),n);return()=>clearTimeout(r)})}var On=class extends oe{constructor(e,t,r,i){super(),this._content=e,this._currentCanceller=null,this._downloadQueue=t,this._initSegmentRequest=null,this._mediaSegmentRequest=null,this._segmentFetcher=r,this._initSegmentInfoRef=new j(void 0),this._mediaSegmentAwaitingInitMetadata=null,i||this._initSegmentInfoRef.setValue(null)}getRequestedInitSegment(){return this._initSegmentRequest===null?null:this._initSegmentRequest.segment}getRequestedMediaSegment(){return this._mediaSegmentRequest===null?null:this._mediaSegmentRequest.segment}start(){this._currentCanceller===null&&(this._currentCanceller=new W,this._downloadQueue.onUpdate(e=>{let{segmentQueue:t}=e;if(t.length>0&&t[0].segment.id===this._mediaSegmentAwaitingInitMetadata)return;let r=this._mediaSegmentRequest;if(t.length===0){if(r===null)return;c.debug("Stream: no more media segment to request. Cancelling queue.",this._content.adaptation.type),this._restartMediaSegmentDownloadingQueue();return}else if(r===null){c.debug("Stream: Media segments now need to be requested. Starting queue.",this._content.adaptation.type,t.length),this._restartMediaSegmentDownloadingQueue();return}else{let i=t[0];if(r.segment.id!==i.segment.id){c.debug("Stream: Next media segment changed, cancelling previous",this._content.adaptation.type),this._restartMediaSegmentDownloadingQueue();return}r.priority!==i.priority&&(c.debug("Stream: Priority of next media segment changed, updating",this._content.adaptation.type,r.priority,i.priority),this._segmentFetcher.updatePriority(r.request,i.priority));return}},{emitCurrentValue:!0,clearSignal:this._currentCanceller.signal}),this._downloadQueue.onUpdate(e=>{var r;let t=this._initSegmentRequest;if(e.initSegment!==null&&t!==null){e.initSegment.priority!==t.priority&&this._segmentFetcher.updatePriority(t.request,e.initSegment.priority);return}else if(((r=e.initSegment)==null?void 0:r.segment.id)===(t==null?void 0:t.segment.id))return;e.initSegment===null&&c.debug("Stream: no more init segment to request. Cancelling queue.",this._content.adaptation.type),this._restartInitSegmentDownloadingQueue(e.initSegment)},{emitCurrentValue:!0,clearSignal:this._currentCanceller.signal}))}stop(){var e;(e=this._currentCanceller)==null||e.cancel(),this._currentCanceller=null}_restartMediaSegmentDownloadingQueue(){this._mediaSegmentRequest!==null&&this._mediaSegmentRequest.canceller.cancel();let{segmentQueue:e}=this._downloadQueue.getValue(),t=e[0],r=i=>{if(this._currentCanceller!==null&&this._currentCanceller.isUsed()){this._mediaSegmentRequest=null;return}if(i===void 0){this._mediaSegmentRequest=null,this.trigger("emptyQueue",null);return}let a=new W,o=this._currentCanceller===null?D:a.linkToSignal(this._currentCanceller.signal),{segment:s,priority:u}=i,f=H({segment:s},this._content),d=!1,l=!1;a.signal.register(()=>{this._mediaSegmentRequest=null,!d&&(this._mediaSegmentAwaitingInitMetadata===s.id&&(this._mediaSegmentAwaitingInitMetadata=null),d=!0,l=!1)});let m=h=>{Ie(h.segmentType==="media","Should have loaded a media segment."),this.trigger("parsedMediaSegment",H({},h,{segment:s}))},p=()=>{let h=this._downloadQueue.getValue().segmentQueue;if(h.length===0){d=!0,this.trigger("emptyQueue",null);return}else h[0].segment.id===s.id&&h.shift();d=!0,r(h[0])},g=this._segmentFetcher.createRequest(f,u,{onRetry:h=>{this.trigger("requestRetry",{segment:s,error:h})},beforeInterrupted(){c.info("Stream: segment request interrupted temporarly.",s.id,s.time)},onChunk:h=>{let I=this._initSegmentInfoRef.getValue();I!==void 0?m(h(I!=null?I:void 0)):(l=!0,this._initSegmentInfoRef.waitUntilDefined(y=>{m(h(y!=null?y:void 0))},{clearSignal:a.signal}))},onAllChunksReceived:()=>{l?(this._mediaSegmentAwaitingInitMetadata=s.id,this._initSegmentInfoRef.waitUntilDefined(()=>{this._mediaSegmentAwaitingInitMetadata=null,l=!1,this.trigger("fullyLoadedSegment",s)},{clearSignal:a.signal})):this.trigger("fullyLoadedSegment",s)},beforeEnded:()=>{o(),this._mediaSegmentRequest=null,l?this._initSegmentInfoRef.waitUntilDefined(p,{clearSignal:a.signal}):p()}},a.signal);g.catch(h=>{o(),d||(d=!0,this.stop(),this.trigger("error",h))}),this._mediaSegmentRequest={segment:s,priority:u,request:g,canceller:a}};r(t)}_restartInitSegmentDownloadingQueue(e){if(this._currentCanceller!==null&&this._currentCanceller.isUsed()||(this._initSegmentRequest!==null&&this._initSegmentRequest.canceller.cancel(),e===null))return;let t=new W,r=this._currentCanceller===null?D:t.linkToSignal(this._currentCanceller.signal),{segment:i,priority:a}=e,o=H({segment:i},this._content),s=!1,u=this._segmentFetcher.createRequest(o,a,{onRetry:f=>{this.trigger("requestRetry",{segment:i,error:f})},beforeInterrupted:()=>{c.info("Stream: init segment request interrupted temporarly.",i.id)},beforeEnded:()=>{r(),this._initSegmentRequest=null,s=!0},onChunk:f=>{var l;let d=f(void 0);Ie(d.segmentType==="init","Should have loaded an init segment."),this.trigger("parsedInitSegment",H({},d,{segment:i})),d.segmentType==="init"&&this._initSegmentInfoRef.setValue((l=d.initTimescale)!=null?l:null)},onAllChunksReceived:()=>{this.trigger("fullyLoadedSegment",i)}},t.signal);u.catch(f=>{r(),s||(s=!0,this.stop(),this.trigger("error",f))}),t.signal.register(()=>{this._initSegmentRequest=null,!s&&(s=!0)}),this._initSegmentRequest={segment:i,priority:a,request:u,canceller:t}}};function ua(n,e,t,r,i){let{period:a,adaptation:o,representation:s}=n,u=sl(i,e);if(u===null){if(t===null){if(r&&a.end!==void 0&&e.end>=a.end)return{start:void 0,end:null};let l=s.index.checkDiscontinuity(e.start);if(l!==null)return{start:void 0,end:l}}return null}let f=i[u];if(f.bufferedStart!==void 0&&f.bufferedStart>e.start&&(t===null||f.infos.segment.end<=t)){let l=f.bufferedStart;return!r&&s.index.awaitSegmentBetween(e.start,l)!==!1?null:(c.debug("RS: current discontinuity encountered",o.type,f.bufferedStart),{start:void 0,end:l})}let d=ul(i,e,u+1);if(d!==null){let l=i[d-1],m=i[d];if(t===null||m.infos.segment.end<=t){if(!r&&s.index.awaitSegmentBetween(l.infos.segment.end,m.infos.segment.time)!==!1)return null;let p=l.bufferedEnd,g=m.bufferedStart;return c.debug("RS: future discontinuity encountered",o.type,p,g),{start:p,end:g}}}if(t===null){if(r&&a.end!==void 0){if(e.end=a.end)return null;for(let l=i.length-1;l>=0;l--){let m=i[l];if(m.bufferedStart===void 0)break;if(m.bufferedStart=e.end)return null;if(r.bufferedEnd>e.start)return t}return null}function ul(n,e,t){if(t<=0)return c.error("RS: Asked to check a discontinuity before the first chunk."),null;for(let r=t;r=e.end)return null;if(i.bufferedStart-a.bufferedEnd>0)return r}return null}function dl(n,e){for(let t=n.length-1;t>=0;t--){let r=n[t];if(r.bufferedStart===void 0)return null;if(r.bufferedStart!ys(C.infos,e,t,r)),p=Il(m,a,i),{MINIMUM_SEGMENT_SIZE:g,MIN_BUFFER_AHEAD:h}=U.getCurrent(),I=!1,y=Math.min(1/60,g),T=!1,P=[];return{segmentsToLoad:l.filter(C=>{let R=H({segment:C},e);if(o.length>0&&o.some(w=>Ze(R,w)))return!1;let{duration:k,time:_,end:A}=C;if(C.isInit)return!0;if(I)return P.push(C),!1;if(C.complete&&k0&&o.some(w=>{if(w.period.id!==e.period.id||w.adaptation.id!==e.adaptation.id)return!1;let{segment:O}=w;if(O.time-y>_)return!1;if(O.complete){if(O.end+y_)return!1;return!ys(w,R,t,r)}))return!1;for(let N=0;N-y){if(B.complete){if(B.end-A>-y)return!1}else if(Math.abs(_-B.time)a.start+h))return I=!0,P.push(C),!1;let M=i(R);if(M.length>1){let N=M[M.length-1],w=M[M.length-2];if(N.buffered===null&&w.buffered===null)return c.warn("Stream: Segment GCed multiple times in a row, ignoring it.","If this happens a lot and lead to unpleasant experience, please check your device's available memory. If it's low when this message is emitted, you might want to update the RxPlayer's settings (`maxBufferAhead`, `maxVideoBufferSize` etc.) so less memory is used by regular media data buffering."+u.type,f.id,C.time),!1}for(let N=0;N_){let O=w.start>_+y||fl(p,N).end{let{bitrate:o}=a.representation,{duration:s}=a.segment;return i+o*s},0),n.reduce((i,a)=>a.chunkSize!==void 0?i-a.chunkSize*8:i,r)}function fl(n,e){let t=e+1,{MINIMUM_SEGMENT_SIZE:r}=U.getCurrent(),i=Math.min(1/60,r);for(;tn[t].start;)t++;return t--,n[t]}function ys(n,e,t,r){let{CONTENT_REPLACEMENT_PADDING:i}=U.getCurrent();if(n.period.id!==e.period.id)return!1;let{segment:a}=n;return a.timea}return rr}function cl(n,e,t){let{MAX_TIME_MISSING_FROM_COMPLETE_SEGMENT:r}=U.getCurrent();return n.bufferedStart===void 0||e!==null&&e.bufferedEnd!==void 0&&n.bufferedStart-e.bufferedEnd<.1?!1:tr?(c.info("Stream: The start of the wanted segment has been garbage collected",n.start,n.bufferedStart),!0):!1}function pl(n,e,t){let{MAX_TIME_MISSING_FROM_COMPLETE_SEGMENT:r}=U.getCurrent();return n.bufferedEnd===void 0||e!==null&&e.bufferedStart!==void 0&&e.bufferedStart-n.bufferedEnd<.1?!1:t>n.bufferedEnd&&n.end-n.bufferedEnd>r?(c.info("Stream: The end of the wanted segment has been garbage collected",n.end,n.bufferedEnd),!0):!1}function gl(n,e){var o,s;if(n.length<2)return!0;let r=(o=n[n.length-1].buffered)==null?void 0:o.start;if(e!==void 0&&r!==void 0&&e-r>.05)return!0;let a=(s=n[n.length-2].buffered)==null?void 0:s.start;return a===void 0||r===void 0?!0:Math.abs(a-r)>.01}function hl(n,e){var o,s;if(n.length<2)return!0;let r=(o=n[n.length-1].buffered)==null?void 0:o.end;if(e!==void 0&&r!==void 0&&r-e>.05)return!0;let a=(s=n[n.length-2].buffered)==null?void 0:s.end;return a===void 0||r===void 0?!0:Math.abs(a-r)>.01}function Il(n,e,t){return n.filter((r,i,a)=>{let o=i===0?null:a[i-1],s=i>=a.length-1?null:a[i+1],u=null;if(cl(r,o,e.start)){if(u=t(r.infos),gl(u,r.bufferedStart))return!1;c.debug("Stream: skipping segment gc-ed at the start",r.start,r.bufferedStart)}if(pl(r,s,e.end)){if(u=u!=null?u:t(r.infos),hl(u,r.bufferedEnd))return!1;c.debug("Stream: skipping segment gc-ed at the end",r.end,r.bufferedEnd)}return!0})}function wn(n,e){let t=n-e,{SEGMENT_PRIORITIES_STEPS:r}=U.getCurrent();for(let i=0;iM.type===2).map(M=>M.value),g=o.getLastKnownInventory(),h=t.getCurrentTime();h===void 0&&(h=t.getReference().getValue().position.getWanted());let I=o.getSegmentHistory.bind(o),{segmentsToLoad:y,segmentsOnHold:T,isBufferFull:P}=da({content:n,bufferedSegments:g,currentPlaybackTime:h,fastSwitchThreshold:r,getBufferedHistory:I,neededRange:l,segmentsBeingPushed:p,maxBufferSize:a}),E=y.map(M=>({priority:wn(M.time,d),segment:M})),C=s.index.isInitialized()&&!s.index.isStillAwaitingFutureSegments()&&l.hasReachedPeriodEnd&&E.length===0&&T.length===0,R=null;return p.length>0&&(R=Math.min(...p.map(M=>M.segment.time))),T.length>0&&(R=R!==null?Math.min(R,T[0].time):T[0].time),E.length>0&&(R=R!==null?Math.min(R,E[0].segment.time):E[0].segment.time),{imminentDiscontinuity:ua(n,l,R,C,g),hasFinishedLoading:C,neededSegments:E,isBufferFull:P,shouldRefreshManifest:m}}function bl(n,e,t){var l;let r,{manifest:i,period:a,representation:o}=n,s=o.index.getLastAvailablePosition(),u=o.index;!v(s)&&bt.isNative(n.adaptation.type)&&e>=s&&u.isInitialized()&&!u.isStillAwaitingFutureSegments()&&Sl(i,a,e)?r=s-1:r=e-.1;let f=r+t,d;return!o.index.isInitialized()||o.index.isStillAwaitingFutureSegments()||a.end===void 0?d=!1:s===void 0?d=f>=a.end:s===null?d=!0:d=f>=s,{start:Math.max(r,a.start),end:Math.min(f,(l=a.end)!=null?l:1/0),hasReachedPeriodEnd:d}}function Sl(n,e,t){var i;let r=n.getPeriodAfter(e);return e.containsTime(t,r)&&n.isLastPeriodKnown&&e.id===((i=n.periods[n.periods.length-1])==null?void 0:i.id)}function fa(n){return new Promise(e=>{setTimeout(e,n)})}async function Dn(n,e,t,r,i){try{return await e.pushChunk(t)}catch(a){if(i.isCancelled()&&a instanceof ie)throw a;if(!(a instanceof Ce)||!a.isBufferFull){let u=a instanceof Error?a.toString():"An unknown error happened when pushing content";throw new Q("BUFFER_APPEND_ERROR",u,{tracks:[dt(t.inventoryInfos.adaptation)]})}let{position:o}=n.getReference().getValue(),s=o.getWanted();try{c.warn("Stream: Running garbage collector");let u=Math.max(s-5,0),f=s+r.getValue()+12;if(await e.removeBuffer(0,u),await e.removeBuffer(f,Number.MAX_VALUE),await fa(200),i.cancellationError!==null)throw i.cancellationError;return await e.pushChunk(t)}catch(u){if(u instanceof ie)throw u;let f=u instanceof Error?u.toString():"Could not clean the buffer";throw new Q("BUFFER_FULL_ERROR",f,{tracks:[dt(t.inventoryInfos.adaptation)]})}}}async function ma({playbackObserver:n,content:e,initSegmentUniqueId:t,segment:r,segmentSink:i,bufferGoal:a},o){if(o.cancellationError!==null)throw o.cancellationError;let s=e.representation.getMimeTypeString(),u={initSegmentUniqueId:t,chunk:null,timestampOffset:0,appendWindow:[void 0,void 0],codec:s},f=H({segment:r,chunkSize:void 0,start:0,end:0},e),d=await Dn(n,i,{data:u,inventoryInfos:f},a,o);return{content:e,segment:r,buffered:d}}async function ca({playbackObserver:n,bufferGoal:e,content:t,initSegmentUniqueId:r,parsedSegment:i,segment:a,segmentSink:o},s){var R,k;if(i.chunkData===null)return null;if(s.cancellationError!==null)throw s.cancellationError;let{chunkData:u,chunkInfos:f,chunkOffset:d,chunkSize:l,appendWindow:m}=i,p=t.representation.getMimeTypeString(),{APPEND_WINDOW_SECURITIES:g}=U.getCurrent(),h=[m[0]!==void 0?Math.max(0,m[0]-g.START):void 0,m[1]!==void 0?m[1]+g.END:void 0],I={initSegmentUniqueId:r,chunk:u,timestampOffset:d,appendWindow:h,codec:p},y=(R=f==null?void 0:f.time)!=null?R:a.time,T=(k=f==null?void 0:f.duration)!=null?k:a.duration,P=y+T;h[0]!==void 0&&(y=Math.max(y,h[0])),h[1]!==void 0&&(P=Math.min(P,h[1]));let E=H({segment:a,chunkSize:l,start:y,end:P},t),C=await Dn(n,o,{data:I,inventoryInfos:E},e,s);return{content:t,segment:a,buffered:C}}function pa({content:n,options:e,playbackObserver:t,segmentSink:r,segmentFetcher:i,terminate:a},o,s){let{period:u,adaptation:f,representation:d}=n,{bufferGoal:l,maxBufferSize:m,drmSystemId:p,fastSwitchThreshold:g}=e,h=f.type,I=new W;I.linkToSignal(s);let y=new W;y.linkToSignal(I.signal);let T={segment:d.index.getInitSegment(),uniqueId:null,isLoaded:!1};I.signal.register(()=>{T.uniqueId!==null&&r.freeInitSegment(T.uniqueId)});let P=new j({initSegment:null,segmentQueue:[]},y.signal),E=T.segment!==null;E||(T.isLoaded=!0);let C=!1;if(p!==void 0){let x=d.getEncryptionData(p);if(x.length>0&&x.every(M=>M.keyIds!==void 0)&&(C=!0,o.encryptionDataEncountered(x.map(M=>H({content:n},M))),I.isUsed()))return}let R=new On(n,P,i,E);R.addEventListener("error",x=>{y.signal.isCancelled()||(I.cancel(),o.error(x))}),R.addEventListener("parsedInitSegment",_),R.addEventListener("parsedMediaSegment",_),R.addEventListener("emptyQueue",k),R.addEventListener("requestRetry",x=>{if(o.warning(x.error),y.signal.isCancelled())return;let M=x.segment,{index:N}=d;N.isSegmentStillAvailable(M)===!1?k():N.canBeOutOfSyncError(x.error,M)&&o.manifestMightBeOufOfSync()}),R.addEventListener("fullyLoadedSegment",x=>{r.signalSegmentComplete(H({segment:x},n)).catch(A)}),R.start(),y.signal.register(()=>{R.removeEventListener(),R.stop()}),t.listen(k,{includeLastObservation:!1,clearSignal:y.signal}),n.manifest.addEventListener("manifestUpdate",k,y.signal),l.onUpdate(k,{emitCurrentValue:!1,clearSignal:y.signal}),m.onUpdate(k,{emitCurrentValue:!1,clearSignal:y.signal}),a.onUpdate(k,{emitCurrentValue:!1,clearSignal:y.signal}),k();return;function k(){if(y.isUsed())return;let x=t.getReference().getValue(),M=x.position.getWanted(),N=la(n,M,t,g.getValue(),l.getValue(),m.getValue(),r),{neededSegments:w}=N,O=null;if(d.index.isInitialized()){if(w.length>0&&!T.isLoaded&&T.segment!==null){let q=w[0].priority;O={segment:T.segment,priority:q}}}else if(T.segment===null)c.warn("Stream: Uninitialized index without an initialization segment");else if(T.isLoaded)c.warn("Stream: Uninitialized index with an already loaded initialization segment");else{let q=x.position.getWanted();O={segment:T.segment,priority:wn(u.start,q)}}let B=a.getValue();if(B===null)P.setValue({initSegment:O,segmentQueue:w});else if(B.urgent){c.debug("Stream: Urgent switch, terminate now.",h),P.setValue({initSegment:null,segmentQueue:[]}),P.finish(),y.cancel(),o.terminating();return}else{let q=w[0],Y=R.getRequestedInitSegment(),G=R.getRequestedMediaSegment(),z=G===null||q===void 0||G.id!==q.segment.id?[]:[q],X=Y===null?null:O;if(P.setValue({initSegment:X,segmentQueue:z}),z.length===0&&X===null){c.debug("Stream: No request left, terminate",h),P.finish(),y.cancel(),o.terminating();return}}if(o.streamStatusUpdate({period:u,position:x.position.getWanted(),bufferType:h,imminentDiscontinuity:N.imminentDiscontinuity,isEmptyStream:!1,hasFinishedLoading:N.hasFinishedLoading,neededSegments:N.neededSegments}),y.signal.isCancelled())return;let{UPTO_CURRENT_POSITION_CLEANUP:V}=U.getCurrent();if(N.isBufferFull){let q=Math.max(0,M-V);q>0&&r.removeBuffer(0,q).catch(A)}N.shouldRefreshManifest&&o.needsManifestRefresh()}function _(x){if(!I.isUsed()){for(let M of x.protectionData)d.addProtectionData(M.initDataType,M.keyId,M.initData);if(!C){let M=d.getAllEncryptionData();if(M.length>0&&(o.encryptionDataEncountered(M.map(N=>H({content:n},N))),C=!0,I.isUsed()))return}if(x.segmentType==="init"){if(!d.index.isInitialized()&&x.segmentList!==void 0&&d.index.initialize(x.segmentList),T.isLoaded=!0,x.initializationData!==null){let M=d.uniqueId;T.uniqueId=M,r.declareInitSegment(M,x.initializationData),ma({playbackObserver:t,bufferGoal:l,content:n,initSegmentUniqueId:M,segment:x.segment,segmentData:x.initializationData,segmentSink:r},I.signal).then(N=>{N!==null&&o.addedSegment(N)}).catch(A)}k();return}else{let{inbandEvents:M,predictedSegments:N,needsManifestRefresh:w}=x;if(N!==void 0&&d.index.addPredictedSegments(N,x.segment),w===!0&&(o.needsManifestRefresh(),I.isUsed())||M!==void 0&&M.length>0&&(o.inbandEvent(M),I.isUsed()))return;let O=T.uniqueId;ca({playbackObserver:t,bufferGoal:l,content:n,initSegmentUniqueId:O,parsedSegment:x,segment:x.segment,segmentSink:r},I.signal).then(B=>{B!==null&&o.addedSegment(B)}).catch(A)}}}function A(x){I.isUsed()&&x instanceof ie||(I.cancel(),o.error(x))}}var _s=pa;function ga(n,e,t,r,i){var m,p,g,h;if(t.switchingMode==="lazy")return{type:"continue",value:void 0};let a=r.getLastKnownInventory(),o=[];for(let I of a)I.infos.period.id===n.id&&(I.infos.adaptation.id!==e.id||!se(t.representationIds,I.infos.representation.id))&&Vt(o,{start:(m=I.bufferedStart)!=null?m:I.start,end:(p=I.bufferedEnd)!=null?p:I.end});let s=r.getPendingOperations();for(let I of s)if(I.type===0){let y=I.value.inventoryInfos;if(y.period.id===n.id&&(y.adaptation.id!==e.id||!se(t.representationIds,y.representation.id))){let T=y.segment.time,P=T+y.segment.duration;Vt(o,{start:T,end:P})}}if(o.length===0)return{type:"continue",value:void 0};if(t.switchingMode==="reload"){let I=i.getReadyState();if(I===void 0||I>1)return{type:"needs-reload",value:void 0}}let u=t.switchingMode==="direct",f=[],d=qt(a,n);if(d!==null&&(d.bufferedEnd===void 0||n.start-d.bufferedEnd<1)&&f.push({start:0,end:n.start+1}),!u){let{ADAP_REP_SWITCH_BUFFER_PADDINGS:I}=U.getCurrent(),y=e.type,T=(g=I[y].before)!=null?g:0,P=(h=I[y].after)!=null?h:0,E=i.getCurrentTime();E===void 0&&(E=i.getReference().getValue().position.getPolled()),f.push({start:E-T,end:E+P})}if(n.end!==void 0){let I=Ht(a,n);I!==null&&(I.bufferedStart===void 0||I.bufferedStart-n.end<1)&&f.push({start:n.end-1,end:Number.MAX_VALUE})}let l=Mr(o,f);return l.length===0?{type:"continue",value:void 0}:u?{type:"flush-buffer",value:l}:{type:"clean-buffer",value:l}}function ha({playbackObserver:n,content:e,options:t,representationEstimator:r,segmentSink:i,segmentFetcherCreator:a,wantedBufferAhead:o,maxVideoBufferSize:s},u,f){let{manifest:d,period:l,adaptation:m}=e,p=new W;p.linkToSignal(f);let g=new Map,h=new j(null,p.signal),I,y=e.representations.getValue().representationIds,T=e.adaptation.representations.filter(w=>se(y,w.id)&&w.decipherable!==!1&&w.isSupported!==!1),P=new j(T,p.signal),{estimates:E,callbacks:C}=r({manifest:d,period:l,adaptation:m},h,P,n,p.signal),R=a.createSegmentFetcher(m.type,{onRequestBegin:C.requestBegin,onRequestEnd:C.requestEnd,onProgress:C.requestProgress,onMetrics:C.metrics}),k=new j(0);E.onUpdate(({bitrate:w,knownStableBitrate:O})=>{t.enableFastSwitching&&k.setValueIfChanged(O),!(w===void 0||w===I)&&(I=w,c.debug(`Stream: new ${m.type} bitrate estimate`,w),u.bitrateEstimateChange({type:m.type,bitrate:w}))},{emitCurrentValue:!0,clearSignal:p.signal});let _;e.representations.onUpdate(w=>{_!==void 0&&_.cancel();let O=e.representations.getValue().representationIds,B=e.adaptation.representations.filter(V=>se(O,V.id));P.setValueIfChanged(B),_=new W,_.linkToSignal(p.signal),A(w,_.signal).catch(V=>{(_==null?void 0:_.isUsed())===!0&&W.isCancellationError(V)||(p.cancel(),u.error(V))})},{clearSignal:p.signal,emitCurrentValue:!0});return;async function A(w,O){let B=ga(l,m,w,i,n);switch(B.type){case"continue":break;case"needs-reload":return kt(()=>{n.listen(()=>{if(O.isCancelled())return;let{DELTA_POSITION_AFTER_RELOAD:V}=U.getCurrent(),q=V.bitrateSwitch;return u.waitingMediaSourceReload({bufferType:m.type,period:l,timeOffset:q,stayInPeriod:!0})},{includeLastObservation:!0,clearSignal:O})});case"flush-buffer":case"clean-buffer":for(let V of B.value)if(await i.removeBuffer(V.start,V.end),O.isCancelled())return;if(B.type==="flush-buffer"&&(u.needsBufferFlush(),O.isCancelled()))return;break;default:We(B)}x(O)}function x(w){let O=new W;O.linkToSignal(w);let{representation:B}=E.getValue();if(B===null)return;let V=new j(null,O.signal);E.onUpdate(G=>{if(!(G.representation===null||G.representation.id===B.id))return G.urgent?(c.info("Stream: urgent Representation switch",m.type),V.setValue({urgent:!0})):(c.info("Stream: slow Representation switch",m.type),V.setValue({urgent:!1}))},{clearSignal:O.signal,emitCurrentValue:!0});let q={type:m.type,adaptation:m,period:l,representation:B};if(h.setValue(B),p.isUsed()||(u.representationChange(q),p.isUsed()))return;let Y={streamStatusUpdate:u.streamStatusUpdate,encryptionDataEncountered:u.encryptionDataEncountered,manifestMightBeOufOfSync:u.manifestMightBeOufOfSync,needsManifestRefresh:u.needsManifestRefresh,inbandEvent:u.inbandEvent,warning:u.warning,error(G){p.cancel(),u.error(G)},addedSegment(G){C.addedSegment(G)},terminating(){if(!O.isUsed())return O.cancel(),x(w)}};M(B,V,Y,w)}function M(w,O,B,V){let q=new W;q.linkToSignal(V);let Y=Xt(o,X=>X*N(w),q.signal),G=m.type==="video"?s:new j(1/0);c.info("Stream: changing representation",m.type,w.id,w.bitrate);let z=H({},B,{error(X){var me;let Z=he(X,{defaultCode:"NONE",defaultReason:"Unknown `RepresentationStream` error"});if(Z.code!=="BUFFER_FULL_ERROR")B.error(X);else{let ce=o.getValue(),be=((me=g.get(w.id))!=null?me:1)*.7;if(be<=.05||ce*be<=2)throw Z;g.set(w.id,be),Mn(4e3,p.signal).then(()=>M(w,O,B,V)).catch(D)}},terminating(){q.cancel(),B.terminating()}});_s({playbackObserver:n,content:{representation:w,adaptation:m,period:l,manifest:d},segmentSink:i,segmentFetcher:R,terminate:O,options:{bufferGoal:Y,maxBufferSize:G,drmSystemId:t.drmSystemId,fastSwitchThreshold:k}},z,V),d.addEventListener("manifestUpdate",X=>{for(let Z of X.updatedPeriods)if(Z.period.id===l.id){for(let me of Z.result.updatedAdaptations)if(me.adaptation===m.id){for(let ce of me.removedRepresentations)if(ce===w.id)return V.isCancelled()?void 0:u.waitingMediaSourceReload({bufferType:m.type,period:l,timeOffset:0,stayInPeriod:!0})}}else if(Z.period.start>l.start)break},V)}function N(w){let O=g.get(w.id),B=O!==void 0?O:1;return O===void 0&&g.set(w.id,B),B}}var Ts=ha;function yl(n,e){let[t,...r]=n.split(";"),[i,...a]=e.split(";");if(t!==i)return!1;let o=K(r,d=>Ue(d,"codecs=")),s=K(a,d=>Ue(d,"codecs="));if(o===void 0||s===void 0)return!1;let u=o.substring(7),f=s.substring(7);return u.split(".")[0]===f.split(".")[0]}var Es=yl;function Ia(n,e,t,r,i,a){var p,g,h,I;if(n.codec!==void 0&&a.onCodecSwitch==="reload"&&!_l(t,n.codec))return{type:"needs-reload",value:void 0};let o=n.getLastKnownInventory(),s=[];for(let y of o)y.infos.period.id===e.id&&y.infos.adaptation.id!==t.id&&Vt(s,{start:(p=y.bufferedStart)!=null?p:y.start,end:(g=y.bufferedEnd)!=null?g:y.end});let u=n.getPendingOperations();for(let y of u)if(y.type===0){let T=y.value.inventoryInfos;if(T.period.id===e.id&&T.adaptation.id!==t.id){let P=T.segment.time,E=P+T.segment.duration;Vt(s,{start:P,end:E})}}if(s.length===0)return{type:"continue",value:void 0};if(r==="reload"){let y=i.getReadyState();if(y===void 0||y>1)return{type:"needs-reload",value:void 0}}let f=r==="direct",d=[],l=qt(o,e);if(l!==null&&(l.bufferedEnd===void 0||e.start-l.bufferedEnd<1)&&d.push({start:0,end:e.start+1}),!f){let y=t.type,{ADAP_REP_SWITCH_BUFFER_PADDINGS:T}=U.getCurrent(),P=(h=T[y].before)!=null?h:0,E=(I=T[y].after)!=null?I:0,C=i.getCurrentTime();C===void 0&&(C=i.getReference().getValue().position.getPolled()),d.push({start:C-P,end:C+E})}if(e.end!==void 0){let y=Ht(o,e);y!==null&&(y.bufferedStart===void 0||y.bufferedStart-e.end<1)&&d.push({start:e.end-1,end:Number.MAX_VALUE})}let m=Mr(s,d);return m.length===0?{type:"continue",value:void 0}:f&&t.type!=="text"?{type:"flush-buffer",value:m}:{type:"clean-buffer",value:m}}function _l(n,e){return n.representations.some(t=>t.isSupported===!0&&t.decipherable!==!1&&Es(t.getMimeTypeString(),e))}function ba({bufferType:n,content:e,garbageCollectors:t,playbackObserver:r,representationEstimator:i,segmentFetcherCreator:a,segmentSinksStore:o,options:s,wantedBufferAhead:u,maxVideoBufferSize:f},d,l){let{manifest:m,period:p}=e,g=new j(void 0,l);if(d.periodStreamReady({type:n,manifest:m,period:p,adaptationRef:g}),l.isCancelled())return;let h,I=!0;g.onUpdate(P=>{(async()=>{var w;if(P===void 0)return;let E=new W;if(E.linkToSignal(l),h==null||h.cancel(),h=E,P===null){c.info(`Stream: Set no ${n} Adaptation. P:`,p.start);let O=o.getStatus(n);if(O.type==="initialized"){if(c.info(`Stream: Clearing previous ${n} SegmentSink`),bt.isNative(n))return T(0,!0,E.signal);{let B=(w=p.end)!=null?w:1/0;if(p.start>B)c.warn("Stream: Can't free buffer: period's start is after its end");else if(await O.value.removeBuffer(p.start,B),E.isUsed())return}}else if(O.type==="uninitialized"&&(o.disableSegmentSink(n),E.isUsed()))return;return d.adaptationChange({type:n,adaptation:null,period:p}),E.isUsed()?void 0:Rs(r,u,n,{period:p},d,E.signal)}let C=p.adaptations[n],R=K(C!=null?C:[],O=>O.id===P.adaptationId);if(R===void 0){h.cancel(),c.warn("Stream: Unfound chosen Adaptation choice",P.adaptationId);return}let{DELTA_POSITION_AFTER_RELOAD:k}=U.getCurrent(),_=!1,A;if(I)A=0;else if(P.relativeResumingPosition!==void 0)A=P.relativeResumingPosition;else switch(_=!0,n){case"audio":A=k.trackSwitch.audio;break;case"video":A=k.trackSwitch.video;break;default:A=k.trackSwitch.other;break}if(I=!1,bt.isNative(n)&&o.getStatus(n).type==="disabled")return T(A,!0,E.signal);m.addEventListener("manifestUpdate",O=>{for(let B of O.updatedPeriods)if(B.period.id===p.id){for(let V of B.result.removedAdaptations)if(V.id===R.id)return T(A,!0,E.signal)}else if(B.period.start>p.start)break},h.signal);let{representations:x}=P;if(c.info(`Stream: Updating ${n} adaptation`,`A: ${R.id}`,`P: ${p.start}`),d.adaptationChange({type:n,adaptation:R,period:p}),E.isUsed())return;let M=Tl(o,n,R),N=Ia(M,p,R,P.switchingMode,r,s);if(N.type==="needs-reload")return T(A,!0,E.signal);if(await o.waitForUsableBuffers(E.signal),!E.isUsed()){if(N.type==="flush-buffer"||N.type==="clean-buffer"){for(let{start:O,end:B}of N.value)if(await M.removeBuffer(O,B),E.isUsed())return;if(N.type==="flush-buffer"&&(d.needsBufferFlush({relativeResumingPosition:A,relativePosHasBeenDefaulted:_}),E.isUsed()))return}t.get(M)(E.signal),y(R,x,M,E.signal)}})().catch(E=>{E instanceof ie||(h==null||h.cancel(),d.error(E))})},{clearSignal:l,emitCurrentValue:!0});function y(P,E,C,R){let k=Rl(r,P.type);Ts({content:{manifest:m,period:p,adaptation:P,representations:E},options:s,playbackObserver:k,representationEstimator:i,segmentSink:C,segmentFetcherCreator:a,wantedBufferAhead:u,maxVideoBufferSize:f},Me(ge({},d),{error:_}),R);function _(A){if(!bt.isNative(n)){c.error(`Stream: ${n} Stream crashed. Aborting it.`,A instanceof Error?A:""),o.disposeSegmentSink(n);let x=he(A,{defaultCode:"NONE",defaultReason:"Unknown `AdaptationStream` error"});return d.warning(x),R.isCancelled()?void 0:Rs(r,u,n,{period:p},d,R)}c.error(`Stream: ${n} Stream crashed. Stopping playback.`,A instanceof Error?A:""),d.error(A)}}function T(P,E,C){kt(()=>{r.listen(()=>{C.isCancelled()||d.waitingMediaSourceReload({bufferType:n,period:p,timeOffset:P,stayInPeriod:E})},{includeLastObservation:!0,clearSignal:C})})}}function Tl(n,e,t){let r=n.getStatus(e);if(r.type==="initialized")return c.info("Stream: Reusing a previous SegmentSink for the type",e),r.value;let i=El(t);return n.createSegmentSink(e,i)}function El(n){let e=n.representations.filter(t=>t.isSupported===!0&&t.decipherable!==!1);if(e.length===0)throw new Q("NO_PLAYABLE_REPRESENTATION","No Representation in the chosen "+n.type+" Adaptation can be played",{tracks:[dt(n)]});return e[0].getMimeTypeString()}function Rl(n,e){return n.deriveReadOnlyObserver(function(r,i){let a=new j(o(),i);return r.onUpdate(s,{clearSignal:i,emitCurrentValue:!1}),a;function o(){let u=r.getValue(),f=u.buffered[e],d=f!==null?xr(f,u.position.getWanted()):0;return H({},u,{bufferGap:d,buffered:f})}function s(){a.setValue(o())}})}function Rs(n,e,t,r,i,a){let{period:o}=r,s=!1;e.onUpdate(u,{emitCurrentValue:!1,clearSignal:a}),n.listen(u,{includeLastObservation:!1,clearSignal:a}),u();function u(){let f=n.getReference().getValue(),d=e.getValue(),l=f.position.getWanted();o.end!==void 0&&l+d>=o.end&&(c.debug('Stream: full "empty" AdaptationStream',t),s=!0),i.streamStatusUpdate({period:o,bufferType:t,imminentDiscontinuity:null,position:l,isEmptyStream:!0,hasFinishedLoading:s,neededSegments:[]})}}var Ps=ba;function Nr(n,e){if(e.length===0)return[];let t=[],r=n.getLastKnownInventory();for(let i=0;ia.infos.period.id===s.period.id&&a.infos.adaptation.id===s.adaptation.id&&a.infos.representation.id===s.representation.id)){let{bufferedStart:s,bufferedEnd:u}=a;if(s===void 0||u===void 0)return c.warn("SO: No buffered start or end found from a segment."),[{start:0,end:Number.MAX_VALUE}];let f=t[t.length-1];f!==void 0&&f.end===s?f.end=u:t.push({start:s,end:u})}}return t}function Sa(n,e,t,r,i,a,o,s){let{manifest:u,initialPeriod:f}=n,{maxBufferAhead:d,maxBufferBehind:l,wantedBufferAhead:m,maxVideoBufferSize:p}=a,{MINIMUM_MAX_BUFFER_AHEAD:g,MAXIMUM_MAX_BUFFER_AHEAD:h,MAXIMUM_MAX_BUFFER_BEHIND:I}=U.getCurrent(),y=new Pn(E=>{var _,A;let{bufferType:C}=E,R=(_=I[C])!=null?_:1/0,k=(A=h[C])!=null?A:1/0;return x=>{Or({segmentSink:E,playbackObserver:e,maxBufferBehind:Xt(l,M=>Math.min(M,R),x),maxBufferAhead:Xt(d,M=>{var w;let N=Math.max(M,(w=g[C])!=null?w:0);return Math.min(N,k)},x)},x)}});for(let E of r.getBufferTypes())T(E,f);function T(E,C){let R=new xt((N,w)=>N.start-w.start),k=!1,_=new W;return _.linkToSignal(s),e.listen(({position:N})=>{var B;let w=N.getWanted();if(!k||!x(w))return;for(c.info("Stream: Destroying all PeriodStreams due to out of bounds situation",E,w),k=!1;R.length()>0;){let V=R.get(R.length()-1);R.removeElement(V),o.periodStreamCleared({type:E,manifest:u,period:V})}_.cancel(),_=new W,_.linkToSignal(s);let O=(B=u.getPeriodForTime(w))!=null?B:u.getNextPeriod(w);if(O===void 0){c.warn("Stream: The wanted position is not found in the Manifest."),k=!0;return}A(O)},{clearSignal:s,includeLastObservation:!0}),u.addEventListener("decipherabilityUpdate",N=>{s.isCancelled()||M(N).catch(w=>{s.isCancelled()||(_.cancel(),o.error(w))})},s),A(C);function A(N){let w=Me(ge({},o),{waitingMediaSourceReload(O){let B=R.head();B===void 0||B.id!==O.period.id?o.lockedStream({bufferType:O.bufferType,period:O.period}):o.needsMediaSourceReload({timeOffset:O.timeOffset,minimumPosition:O.stayInPeriod?O.period.start:void 0,maximumPosition:O.stayInPeriod?O.period.end:void 0})},periodStreamReady(O){k=!0,R.add(O.period),o.periodStreamReady(O)},periodStreamCleared(O){R.removeElement(O.period),o.periodStreamCleared(O)},error(O){_.cancel(),o.error(O)}});P(E,N,w,_.signal)}function x(N){let w=R.head(),O=R.last();return w===void 0||O===void 0?!0:w.start>N||(v(O.end)?1/0:O.end)z.adaptation.type===E);if(O.length===0||w.type!=="initialized"||O.every(z=>z.representation.decipherable===!0))return;let B=w.value,V=O.filter(z=>z.representation.decipherable===void 0),q=O.filter(z=>z.representation.decipherable===!1),Y=Nr(B,q),G=Nr(B,V);for(k=!1,c.info("Stream: Destroying all PeriodStreams for decipherability matters",E);R.length()>0;){let z=R.get(R.length()-1);R.removeElement(z),o.periodStreamCleared({type:E,manifest:u,period:z})}_.cancel(),_=new W,_.linkToSignal(s);for(let{start:z,end:X}of[...Y,...G]){if(s.isCancelled())return;if(z{if(s.isCancelled())return;let z=e.getReference().getValue();if(vs(z,Y)){if(o.needsDecipherabilityFlush(),s.isCancelled())return}else if(vs(z,G)&&(o.needsBufferFlush(),s.isCancelled()))return;let X=z.position.getWanted(),Z=u.getPeriodForTime(X);if(Z===void 0){o.error(new Q("MEDIA_TIME_NOT_FOUND","The wanted position is not found in the Manifest."));return}A(Z)})}}function P(E,C,R,k){c.info("Stream: Creating new Stream for",E,C.start);let _=null,A=new W;A.linkToSignal(k),e.listen(({position:O},B)=>{if(C.end!==void 0&&O.getWanted()>=C.end){let V=u.getPeriodAfter(C);if(C.containsTime(O.getWanted(),V))return;c.info("Stream: Destroying PeriodStream as the current playhead moved above it",E,C.start,O.getWanted(),C.end),B(),R.periodStreamCleared({type:E,manifest:u,period:C}),A.cancel()}},{clearSignal:k,includeLastObservation:!0});let x={bufferType:E,content:{manifest:u,period:C},garbageCollectors:y,maxVideoBufferSize:p,segmentFetcherCreator:i,segmentSinksStore:r,options:a,playbackObserver:e,representationEstimator:t,wantedBufferAhead:m},M=Me(ge({},R),{streamStatusUpdate(O){if(O.hasFinishedLoading){let B=u.getPeriodAfter(C);B!==null&&N(B)}else _!==null&&(c.info("Stream: Destroying next PeriodStream due to current one being active",E,_.period.start),R.periodStreamCleared({type:E,manifest:u,period:_.period}),_.canceller.cancel(),_=null);R.streamStatusUpdate(O)},error(O){_!==null&&(_.canceller.cancel(),_=null),A.cancel(),R.error(O)}});Ps(x,M,A.signal),w(A.signal);function N(O){if(_!==null){if(_.period.id===O.id)return;c.warn("Stream: Creating next `PeriodStream` while one was already created.",E,O.id,_.period.id),R.periodStreamCleared({type:E,manifest:u,period:_.period}),_.canceller.cancel()}let B=new W;B.linkToSignal(k),_={canceller:B,period:O},P(E,O,R,_.canceller.signal)}function w(O){u.addEventListener("manifestUpdate",B=>{for(let V of B.removedPeriods)if(V.id===C.id){if(u.periods.length>0&&u.periods[0].start<=V.start)return kt(()=>{if(!O.isCancelled())return o.needsMediaSourceReload({timeOffset:0,minimumPosition:void 0,maximumPosition:void 0})})}else if(V.start>C.start)break;if(B.addedPeriods.length>0&&_!==null){let V=u.getPeriodAfter(C);(V===null||_.period.id!==V.id)&&(c.warn("Stream: Destroying next PeriodStream due to new one being added",E,_.period.start),R.periodStreamCleared({type:E,manifest:u,period:_.period}),_.canceller.cancel(),_=null)}},O)}}}function vs(n,e){if(e.length===0)return!1;let t=n.position.getPolled();return n.speed>=0?e[e.length-1].end>=t-5:e[0].start<=t+5}var Cs=Sa;var As=Cs;var Nn=class extends oe{constructor(e,t,r){super(),this._canceller=new W,this._manifest=e,this._activeStreams=new Map,this._allBufferTypes=r,this._lastCurrentPeriodId=null;let i=new ya(e);this._maximumPositionCalculator=i;let a=this._canceller.signal;t.listen(({position:o})=>{let s=o.getWanted();if(si.getMaximumAvailablePosition()){let u=new Q("MEDIA_TIME_AFTER_MANIFEST","The current position is after the latest time announced in the Manifest.");this.trigger("warning",u)}},{includeLastObservation:!0,clearSignal:a}),e.addEventListener("manifestUpdate",()=>{this.trigger("endingPositionChange",this._getManifestEndTime()),!a.isCancelled()&&this._checkEndOfStream()},a)}getCurrentEndingTime(){return this._getManifestEndTime()}onAdaptationChange(e,t,r){if(this._manifest.isLastPeriodKnown){let i=this._manifest.periods[this._manifest.periods.length-1];if(t.id===(i==null?void 0:i.id)&&(e==="audio"||e==="video")){e==="audio"?this._maximumPositionCalculator.updateLastAudioAdaptation(r):this._maximumPositionCalculator.updateLastVideoAdaptation(r);let a=this._maximumPositionCalculator.getEndingPosition(),o=a!==void 0?{isEnd:!0,endingPosition:a}:{isEnd:!1,endingPosition:this._maximumPositionCalculator.getMaximumAvailablePosition()};this.trigger("endingPositionChange",o)}}this._canceller.isUsed()||r===null&&this._addActivelyLoadedPeriod(t,e)}onRepresentationChange(e,t){this._addActivelyLoadedPeriod(t,e)}onPeriodCleared(e,t){this._removeActivelyLoadedPeriod(t,e)}onLastSegmentFinishedLoading(e){let t=this._lazilyCreateActiveStreamInfo(e);t.hasFinishedLoadingLastPeriod||(t.hasFinishedLoadingLastPeriod=!0,this._checkEndOfStream())}onLastSegmentLoadingResume(e){let t=this._lazilyCreateActiveStreamInfo(e);t.hasFinishedLoadingLastPeriod&&(t.hasFinishedLoadingLastPeriod=!1,this._checkEndOfStream())}dispose(){this.removeEventListener(),this._canceller.cancel()}_addActivelyLoadedPeriod(e,t){let r=this._lazilyCreateActiveStreamInfo(t);r.activePeriods.has(e)||(r.activePeriods.add(e),this._checkCurrentPeriod())}_removeActivelyLoadedPeriod(e,t){let r=this._activeStreams.get(t);r!==void 0&&r.activePeriods.has(e)&&(r.activePeriods.removeElement(e),this._checkCurrentPeriod())}_checkCurrentPeriod(){if(this._allBufferTypes.length===0)return;let e=this._activeStreams.get(this._allBufferTypes[0]);if(e!==void 0)for(let t of e.activePeriods.toArray()){let r=!0;for(let i of this._allBufferTypes){let a=this._activeStreams.get(i);if(a===void 0)return;if(!a.activePeriods.toArray().some(u=>u.id===t.id)){r=!1;break}}if(r){this._lastCurrentPeriodId!==t.id&&(this._lastCurrentPeriodId=t.id,this.trigger("periodChange",t));return}}}_getManifestEndTime(){let e=this._maximumPositionCalculator.getEndingPosition();return e!==void 0?{isEnd:!0,endingPosition:e}:{isEnd:!1,endingPosition:this._maximumPositionCalculator.getMaximumAvailablePosition()}}_lazilyCreateActiveStreamInfo(e){let t=this._activeStreams.get(e);return t===void 0&&(t={activePeriods:new xt((r,i)=>r.start-i.start),hasFinishedLoadingLastPeriod:!1},this._activeStreams.set(e,t)),t}_checkEndOfStream(){if(!this._manifest.isLastPeriodKnown)return;this._allBufferTypes.every(t=>{let r=this._activeStreams.get(t);return r!==void 0&&r.hasFinishedLoadingLastPeriod})?this.trigger("endOfStream",null):this.trigger("resumeStream",null)}},ya=class{constructor(e){this._manifest=e,this._lastAudioAdaptation=void 0,this._lastVideoAdaptation=void 0}updateLastAudioAdaptation(e){this._lastAudioAdaptation=e}updateLastVideoAdaptation(e){this._lastVideoAdaptation=e}getMaximumAvailablePosition(){if(this._manifest.isDynamic)return this._manifest.getMaximumSafePosition();if(this._lastVideoAdaptation===void 0||this._lastAudioAdaptation===void 0)return this._manifest.getMaximumSafePosition();if(this._lastAudioAdaptation===null){if(this._lastVideoAdaptation===null)return this._manifest.getMaximumSafePosition();{let e=Br(this._lastVideoAdaptation);return typeof e!="number"?this._manifest.getMaximumSafePosition():e}}else if(this._lastVideoAdaptation===null){let e=Br(this._lastAudioAdaptation);return typeof e!="number"?this._manifest.getMaximumSafePosition():e}else{let e=Br(this._lastAudioAdaptation),t=Br(this._lastVideoAdaptation);return typeof e!="number"||typeof t!="number"?this._manifest.getMaximumSafePosition():Math.min(e,t)}}getEndingPosition(){var e,t;if(!this._manifest.isDynamic)return this.getMaximumAvailablePosition();if(!(this._lastVideoAdaptation===void 0||this._lastAudioAdaptation===void 0)){if(this._lastAudioAdaptation===null)return this._lastVideoAdaptation===null?void 0:(e=Ur(this._lastVideoAdaptation))!=null?e:void 0;if(this._lastVideoAdaptation===null)return(t=Ur(this._lastAudioAdaptation))!=null?t:void 0;{let r=Ur(this._lastAudioAdaptation),i=Ur(this._lastVideoAdaptation);return typeof r!="number"||typeof i!="number"?void 0:Math.min(r,i)}}}};function Br(n){let{representations:e}=n,t=null,r;for(let i of e)if(i.index!==r){r=i.index;let a=i.index.getLastAvailablePosition();if(a===void 0)return;a!==null&&(t=v(t)?a:Math.min(t,a))}return t}function Ur(n){let{representations:e}=n,t=null,r;for(let i=0;i{e.interruptDurationSetting()});let o=new Nn(n,t,r.getBufferTypes());a.register(()=>{o.dispose()}),o.addEventListener("warning",u=>i.onWarning(u)),o.addEventListener("periodChange",u=>i.onPeriodChanged(u)),o.addEventListener("endingPositionChange",u=>{e.setDuration(u.endingPosition,u.isEnd)}),o.addEventListener("endOfStream",()=>{c.debug("Init: end-of-stream order received."),e.maintainEndOfStream()}),o.addEventListener("resumeStream",()=>{e.stopEndOfStream()});let s=o.getCurrentEndingTime();return e.setDuration(s.endingPosition,s.isEnd),o}function Ta(n,e){let t={audio:null,video:null,text:null};if(e!==null&&(t.text=e.getBufferedRanges()),n===null)return t;let r=K(n.sourceBuffers,s=>s.type==="audio"),i=K(n.sourceBuffers,s=>s.type==="video"),a=r==null?void 0:r.getBuffered();a!==void 0&&(t.audio=a);let o=i==null?void 0:i.getBuffered();return o!==void 0&&(t.video=o),t}function Ea(n,e){if(typeof n.changeType=="function"){try{n.changeType(e)}catch(t){return c.warn("Could not call 'changeType' on the given SourceBuffer:",t instanceof Error?t:""),!1}return!0}return!1}var Pl=["","webkit","moz","ms"];function vl(n,e){let t=document.createElement(n.tagName),r="on"+e;return r in t?!0:(t.setAttribute(r,"return;"),typeof t[r]=="function")}function Cl(n,e){return e.filter(t=>vl(n,t))[0]}function Al(n,e){return n.reduce((t,r)=>t.concat((e===void 0?Pl:e).map(i=>i+r)),[])}function Te(n,e){let t,r=Al(n,e);return(i,a,o)=>{if(!o.isCancelled()){if(typeof HTMLElement!="undefined"&&i instanceof HTMLElement)if(typeof t=="undefined"&&(t=Cl(i,r)),J(t))i.addEventListener(t,a),o.register(()=>{t!==void 0&&i.removeEventListener(t,a)});else{b.CURRENT_ENV===b.DEV&&c.warn(`compat: element ${i.tagName} does not support any of these events: `+r.join(", "));return}r.forEach(s=>{let u=!1;typeof i.addEventListener=="function"?i.addEventListener(s,a):(u=!0,i["on"+s]=a),o.register(()=>{typeof i.removeEventListener=="function"&&i.removeEventListener(s,a),u&&delete i["on"+s]})})}}}var oD=Te(["loadedmetadata"]),sD=Te(["timeupdate"]),uD=Te(["addtrack"]),dD=Te(["removetrack"]),Kt=Te(["sourceopen","webkitsourceopen"]),Lr=Te(["sourceclose","webkitsourceclose"]),Fr=Te(["sourceended","webkitsourceended"]),ks=Te(["update"]),xs=Te(["removesourcebuffer"]),lD=Te(["keymessage","message"]),fD=Te(["keyadded","ready"]),mD=Te(["keyerror","error"]),cD=Te(["keystatuseschange"]),pD=Te(["seeking"]),gD=Te(["seeked"]),hD=Te(["ended"]);function kl(n){let e=[];for(let t=0;t{i.cancel(),Bn(n,e)},i.signal);xs(t,()=>{i.cancel(),Bn(n,e)},i.signal)}function Ms(n,e){let t=new W;t.linkToSignal(e),Kt(n,()=>{c.debug("Init: MediaSource re-opened while end-of-stream is active"),t.cancel(),t=new W,t.linkToSignal(e),Bn(n,t.signal)},e),Bn(n,t.signal)}var xl=!1,Ml=!1,Os=!1,Ol=!1,wl=!1,Dl=!1,Nl=!1,Bl=!1,Ul=!1,Ll=!1,Fl=!1,zl=!1,Wl=!1,Ra=!1,Vl=!1;(function(){var e,t,r;nr||(typeof Ee.MSInputMethodContext!="undefined"&&typeof document.documentMode!="undefined"?(Ml=!0,Os=!0):navigator.appName==="Microsoft Internet Explorer"||navigator.appName==="Netscape"&&/(Trident|Edge)\//.test(navigator.userAgent)?Os=!0:navigator.userAgent.toLowerCase().indexOf("edg/")!==-1?xl=!0:navigator.userAgent.toLowerCase().indexOf("firefox")!==-1?Ol=!0:typeof navigator.platform=="string"&&/iPad|iPhone|iPod/.test(navigator.platform)?Dl=!0:(Object.prototype.toString.call(Ee.HTMLElement).indexOf("Constructor")>=0||((t=(e=Ee.safari)==null?void 0:e.pushNotification)==null?void 0:t.toString())==="[object SafariRemoteNotification]"||/Safari\/(\d+)/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((r=navigator.vendor)==null?void 0:r.indexOf("Apple"))!==-1&&!/Chrome\/(\d+)/.test(navigator.userAgent)&&!/Chromium\/(\d+)/.test(navigator.userAgent))&&(wl=!0),/SamsungBrowser/.test(navigator.userAgent)&&(Nl=!0),navigator.userAgent.indexOf("PlayStation 4")!==-1?Wl=!0:navigator.userAgent.indexOf("PlayStation 5")!==-1?Ra=!0:/Tizen/.test(navigator.userAgent)?Bl=!0:/[Ww]eb[O0]S/.test(navigator.userAgent)?(Ul=!0,/[Ww]eb[O0]S.TV-2022/.test(navigator.userAgent)||/[Cc]hr[o0]me\/87/.test(navigator.userAgent)?Fl=!0:(/[Ww]eb[O0]S.TV-2021/.test(navigator.userAgent)||/[Cc]hr[o0]me\/79/.test(navigator.userAgent))&&(Ll=!0)):/[Pp]anasonic/.test(navigator.userAgent)?zl=!0:navigator.userAgent.indexOf("Xbox")!==-1&&(Vl=!0))})();function Pa(){return Ra}var ql=365*24*3600,Un=class{constructor(e){this._mediaSource=e,this._currentMediaSourceDurationUpdateCanceller=null}updateDuration(e,t){this._currentMediaSourceDurationUpdateCanceller!==null&&this._currentMediaSourceDurationUpdateCanceller.cancel(),this._currentMediaSourceDurationUpdateCanceller=new W;let r=this._mediaSource,i=this._currentMediaSourceDurationUpdateCanceller.signal,a=Kl(r,i),o=new W;o.linkToSignal(i),a.onUpdate(s,{emitCurrentValue:!0,clearSignal:i});function s(){if(o.cancel(),!a.getValue())return;o=new W,o.linkToSignal(i);let u=Gl(r.sourceBuffers,o.signal),f=new W;return f.linkToSignal(o.signal),u.onUpdate(d=>{f.cancel(),f=new W,f.linkToSignal(o.signal),!d&&Ds(r,e,t,f.signal)},{clearSignal:o.signal,emitCurrentValue:!0})}}stopUpdating(){this._currentMediaSourceDurationUpdateCanceller!==null&&(this._currentMediaSourceDurationUpdateCanceller.cancel(),this._currentMediaSourceDurationUpdateCanceller=null)}};function Hl(n,e,t){let r=e;t||(r=Pa()?1/0:ws(e));let i=0;for(let a=0;a0&&(i=Math.max(o.buffered.end(s-1)))}if(r===n.duration)return"success";if(i>r){if(i=.1){let s=Math.abs(n.duration-a);return o{a.removeEventListener("updatestart",r),a.removeEventListener("update",r)})}return t;function r(){for(let i=0;i{c.debug("Init: Reacting to MediaSource open in duration updater"),t.setValueIfChanged(!0)},e),Fr(n,()=>{c.debug("Init: Reacting to MediaSource ended in duration updater"),t.setValueIfChanged(!1)},e),Lr(n,()=>{c.debug("Init: Reacting to MediaSource close in duration updater"),t.setValueIfChanged(!1)},e),t}function Ds(n,e,t,r){if(Hl(n,e,t)==="success")return;let a=setTimeout(()=>{o(),Ds(n,e,t,r)},2e3),o=r.register(()=>{clearTimeout(a)})}function ws(n){return Math.max(Math.pow(2,32),n+ql)}var Ln=class extends oe{constructor(e){if(super(),this.id=e,this.sourceBuffers=[],this._canceller=new W,v(_t))throw new Q("MEDIA_SOURCE_NOT_SUPPORTED","No MediaSource Object was found in the current browser.");c.info("Init: Creating MediaSource");let t=new _t;this.readyState=t.readyState;let r=t.handle;this.handle=v(r)?{type:"media-source",value:t}:{type:"handle",value:r},this._mediaSource=t,this._durationUpdater=new Un(t),this._endOfStreamCanceller=null,Kt(t,()=>{this.readyState=t.readyState,this.trigger("mediaSourceOpen",null)},this._canceller.signal),Fr(t,()=>{this.readyState=t.readyState,this.trigger("mediaSourceEnded",null)},this._canceller.signal),Lr(t,()=>{this.readyState=t.readyState,this.trigger("mediaSourceClose",null)},this._canceller.signal)}addSourceBuffer(e,t){let r=this._mediaSource.addSourceBuffer(t),i=new va(e,t,r);return this.sourceBuffers.push(i),i}setDuration(e,t){this._durationUpdater.updateDuration(e,t)}interruptDurationSetting(){this._durationUpdater.stopUpdating()}maintainEndOfStream(){this._endOfStreamCanceller===null&&(this._endOfStreamCanceller=new W,this._endOfStreamCanceller.linkToSignal(this._canceller.signal),c.debug("Init: end-of-stream order received."),Ms(this._mediaSource,this._endOfStreamCanceller.signal))}stopEndOfStream(){this._endOfStreamCanceller!==null&&(c.debug("Init: resume-stream order received."),this._endOfStreamCanceller.cancel(),this._endOfStreamCanceller=null)}dispose(){this.sourceBuffers.forEach(e=>e.dispose()),this._canceller.cancel(),jl(this._mediaSource)}},va=class{constructor(e,t,r){this.type=e,this.codec=t,this._canceller=new W,this._sourceBuffer=r,this._operationQueue=[],this._currentOperations=[];let i=o=>{let s;o instanceof Error?s=o:o.error instanceof Error?s=o.error:s=new Error("Unknown SourceBuffer Error");let u=this._currentOperations;if(this._currentOperations=[],u.length===0)c.error("SBI: error for an unknown operation",s);else{let f=new Ce(s.name,s.message,s.name==="QuotaExceededError");for(let d of u)d.reject(f)}},a=()=>{let o=this._currentOperations;this._currentOperations=[];try{for(let s of o)s.resolve(oa(this._sourceBuffer.buffered))}catch(s){for(let u of o)s instanceof Error&&s.name==="InvalidStateError"?u.resolve([]):u.reject(s)}this._performNextOperation()};r.addEventListener("error",i),r.addEventListener("updateend",a),this._canceller.signal.register(()=>{r.removeEventListener("error",i),r.removeEventListener("updateend",a)})}appendBuffer(...e){return c.debug("SBI: receiving order to push data to the SourceBuffer",this.type),this._addToQueue({operationName:0,params:e})}remove(e,t){return c.debug("SBI: receiving order to remove data from the SourceBuffer",this.type,e,t),this._addToQueue({operationName:1,params:[e,t]})}getBuffered(){try{return oa(this._sourceBuffer.buffered)}catch(e){return c.error("Failed to get buffered time range of SourceBuffer",this.type,e instanceof Error?e:null),[]}}abort(){try{this._sourceBuffer.abort()}catch(e){c.debug("Init: Failed to abort SourceBuffer:",e instanceof Error?e:null)}this._emptyCurrentQueue()}dispose(){try{this._sourceBuffer.abort()}catch(e){}this._emptyCurrentQueue()}_emptyCurrentQueue(){let e=new ie;this._currentOperations.length>0&&(this._currentOperations.forEach(t=>{t.reject(e)}),this._currentOperations=[]),this._operationQueue.length>0&&(this._operationQueue.forEach(t=>{t.reject(e)}),this._operationQueue=[])}_addToQueue(e){return new Promise((t,r)=>{let i=this._operationQueue.length===0&&this._currentOperations.length===0,a=H({resolve:t,reject:r},e);this._operationQueue.push(a),i&&this._performNextOperation()})}_performNextOperation(){var t,r,i,a,o;if(this._currentOperations.length!==0||this._sourceBuffer.updating)return;let e=this._operationQueue.shift();if(e!==void 0)if(e.operationName===0){this._currentOperations=[{operationName:0,resolve:e.resolve,reject:e.reject}];let s=e.params[0],u=e.params[1],f=s;if(this._operationQueue.length>0&&this._operationQueue[0].operationName===0){let d;s instanceof ArrayBuffer?d=new Uint8Array(s):s instanceof Uint8Array?d=s:d=new Uint8Array(s.buffer);let l=[d];for(;((t=this._operationQueue[0])==null?void 0:t.operationName)===0;){let m=this._operationQueue[0],p=(r=u.appendWindow)!=null?r:[void 0,void 0],g=(i=m.params[1].appendWindow)!=null?i:[void 0,void 0],h=(a=u.timestampOffset)!=null?a:0,I=(o=m.params[1].timestampOffset)!=null?o:0;if(p[0]===g[0]&&p[1]===g[1]&&u.codec===m.params[1].codec&&h===I){let y=m.params[0],T;y instanceof ArrayBuffer?T=new Uint8Array(y):y instanceof Uint8Array?T=y:T=new Uint8Array(y.buffer),l.push(T),this._operationQueue.splice(0,1),this._currentOperations.push({operationName:0,resolve:m.resolve,reject:m.reject})}else break}l.length>1&&(c.info(`MMSI: Merging ${l.length} segments together for perf`,this.type),f=At(...l))}try{this._appendBufferNow(f,u)}catch(d){let l=d instanceof Error?new Ce(d.name,d.message,d.name==="QuotaExceededError"):new Ce("Error","Unknown SourceBuffer Error during appendBuffer",!1);this._currentOperations.forEach(m=>{m.reject(l)}),this._currentOperations=[]}}else{this._currentOperations=[e];let[s,u]=e.params;c.debug("SBI: removing data from SourceBuffer",this.type,s,u);try{this._sourceBuffer.remove(s,u)}catch(f){let d=f instanceof Error?new Ce(f.name,f.message,!1):new Ce("Error","Unknown SourceBuffer Error during remove",!1);e.reject(d),this._currentOperations=[]}}}_appendBufferNow(e,t){let r=this._sourceBuffer,{codec:i,timestampOffset:a,appendWindow:o=[]}=t;if(i!==void 0&&i!==this.codec&&(c.debug("SBI: updating codec",i),Ea(r,i)?this.codec=i:c.debug("SBI: could not update codec",i,this.codec)),a!==void 0&&r.timestampOffset!==a){let s=a;c.debug("SBI: updating timestampOffset",i,r.timestampOffset,s),r.timestampOffset=s}if(o[0]===void 0)r.appendWindowStart>0&&(c.debug("SBI: re-setting `appendWindowStart` to `0`"),r.appendWindowStart=0);else if(o[0]!==r.appendWindowStart){if(o[0]>=r.appendWindowEnd){let s=o[0]+1;c.debug("SBI: pre-updating `appendWindowEnd`",s),r.appendWindowEnd=s}c.debug("SBI: setting `appendWindowStart`",o[0]),r.appendWindowStart=o[0]}o[1]===void 0?r.appendWindowEnd!==1/0&&(c.debug("SBI: re-setting `appendWindowEnd` to `Infinity`"),r.appendWindowEnd=1/0):o[1]!==r.appendWindowEnd&&(c.debug("SBI: setting `appendWindowEnd`",o[1]),r.appendWindowEnd=o[1]),c.debug("SBI: pushing segment",this.type),r.appendBuffer(e)}};function jl(n){if(n.readyState!=="closed"){let{readyState:e,sourceBuffers:t}=n;for(let r=t.length-1;r>=0;r--){let i=t[r];try{if(e==="open"){c.info("Init: Aborting SourceBuffer before removing");try{i.abort()}catch(a){}}c.info("Init: Removing SourceBuffer from mediaSource"),n.removeSourceBuffer(i)}catch(a){}}t.length>0&&c.info("Init: Not all SourceBuffers could have been removed.")}}var Yl=Ae(),zr=Ae(),Ns=1/0,Fn=class extends oe{constructor(e,t,r){super(),this.id=e,this.sourceBuffers=[],this._canceller=new W,this.readyState="closed",this._messageSender=r;let i=Yl();this._messageSender({type:"create-media-source",contentId:t,mediaSourceId:i})}onMediaSourceReadyStateChanged(e){switch(e){case"closed":this.readyState="closed",this.trigger("mediaSourceClose",null);break;case"open":this.readyState="open",this.trigger("mediaSourceOpen",null);break;case"ended":this.readyState="ended",this.trigger("mediaSourceEnded",null);break}}addSourceBuffer(e,t){this._messageSender({type:"add-source-buffer",mediaSourceId:this.id,value:{sourceBufferType:e,codec:t}});let r=new Ca(e,t,this.id,this._messageSender);return this.sourceBuffers.push(r),r}setDuration(e,t){this._messageSender({type:"update-media-source-duration",mediaSourceId:this.id,value:{duration:e,isRealEndKnown:t}})}interruptDurationSetting(){this._messageSender({type:"stop-media-source-duration",mediaSourceId:this.id,value:null})}maintainEndOfStream(){this._messageSender({type:"end-of-stream",mediaSourceId:this.id,value:null})}stopEndOfStream(){this._messageSender({type:"stop-end-of-stream",mediaSourceId:this.id,value:null})}dispose(){this.sourceBuffers.forEach(e=>e.dispose()),this._canceller.cancel(),this._messageSender({type:"dispose-media-source",mediaSourceId:this.id,value:null})}},Ca=class{constructor(e,t,r,i){this.type=e,this.codec=t,this._canceller=new W,this._mediaSourceId=r,this._queuedOperations=[],this._pendingOperations=new Map,this._messageSender=i}onOperationSuccess(e,t){let r=this._pendingOperations.get(e);r===void 0?c.warn("SBI: unknown SourceBuffer operation succeeded"):(this._pendingOperations.delete(e),r.resolve(t)),this._performNextQueuedOperationIfItExists()}onOperationFailure(e,t){let r=t.errorName==="CancellationError"?new ie:new Ce(t.errorName,t.message,t.isBufferFull),i=this._pendingOperations.get(e);i===void 0?c.info("SBI: unknown SourceBuffer operation failed",r):(this._pendingOperations.delete(e),i.reject(r));let a=new ie;for(let o of this._queuedOperations)o.reject(a);this._queuedOperations=[]}appendBuffer(e,t){return new Promise((r,i)=>{if(this._queuedOperations.length>0||this._pendingOperations.size>=Ns){this._queuedOperations.push({operationName:0,params:[e,t],resolve:r,reject:i});return}try{let a;e instanceof ArrayBuffer?a=e:e.byteLength===e.buffer.byteLength?a=e.buffer:a=e.buffer.slice(e.byteOffset,e.byteLength+e.byteOffset);let o=zr();this._messageSender({type:"source-buffer-append",mediaSourceId:this._mediaSourceId,sourceBufferType:this.type,operationId:o,value:{data:a,params:t}},[a]),this._addOperationToQueue(o,r,i)}catch(a){i(a)}})}remove(e,t){return new Promise((r,i)=>{if(this._queuedOperations.length>0||this._pendingOperations.size>=Ns){this._queuedOperations.push({operationName:1,params:[e,t],resolve:r,reject:i});return}try{let a=zr();this._messageSender({type:"source-buffer-remove",mediaSourceId:this._mediaSourceId,sourceBufferType:this.type,operationId:a,value:{start:e,end:t}}),this._addOperationToQueue(a,r,i)}catch(a){i(a)}})}abort(){this._messageSender({type:"abort-source-buffer",mediaSourceId:this._mediaSourceId,sourceBufferType:this.type,value:null})}dispose(){this.abort(),this._canceller.cancel()}getBuffered(){}_addOperationToQueue(e,t,r){this._pendingOperations.set(e,{resolve:a,reject:o});let i=this._canceller.signal.register(s=>{this._pendingOperations.delete(e),r(s)});function a(s){i(),t(s)}function o(s){i(),r(s)}}_performNextQueuedOperationIfItExists(){let e=this._queuedOperations.shift();if(e!==void 0)try{if(e.operationName===0){let[t,r]=e.params,i;t instanceof ArrayBuffer?i=t:t.byteLength===t.buffer.byteLength?i=t.buffer:i=t.buffer.slice(t.byteOffset,t.byteLength+t.byteOffset);let a=zr();this._messageSender({type:"source-buffer-append",mediaSourceId:this._mediaSourceId,sourceBufferType:this.type,operationId:a,value:{data:i,params:r}},[i]),this._addOperationToQueue(a,e.resolve,e.reject)}else{let[t,r]=e.params,i=zr();this._messageSender({type:"source-buffer-remove",mediaSourceId:this._mediaSourceId,sourceBufferType:this.type,operationId:i,value:{start:t,end:r}}),this._addOperationToQueue(i,e.resolve,e.reject)}}catch(t){e.reject(t)}}};function Aa(n){let e=n.map(o=>Math.log(o/n[0])),t=e.map(o=>o-e[0]+1),r=(t[t.length-1]-1)/(n.length*2+10),i=1/r;return n.map((o,s)=>a(s));function a(o){if(o===0)return 0;let s=Math.min(Math.max(1,o),n.length-1);return n[s]===n[s-1]?a(o-1):i*(r+(n[s]*t[s-1]-n[s-1]*t[s])/(n[s]-n[s-1]))+4}}var Fe=class{constructor(e){this._alpha=Math.exp(Math.log(.5)/e),this._lastEstimate=0,this._totalWeight=0}addSample(e,t){let r=Math.pow(this._alpha,e),i=t*(1-r)+r*this._lastEstimate;isNaN(i)||(this._lastEstimate=i,this._totalWeight+=e)}getEstimate(){let e=1-Math.pow(this._alpha,this._totalWeight);return this._lastEstimate/e}};var zn=class{constructor(){this._currentRepresentationData=null,this._lastRepresentationWithGoodScore=null}addSample(e,t,r){let i=r/t,a=this._currentRepresentationData,o;a!==null&&a.representation.id===e.id?(o=a.ewma,a.ewma.addSample(t,i),a.loadedDuration+=r,a.loadedSegments++):(o=new Fe(5),o.addSample(t,i),this._currentRepresentationData={representation:e,ewma:o,loadedDuration:r,loadedSegments:0}),o.getEstimate()>1&&this._lastRepresentationWithGoodScore!==e&&(c.debug("ABR: New last stable representation",e.bitrate),this._lastRepresentationWithGoodScore=e)}getEstimate(e){if(this._currentRepresentationData===null||this._currentRepresentationData.representation.id!==e.id)return;let{ewma:t,loadedSegments:r,loadedDuration:i}=this._currentRepresentationData,a=t.getEstimate(),o=r>=5&&i>=10?1:0;return{score:a,confidenceLevel:o}}getLastStableRepresentation(){return this._lastRepresentationWithGoodScore}};var Bs=6e3,Ql=15e3,$l=3e3,Xl=1e3,Zl=9e3,Wn=class{constructor(e){this._levelsMap=Aa(e).map(t=>t+4),this._bitrates=e,this._lastUnsuitableQualityTimestamp=void 0,this._blockRaiseDelay=Bs,c.debug("ABR: Steps for buffer based chooser.",this._levelsMap.map((t,r)=>`bufferLevel: ${t}, bitrate: ${e[r]}`).join(" ,"))}onAddedSegment(e){let t=this._levelsMap,r=this._bitrates,{bufferGap:i,currentBitrate:a,currentScore:o,speed:s}=e;if(v(a)){this._currentEstimate=r[0];return}let u=-1;for(let g=0;ga)break}if(u<0||r.length!==t.length){c.info("ABR: Current Bitrate not found in the calculated levels"),this._currentEstimate=r[0];return}let f;o!==void 0&&(f=s===0?o.score:o.score/s);let d=isFinite(i)?i:0,l=L();if(dI===a);for(let I=h-1;I>=0;I--)if(d>=t[I]){this._currentEstimate=r[I];return}this._currentEstimate=r[0];return}if(this._lastUnsuitableQualityTimestamp!==void 0&&l-this._lastUnsuitableQualityTimestamp{for(let g=u+1;gm)return g})();if(p!==void 0){let g=t[p];if(i>=g){c.debug("ABR: Raising quality in BufferBasedChooser",r[p]),this._currentEstimate=r[p];return}}this._currentEstimate=a}getLastEstimate(){return this._currentEstimate}};function Jl(n,e){let t=-1;for(let o=0;o-1.2){t=o;break}if(u>e&&e-s.time>-1.2){t=o;break}}if(t<0)return[];let r=n[t],i=r.content.segment.time,a=[r];for(let o=t+1;o0?l.progress[l.progress.length-1]:void 0,h=Wr(l);if(g!==void 0&&h!==void 0){let C=Us(g,h);if((m-g.timestamp)/1e3<=C&&C-u/o>2500)return h}if(!l.content.segment.complete)return;let I=l.content.segment.duration,y=(m-l.requestTimestamp)/1e3,T=y<=(I*1.5+2)/o;if(v(t)||T)return;let P=I/y,E=t.bitrate*Math.min(.7,P);if(i===void 0||El.segment.duration>0&&l.segment.time+l.segment.duration>i);if(a===void 0)return!0;let o=L(),s=a.progress.length>0?a.progress[a.progress.length-1]:void 0,u=Wr(a);if(s===void 0||u===void 0)return!0;let f=Us(s,u);return(o-s.timestamp)/1e3>f*1.2?!0:f-r/n.speed>-1.5}var Vn=class{constructor(e,t){let{ABR_STARVATION_GAP:r,OUT_OF_STARVATION_GAP:i,ABR_STARVATION_FACTOR:a,ABR_REGULAR_FACTOR:o}=U.getCurrent();this._initialBitrate=e,this._inStarvationMode=!1,this._lowLatencyMode=t,t?this._config={starvationGap:r.LOW_LATENCY,outOfStarvationGap:i.LOW_LATENCY,starvationBitrateFactor:a.LOW_LATENCY,regularBitrateFactor:o.LOW_LATENCY}:this._config={starvationGap:r.DEFAULT,outOfStarvationGap:i.DEFAULT,starvationBitrateFactor:a.DEFAULT,regularBitrateFactor:o.DEFAULT}}getBandwidthEstimate(e,t,r,i,a){let o,s,u=this._config,{bufferGap:f,position:d,duration:l}=e,m=isFinite(f)?f:0,{ABR_STARVATION_DURATION_DELTA:p}=U.getCurrent();return isNaN(l)||m+d.getWanted()=u.outOfStarvationGap&&(c.info("ABR: exit starvation mode."),this._inStarvationMode=!1):this._inStarvationMode&&(c.info("ABR: exit starvation mode."),this._inStarvationMode=!1),this._inStarvationMode&&(s=ef(i,e,r,this._lowLatencyMode,a),s!==void 0&&(c.info("ABR: starvation mode emergency estimate:",s),t.reset(),o=v(r)?s:Math.min(s,r.bitrate))),v(o)&&(s=t.getEstimate(),s!==void 0?o=s*(this._inStarvationMode?u.starvationBitrateFactor:u.regularBitrateFactor):a!==void 0?o=a*(this._inStarvationMode?u.starvationBitrateFactor:u.regularBitrateFactor):o=this._initialBitrate),e.speed>1&&(o/=e.speed),{bandwidthEstimate:s,bitrateChosen:o}}isUrgent(e,t,r,i){return t===null?!0:e>=t.bitrate?!1:tf(i,r,this._lowLatencyMode)}};var qn=class{constructor(){this.bandwidth=void 0,this.representation=null,this.algorithmType=3}update(e,t,r){this.representation=e,this.bandwidth=t,this.algorithmType=r}};var Hn=class{constructor(e,t){this._scoreCalculator=e,this._lastAbrEstimate=t,this._consecutiveWrongGuesses=0,this._blockGuessesUntil=0,this._lastMaintanableBitrate=null}getGuess(e,t,r,i,a){let{bufferGap:o,speed:s}=t,u=this._lastAbrEstimate.representation;if(u===null)return null;if(i>u.bitrate)return this._lastAbrEstimate.algorithmType===2&&(this._lastAbrEstimate.representation!==null&&(this._lastMaintanableBitrate=this._lastAbrEstimate.representation.bitrate),this._consecutiveWrongGuesses=0),null;let f=this._scoreCalculator.getEstimate(r);if(this._lastAbrEstimate.algorithmType!==2){if(f===void 0)return null;if(this._canGuessHigher(o,s,f)){let l=Ls(e,r);if(l!==null)return l}return null}if(this._isLastGuessValidated(u,i,f)&&(c.debug("ABR: Guessed Representation validated",u.bitrate),this._lastMaintanableBitrate=u.bitrate,this._consecutiveWrongGuesses=0),r.id!==u.id)return u;if(this._shouldStopGuess(r,f,o,a))return this._consecutiveWrongGuesses++,this._blockGuessesUntil=L()+Math.min(this._consecutiveWrongGuesses*15e3,12e4),nf(e,r);if(f===void 0)return r;if(this._canGuessHigher(o,s,f)){let l=Ls(e,r);if(l!==null)return l}return r}_canGuessHigher(e,t,{score:r,confidenceLevel:i}){return isFinite(e)&&e>=2.5&&L()>this._blockGuessesUntil&&i===1&&r/t>1.01}_shouldStopGuess(e,t,r,i){if(t!==void 0&&t.score<1.01)return!0;if((t===void 0||t.score<1.2)&&r<.6)return!0;let a=i.filter(s=>s.content.representation.id===e.id),o=L();for(let s of a){let u=o-s.requestTimestamp;if(s.content.segment.isInit){if(u>1e3)return!0}else{if(u>s.content.segment.duration*1e3+200)return!0;{let f=Wr(s);if(f!==void 0&&f1.5?!0:t>=e.bitrate&&(this._lastMaintanableBitrate===null||this._lastMaintanableBitratei===e.id);if(r<0)return c.error("ABR: Current Representation not found."),null;for(;++re.bitrate)return n[r];return null}function nf(n,e){let t=ne(n,({id:r})=>r===e.id);if(t<0)return c.error("ABR: Current Representation not found."),null;for(;--t>=0;)if(n[t].bitratea.bitrate-o.bitrate);let t=n[0].bitrate,r=Math.max(e,t),i=ne(n,a=>a.bitrate>r);return i===-1?n:n.slice(0,i)}function xa(n,e){if(e.width===void 0||e.height===void 0)return n;let t=e.width*e.pixelRatio,r=e.height*e.pixelRatio,i=n.slice().sort((s,u)=>{var f,d;return((f=s.width)!=null?f:0)-((d=u.width)!=null?d:0)}),a=K(i,s=>typeof s.width=="number"&&s.width>=t&&typeof s.height=="number"&&s.height>=r);if(a===void 0)return n;let o=typeof a.width=="number"?a.width:0;return n.filter(s=>typeof s.width=="number"?s.width<=o:!0)}var Kn=class{constructor(){this._currentRequests={}}add(e){let{id:t,requestTimestamp:r,content:i}=e;this._currentRequests[t]={requestTimestamp:r,progress:[],content:i}}addProgress(e){let t=this._currentRequests[e.id];if(v(t)){if(b.CURRENT_ENV===b.DEV)throw new Error("ABR: progress for a request not added");c.warn("ABR: progress for a request not added");return}t.progress.push(e)}remove(e){if(v(this._currentRequests[e])){if(b.CURRENT_ENV===b.DEV)throw new Error("ABR: can't remove unknown request");c.warn("ABR: can't remove unknown request")}delete this._currentRequests[e]}getRequests(){return sr(this._currentRequests).filter(e=>!v(e)).sort((e,t)=>e.content.segment.time-t.content.segment.time)}};function Vr(n,e){let t=ne(n,r=>r.bitrate>e);return t===-1?n[n.length-1]:t===0?n[0]:n[t-1]}var Fs=new j(void 0);Fs.finish();var zs=new j(1/0);zs.finish();function Ma(n){let e={},{initialBitrates:t,throttlers:r,lowLatencyMode:i}=n;return function(s,u,f,d,l){var I,y,T;let{type:m}=s.adaptation,p=a(m),g=(I=t[m])!=null?I:0,h={limitResolution:(y=r.limitResolution[m])!=null?y:Fs,throttleBitrate:(T=r.throttleBitrate[m])!=null?T:zs};return rf({bandwidthEstimator:p,context:s,currentRepresentation:u,filters:h,initialBitrate:g,playbackObserver:d,representations:f,lowLatencyMode:i},l)};function a(o){let s=e[o];if(v(s)){c.debug("ABR: Creating new BandwidthEstimator for ",o);let u=new Gn;return e[o]=u,u}return s}}function rf({bandwidthEstimator:n,context:e,currentRepresentation:t,filters:r,initialBitrate:i,lowLatencyMode:a,playbackObserver:o,representations:s},u){let f=new zn,d=new Vn(i!=null?i:0,a),l=new Kn,m=D,p={metrics:T,requestBegin:P,requestProgress:E,requestEnd:C,addedSegment(R){m(R)}},g=new W;g.linkToSignal(u);let h=I(s.getValue(),g.signal);return s.onUpdate(y,{clearSignal:u}),{estimates:h,callbacks:p};function I(R,k){if(R.length<=1)return new j({bitrate:void 0,representation:R[0],urgent:!0,knownStableBitrate:void 0});let _=!1,A=R.sort((q,Y)=>q.bitrate-Y.bitrate),x=new Wn(A.map(q=>q.bitrate)),M=new qn,N=new Hn(f,M),w=o.getReference().getValue(),O=new j(V());return o.listen(q=>{w=q,B()},{includeLastObservation:!1,clearSignal:k}),m=function(q){if(w===null)return;let{position:Y,speed:G}=w,z=q.buffered,X=xr(z,Y.getWanted()),{representation:Z}=q.content,me=f.getEstimate(Z),ce=Z.bitrate,de={bufferGap:X,currentBitrate:ce,currentScore:me,speed:G};x.onAddedSegment(de),B()},k.register(()=>{m=D}),r.throttleBitrate.onUpdate(B,{clearSignal:k}),r.limitResolution.onUpdate(B,{clearSignal:k}),O;function B(){O.setValue(V())}function V(){let{bufferGap:q,position:Y,maximumPosition:G}=w,z=r.limitResolution.getValue(),X=r.throttleBitrate.getValue(),Z=t.getValue(),me=af(A,z,X),ce=l.getRequests(),{bandwidthEstimate:de,bitrateChosen:be}=d.getBandwidthEstimate(w,n,Z,ce,M.bandwidth),tr=f.getLastStableRepresentation(),pe=tr===null?void 0:tr.bitrate/(w.speed>0?w.speed:1),{ABR_ENTER_BUFFER_BASED_ALGO:Se,ABR_EXIT_BUFFER_BASED_ALGO:Yt}=U.getCurrent();_&&q<=Yt?_=!1:!_&&isFinite(q)&&q>=Se&&(_=!0);let Ge=Vr(me,be),xe=x.getLastEstimate(),Ot=Ge.bitrate,at=null;_&&xe!==void 0&&xe>Ot&&(at=Vr(me,xe),Ot=at.bitrate);let ot=null;return a&&Z!==null&&e.manifest.isDynamic&&G-Y.getWanted()<40&&(ot=N.getGuess(A,w,Z,Ot,ce)),ot!==null&&ot.bitrate>Ot?(c.debug("ABR: Choosing representation with guess-based estimation.",ot.bitrate,ot.id),M.update(ot,de,2),{bitrate:de,representation:ot,urgent:Z===null||ot.bitrate=500||n.status===404||n.status===415||n.status===412:n.type===St.TIMEOUT||n.type===St.ERROR_EVENT:n instanceof Ke?typeof n.canRetry=="boolean"?n.canRetry:n.xhr!==void 0?n.xhr.status>=500||n.xhr.status===404||n.xhr.status===415||n.xhr.status===412:!1:wt(n)&&n.code==="INTEGRITY_ERROR"}async function wa(n,e,t,r,i){if(i.cancellationError!==null)return Promise.reject(i.cancellationError);let{baseDelay:a,maxDelay:o,maxRetry:s,onRetry:u}=r;n!==null&&n.length===0&&c.warn("Fetchers: no CDN given to `scheduleRequestWithCdns`.");let f=new Map,d=l();if(d===void 0)throw new Error("No CDN to request");return m(d);function l(){if(n===null){let I=f.get(null);return I!==void 0&&I.isBlacklisted?void 0:null}else{if(e===null)return h(n);{let I=e.getCdnPreferenceForResource(n);return h(I)}}}async function m(I){try{return await t(I,i)}catch(y){if(W.isCancellationError(y))throw y;I!==null&&e!==null&&e.downgradeCdn(I);let T=f.get(I);if(T===void 0?(T={errorCounter:1,blockedUntil:void 0,isBlacklisted:!1},f.set(I,T)):T.errorCounter++,!of(y))return T.blockedUntil=void 0,T.isBlacklisted=!0,p(y);if(T.errorCounter>s)T.blockedUntil=void 0,T.isBlacklisted=!0;else{let P=T.errorCounter,E=Math.min(a*Math.pow(2,P-1),o),C=Oa(E);T.blockedUntil=L()+C}return p(y)}}async function p(I){let y=l();if(i.isCancelled())throw i.cancellationError;if(y===void 0)throw I;if(u(I),i.isCancelled())throw i.cancellationError;return g(y,I)}function g(I,y){let T=f.get(I);if(T===void 0||T.blockedUntil===void 0)return m(I);let P=L(),E=T.blockedUntil-P;if(E<=0)return m(I);let C=new W,R=C.linkToSignal(i);return new Promise((k,_)=>{e==null||e.addEventListener("priorityChange",()=>{let M=l();if(i.isCancelled())throw i.cancellationError;if(M===void 0)return x(y);M!==I&&(C.cancel(),g(M,y).then(A,x))},C.signal),Mn(E,C.signal).then(()=>m(I).then(A,x),D);function A(M){R(),k(M)}function x(M){R(),_(M)}})}function h(I){var T;if(f.size===0)return I[0];let y=L();return(T=I.filter(P=>{var E;return((E=f.get(P))==null?void 0:E.isBlacklisted)!==!0}).reduce((P,E)=>{var R;let C=(R=f.get(E))==null?void 0:R.blockedUntil;return C!==void 0&&C<=y&&(C=void 0),P===void 0?[E,C]:P[1]===void 0?P:C===void 0?[E,void 0]:Cr.parse({previousManifest:null,unsafeMode:!1})),e.then(r=>{this.trigger("manifestReady",r.manifest),this._canceller.isUsed()||this._recursivelyRefreshManifest(r.manifest,r)}).catch(r=>this._onFatalError(r))}updateContentUrls(e,t){var r;this._prioritizedContentUrl=(r=e==null?void 0:e[0])!=null?r:void 0,t&&this.scheduleManualRefresh({enablePartialRefresh:!1,delay:0,canUseUnsafeMode:!1})}async _fetchManifest(e){var u;let t=this._canceller.signal,r=this._settings,i=this._pipelines,a=e!=null?e:(u=this._manifestUrls)==null?void 0:u[0],o=this._getBackoffSetting(f=>{this.trigger("warning",it(f))});try{let f=await s(a);return{parse:d=>this._parseLoadedManifest(f,d,a)}}catch(f){throw it(f)}function s(f){let{loadManifest:d}=i,l=r.requestTimeout===void 0?U.getCurrent().DEFAULT_REQUEST_TIMEOUT:r.requestTimeout,m=r.connectionTimeout===void 0?U.getCurrent().DEFAULT_CONNECTION_TIMEOUT:r.connectionTimeout;return l<0&&(l=void 0),m<0&&(m=void 0),Da(()=>d(f,{timeout:l,connectionTimeout:m},t),o,t)}}parse(e,t,r){return this._parseLoadedManifest({responseData:e,size:void 0,requestDuration:void 0},t,r)}async _parseLoadedManifest(e,t,r){var h;let i=L(),a=this._canceller.signal,o=this.trigger.bind(this),{sendingTime:s,receivedTime:u}=e,f=this._getBackoffSetting(I=>{this.trigger("warning",it(I))}),d=r!=null?r:(h=this._manifestUrls)==null?void 0:h[0],l={externalClockOffset:t.externalClockOffset,unsafeMode:t.unsafeMode,previousManifest:t.previousManifest,originalUrl:d};try{let I=this._pipelines.parseManifest(e,l,p,a,m);if(sf(I)){let{manifest:y,warnings:T}=await I;return g(y,T)}else return g(I.manifest,I.warnings)}catch(I){throw he(I,{defaultCode:"PIPELINE_PARSE_ERROR",defaultReason:"Unknown error when parsing the Manifest"})}async function m(I){try{return await Da(I,f,a)}catch(y){throw it(y)}}function p(I){for(let y of I){if(a.isCancelled())return;let T=he(y,{defaultCode:"PIPELINE_PARSE_ERROR",defaultReason:"Unknown error when parsing the Manifest"});o("warning",T)}}function g(I,y){p(y);let T=L()-i;return c.info(`MF: Manifest parsed in ${T}ms`),{manifest:I,sendingTime:s,receivedTime:u,parsingTime:T}}}_getBackoffSetting(e){let{DEFAULT_MAX_MANIFEST_REQUEST_RETRY:t,INITIAL_BACKOFF_DELAY_BASE:r,MAX_BACKOFF_DELAY_BASE:i}=U.getCurrent(),{lowLatencyMode:a,maxRetry:o}=this._settings,s=a?r.LOW_LATENCY:r.REGULAR,u=a?i.LOW_LATENCY:i.REGULAR,f=o!=null?o:t;return{onRetry:e,baseDelay:s,maxDelay:u,maxRetry:f}}_recursivelyRefreshManifest(e,{sendingTime:t,parsingTime:r,updatingTime:i}){let{MAX_CONSECUTIVE_MANIFEST_PARSING_IN_UNSAFE_MODE:a,MIN_MANIFEST_PARSING_TIME_TO_ENTER_UNSAFE_MODE:o}=U.getCurrent(),s=r!==void 0?r+(i!=null?i:0):void 0,u=!1;this._consecutiveUnsafeMode>0?u=this._consecutiveUnsafeMode=o);let f=t===void 0?0:L()-t,d=Math.max(this._settings.minimumManifestUpdateInterval-f,0),l=new W;if(l.linkToSignal(this._canceller.signal),this.scheduleManualRefresh=m=>{let{enablePartialRefresh:p,delay:g,canUseUnsafeMode:h}=m,I=h&&u,y=t===void 0?0:L()-t,T=Math.max(this._settings.minimumManifestUpdateInterval-y,0),P=setTimeout(()=>{l.cancel(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:p,unsafeMode:I})},Math.max((g!=null?g:0)-y,T));l.signal.register(()=>{clearTimeout(P)})},e.expired!==null){let m=setTimeout(()=>{var p;(p=e.expired)==null||p.then(()=>{l.cancel(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:!1,unsafeMode:u})},D)},d);l.signal.register(()=>{clearTimeout(m)})}if(e.lifetime!==void 0&&e.lifetime>=0){let m=e.lifetime*1e3-f,p;s===void 0?p=m:e.lifetime<3&&s>=100?(p=Math.min(Math.max(3e3-f,Math.max(m,0)+s),m*6),c.info("MUS: Manifest update rythm is too frequent. Postponing next request.",m,p)):s>=e.lifetime*1e3/10?(p=Math.min(Math.max(m,0)+s,m*6),c.info("MUS: Manifest took too long to parse. Postponing next request",p,p)):p=m;let g=setTimeout(()=>{l.cancel(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:!1,unsafeMode:u})},Math.max(p,d));l.signal.register(()=>{clearTimeout(g)})}}_triggerNextManifestRefresh(e,{enablePartialRefresh:t,unsafeMode:r}){let i=e.updateUrl,a,o;this._prioritizedContentUrl!==null?(a=!0,o=this._prioritizedContentUrl,this._prioritizedContentUrl=null):(a=!t||i===void 0,o=a?e.getUrls()[0]:i);let s=e.clockOffset;r?(this._consecutiveUnsafeMode+=1,c.info('Init: Refreshing the Manifest in "unsafeMode" for the '+String(this._consecutiveUnsafeMode)+" consecutive time.")):this._consecutiveUnsafeMode>0&&(c.info('Init: Not parsing the Manifest in "unsafeMode" anymore after '+String(this._consecutiveUnsafeMode)+" consecutive times."),this._consecutiveUnsafeMode=0),!this._isRefreshPending&&(this._isRefreshPending=!0,this._fetchManifest(o).then(u=>u.parse({externalClockOffset:s,previousManifest:e,unsafeMode:r})).then(u=>{this._isRefreshPending=!1;let{manifest:f,sendingTime:d,parsingTime:l}=u,m=L();if(a)e.replace(f);else try{e.update(f)}catch(g){let h=g instanceof Error?g.message:"unknown error";c.warn(`MUS: Attempt to update Manifest failed: ${h}`,"Re-downloading the Manifest fully");let{FAILED_PARTIAL_UPDATE_MANIFEST_REFRESH_DELAY:I}=U.getCurrent(),y=d===void 0?0:L()-d,T=Math.max(this._settings.minimumManifestUpdateInterval-y,0),P=D,E=setTimeout(()=>{P(),this._triggerNextManifestRefresh(e,{enablePartialRefresh:!1,unsafeMode:!1})},Math.max(I-y,T));P=this._canceller.signal.register(()=>{clearTimeout(E)});return}let p=L()-m;this._recursivelyRefreshManifest(e,{sendingTime:d,parsingTime:l,updatingTime:p})}).catch(u=>{this._isRefreshPending=!1,this._onFatalError(u)}))}_onFatalError(e){this._canceller.isUsed()||(this.trigger("error",e),this.dispose())}};function sf(n){return n instanceof Promise}var Na=jn;var Yn=class extends oe{constructor(e){super(),this._downgradedCdnList={metadata:[],timeouts:[]},e.register(()=>{for(let t of this._downgradedCdnList.timeouts)clearTimeout(t);this._downgradedCdnList={metadata:[],timeouts:[]}})}getCdnPreferenceForResource(e){return e.length<=1?e:this._innerGetCdnPreferenceForResource(e)}downgradeCdn(e){let t=Vs(this._downgradedCdnList.metadata,e);t>=0&&this._removeIndexFromDowngradeList(t);let{DEFAULT_CDN_DOWNGRADE_TIME:r}=U.getCurrent(),i=r;this._downgradedCdnList.metadata.push(e);let a=setTimeout(()=>{let o=Vs(this._downgradedCdnList.metadata,e);o>=0&&this._removeIndexFromDowngradeList(o),this.trigger("priorityChange",null)},i);this._downgradedCdnList.timeouts.push(a),this.trigger("priorityChange",null)}_innerGetCdnPreferenceForResource(e){let[t,r]=e.reduce((i,a)=>(this._downgradedCdnList.metadata.some(o=>o.id===a.id&&o.baseUrl===a.baseUrl)?i[1].push(a):i[0].push(a),i),[[],[]]);return t.concat(r)}_removeIndexFromDowngradeList(e){this._downgradedCdnList.metadata.splice(e,1);let t=this._downgradedCdnList.timeouts.splice(e,1);clearTimeout(t[0])}};function Vs(n,e){return n.length===0?-1:e.id!==void 0?ne(n,t=>t.id===e.id):ne(n,t=>t.baseUrl===e.baseUrl)}function Ba(n,e){let t=new WeakMap;return{createRequest(r,i,a,o){let s=f=>e(r,a,f),u=n.create(s,i,a,o);return t.set(u,s),u},updatePriority(r,i){let a=t.get(r);if(a===void 0){c.warn("Fetchers: Cannot update the priority of a request: task not found.");return}n.updatePriority(a,i)}}}var Ua=class{constructor(){this._cache=new WeakMap}add({representation:e,segment:t},r){t.isInit&&this._cache.set(e,r)}get({representation:e,segment:t}){if(t.isInit){let r=this._cache.get(e);if(r!==void 0)return r}return null}},qs=Ua;var uf=Ae();function La(n,e,t,r,i){let a;i.connectionTimeout===void 0||i.connectionTimeout<0?a=void 0:a=i.connectionTimeout;let o={timeout:i.requestTimeout<0?void 0:i.requestTimeout,connectionTimeout:a},s=se(["audio","video"],n)?new qs:void 0,{loadSegment:u,parseSegment:f}=e;return async function(l,m,p){var q,Y,G;let{segment:g,adaptation:h,representation:I,manifest:y,period:T}=l,P=yt(l),E=uf(),C,R=[],k=0,_=!1,A={segment:g,type:h.type,language:h.language,isLive:y.isLive,periodStart:T.start,periodEnd:T.end,mimeType:I.mimeType,codecs:I.codecs[0],manifestPublishTime:y.publishTime},x={onProgress(z){var X;C===void 0&&z.totalSize!==void 0&&z.size0&&R.every(X=>X)&&(_=!0,(z=r.onMetrics)==null||z.call(r,{size:C.size,requestDuration:C.requestDuration,content:l,segmentDuration:k}))}}}function Hs({maxRetry:n,lowLatencyMode:e,requestTimeout:t,connectionTimeout:r}){let{DEFAULT_MAX_REQUESTS_RETRY_ON_ERROR:i,DEFAULT_REQUEST_TIMEOUT:a,DEFAULT_CONNECTION_TIMEOUT:o,INITIAL_BACKOFF_DELAY_BASE:s,MAX_BACKOFF_DELAY_BASE:u}=U.getCurrent();return{maxRetry:n!=null?n:i,baseDelay:e?s.LOW_LATENCY:s.REGULAR,maxDelay:e?u.LOW_LATENCY:u.REGULAR,requestTimeout:t===void 0?a:t,connectionTimeout:r===void 0?o:r}}var $n=class{constructor({prioritySteps:e}){if(this._minPendingPriority=null,this._waitingQueue=[],this._pendingTasks=[],this._prioritySteps=e,this._prioritySteps.high>=this._prioritySteps.low)throw new Error("TP: the max high level priority should be given a lowerpriority number than the min low priority.")}create(e,t,r,i){let a;return Mt(i,(o,s)=>(a={hasEnded:!1,priority:t,trigger:()=>{if(a.hasEnded)return;let f=()=>{p(),this._endTask(a)},d=g=>{r.beforeEnded(),f(),o(g)},l=g=>{f(),s(g)},m=new W,p=m.linkToSignal(i);a.interrupter=m,m.signal.register(()=>{a.interrupter=null,i.isCancelled()||r.beforeInterrupted()}),this._minPendingPriority=this._minPendingPriority===null?a.priority:Math.min(this._minPendingPriority,a.priority),this._pendingTasks.push(a),a.taskFn(m.signal).then(d).catch(g=>{!i.isCancelled()&&m.isUsed()&&g instanceof ie||l(g)})},taskFn:e,interrupter:null},this._canBeStartedNow(a)?(a.trigger(),this._isRunningHighPriorityTasks()&&this._interruptCancellableTasks()):this._waitingQueue.push(a),()=>this._endTask(a)))}_endTask(e){e.hasEnded=!0;let t=Qn(e.taskFn,this._waitingQueue);if(t>=0)this._waitingQueue.splice(t,1);else{let r=Qn(e.taskFn,this._pendingTasks);if(r<0)return;this._pendingTasks.splice(r,1),this._pendingTasks.length>0?this._minPendingPriority===e.priority&&(this._minPendingPriority=Math.min(...this._pendingTasks.map(i=>i.priority))):this._minPendingPriority=null,this._loopThroughWaitingQueue()}}updatePriority(e,t){let r=Qn(e,this._waitingQueue);if(r>=0){let s=this._waitingQueue[r];if(s.priority===t||(s.priority=t,!this._canBeStartedNow(s)))return;this._findAndRunWaitingQueueTask(r),this._isRunningHighPriorityTasks()&&this._interruptCancellableTasks();return}let i=Qn(e,this._pendingTasks);if(i<0){c.warn("TP: request to update the priority of a non-existent task");return}let a=this._pendingTasks[i];if(a.priority===t)return;let o=a.priority;a.priority=t,this._minPendingPriority===null||ts.priority)),this._loopThroughWaitingQueue()),this._isRunningHighPriorityTasks()&&this._interruptCancellableTasks()}_loopThroughWaitingQueue(){let e=this._waitingQueue.reduce((t,r)=>t===null||t>r.priority?r.priority:t,null);if(!(e===null||this._minPendingPriority!==null&&this._minPendingPriority=this._prioritySteps.low)return this._interruptPendingTask(t),this._interruptCancellableTasks()}}_findAndRunWaitingQueueTask(e){return e>=this._waitingQueue.length||e<0?(c.warn("TP : Tried to start a non existing task"),!1):(this._waitingQueue.splice(e,1)[0].trigger(),!0)}_interruptPendingTask(e){var r;let t=Qn(e.taskFn,this._pendingTasks);if(t<0){c.warn("TP: Interrupting a non-existent pending task. Aborting...");return}this._pendingTasks.splice(t,1),this._waitingQueue.push(e),this._pendingTasks.length===0?this._minPendingPriority=null:this._minPendingPriority===e.priority&&(this._minPendingPriority=Math.min(...this._pendingTasks.map(i=>i.priority))),(r=e.interrupter)==null||r.cancel()}_canBeStartedNow(e){return this._minPendingPriority===null||e.priority<=this._minPendingPriority}_isRunningHighPriorityTasks(){return this._minPendingPriority!==null&&this._minPendingPriority<=this._prioritySteps.high}};function Qn(n,e){return ne(e,t=>t.taskFn===n)}var Xn=class{constructor(e,t,r){let i=new Yn(r),{MIN_CANCELABLE_PRIORITY:a,MAX_HIGH_PRIORITY_LEVEL:o}=U.getCurrent();this._transport=e,this._prioritizer=new $n({prioritySteps:{high:o,low:a}}),this._cdnPrioritizer=i,this._backoffOptions=t}createSegmentFetcher(e,t){let r=Hs(this._backoffOptions),i=this._transport[e],a=La(e,i,this._cdnPrioritizer,t,r);return Ba(this._prioritizer,a)}};var Fa=Xn;var Zn=class{constructor(e){this._segmentSinksStore=e,this._currentFreezeTimestamp=null}needToReload(e){let{readyState:t,rebuffering:r,freezing:i}=e;if((e.bufferGap!==void 0&&isFinite(e.bufferGap)?e.bufferGap:0)<6||r===null&&i===null||t>1)return this._currentFreezeTimestamp=null,!1;let o=L();this._currentFreezeTimestamp===null&&(this._currentFreezeTimestamp=o);let s=r!==null&&o-r.timestamp>4e3,u=i!==null&&o-i.timestamp>4e3;if((s||u)&&L()-this._currentFreezeTimestamp>4e3){let f=this._segmentSinksStore.getStatus("audio"),d=this._segmentSinksStore.getStatus("video"),l=!0,m=!0;for(let p of[f,d])if(p.type==="initialized")for(let g of p.value.getLastKnownInventory()){let{representation:h}=g.infos;if(h.decipherable===!1)return c.warn("Init: we have undecipherable segments left in the buffer, reloading"),this._currentFreezeTimestamp=null,!0;h.contentProtections!==void 0&&(m=!1,h.decipherable!==!0&&(l=!1))}if(!m&&l)return c.warn("Init: we are frozen despite only having decipherable segments left in the buffer, reloading"),this._currentFreezeTimestamp=null,!0}return!1}};var{DEFAULT_WANTED_BUFFER_AHEAD:df,DEFAULT_MAX_VIDEO_BUFFER_SIZE:lf,DEFAULT_MAX_BUFFER_AHEAD:ff,DEFAULT_MAX_BUFFER_BEHIND:mf}=U.getCurrent(),za=new j(df),Wa=new j(lf),Va=new j(ff),qa=new j(mf),qr=new j({height:void 0,width:void 0,pixelRatio:1}),Hr=new j(1/0);function $(n,e){c.debug("<--- Sending to Main:",n.type),e===void 0?postMessage(n):postMessage(n,e)}function De(n){return he(n,{defaultCode:"NONE",defaultReason:"An unknown error stopped content playback."}).serialize()}var Jn=class{constructor(){this._refs=new Map}reset(){var e,t,r,i,a,o,s,u,f,d,l,m;for(let p of this._refs.keys())(t=(e=this._refs.get(p))==null?void 0:e.audio)==null||t.trackReference.finish(),(i=(r=this._refs.get(p))==null?void 0:r.audio)==null||i.representations.finish(),(o=(a=this._refs.get(p))==null?void 0:a.video)==null||o.trackReference.finish(),(u=(s=this._refs.get(p))==null?void 0:s.video)==null||u.representations.finish(),(d=(f=this._refs.get(p))==null?void 0:f.text)==null||d.trackReference.finish(),(m=(l=this._refs.get(p))==null?void 0:l.text)==null||m.representations.finish();this._refs=new Map}addTrackSetter(e,t,r){var s,u;let i=this._refs.get(e);i===void 0&&(i={},this._refs.set(e,i)),i[t]!==void 0&&(c.warn("WP: Track for periodId already declared",e,t),(s=i[t])==null||s.trackReference.finish(),(u=i[t])==null||u.representations.finish());let a=r.getValue(),o;v(a)?o=new j({representationIds:[],switchingMode:"lazy"}):(o=new j(a.representations.getValue()),r.setValue(H({},a,{representations:o}))),i[t]={trackReference:r,representations:o}}setTrack(e,t,r){var a;let i=(a=this._refs.get(e))==null?void 0:a[t];return i===void 0?(c.debug("WP: Setting track for inexistent periodId",e,t),!1):(v(r)?(i.representations=new j({representationIds:[],switchingMode:"lazy"}),i.trackReference.setValue(r)):(i.representations=new j(r.initialRepresentations),i.trackReference.setValue({adaptationId:r.adaptationId,switchingMode:r.switchingMode,representations:i.representations,relativeResumingPosition:r.relativeResumingPosition})),!0)}updateRepresentations(e,t,r,i){var s;let a=(s=this._refs.get(e))==null?void 0:s[r];if(a===void 0)return c.debug("WP: Setting track for inexistent periodId",e,r),!1;let o=a.trackReference.getValue();return v(o)||o.adaptationId!==t?(c.debug("WP: Desynchronized Adaptation id",o==null?void 0:o.adaptationId,t),!1):(a.representations.setValue(i),!0)}removeTrackSetter(e,t){let r=this._refs.get(e),i=r==null?void 0:r[t];return r===void 0||i===void 0?(c.debug("WP: Removing track setter for inexistent periodId",e,t),!1):(i.trackReference.finish(),i.representations.finish(),delete r[t],Object.keys(r).length===0&&this._refs.delete(e),!0)}};var er=class{constructor(e,t){this._contentId=e,this._messageSender=t,this._queues={pushTextData:[],remove:[]}}pushTextData(e){return new Promise((t,r)=>{this._messageSender({type:"push-text-data",contentId:this._contentId,value:e}),this._queues.pushTextData.push({resolve:t,reject:r})})}remove(e,t){return new Promise((r,i)=>{this._messageSender({type:"remove-text-data",contentId:this._contentId,value:{start:e,end:t}}),this._queues.remove.push({resolve:r,reject:i})})}reset(){this._messageSender({type:"reset-text-displayer",contentId:this._contentId,value:null}),this._resetCurrentQueue()}stop(){this._messageSender({type:"stop-text-displayer",contentId:this._contentId,value:null}),this._resetCurrentQueue()}_resetCurrentQueue(){let e=new ie;this._queues.pushTextData.forEach(t=>{t.reject(e)}),this._queues.remove.forEach(t=>{t.reject(e)})}onPushedTrackSuccess(e){let t=this._queues.pushTextData.shift();if(t===void 0){c.error("WMS: pushTextData success for inexistant operation");return}t.resolve(e)}onPushedTrackError(e){let t=this._queues.pushTextData.shift();if(t===void 0){c.error("WMS: pushTextData error for inexistant operation");return}t.reject(e)}onRemoveSuccess(e){let t=this._queues.remove.shift();if(t===void 0){c.error("WMS: remove success for inexistant operation");return}t.resolve(e)}onRemoveError(e){let t=this._queues.pushTextData.shift();if(t===void 0){c.error("WMS: pushTextData error for inexistant operation");return}t.reject(e)}};var Gs=Ae(),jt=class{constructor({hasMseInWorker:e,hasVideo:t}){this._currentContent=null,this._currentMediaSourceCanceller=new W,this._hasVideo=t,this._hasMseInWorker=e;let r=new W;this._contentCanceller=r}initializeNewContent(e){return new Promise((t,r)=>{var k,_;this.disposeCurrentContent();let i=this._contentCanceller,a=new W;this._currentMediaSourceCanceller=a,a.linkToSignal(i.signal);let{contentId:o,url:s,hasText:u,transportOptions:f}=e,d=null;Ie(ae.transports.dash!==void 0,"Multithread RxPlayer should have access to the DASH feature");let l=typeof f.representationFilter=="string"?uo(f.representationFilter):void 0,m=ae.transports.dash(Me(ge({},f),{representationFilter:l})),p=new Na(s===void 0?void 0:[s],m,e.manifestRetryOptions),g=Ws({initialBitrates:{audio:(k=e.initialAudioBitrate)!=null?k:0,video:(_=e.initialVideoBitrate)!=null?_:0},lowLatencyMode:f.lowLatencyMode,throttlers:{limitResolution:{video:qr},throttleBitrate:{video:Hr}}}),h=a.signal.register(A=>{r(A)}),I=new Fa(m,e.segmentRetryOptions,i.signal),y=new Jn,[T,P,E]=Ks(o,{hasMseInWorker:this._hasMseInWorker,hasVideo:this._hasVideo,hasText:u},a.signal),C=new Zn(P);this._currentContent={contentId:o,decipherabilityFreezeDetector:C,mediaSource:T,manifest:null,manifestFetcher:p,representationEstimator:g,segmentSinksStore:P,segmentFetcherCreator:I,workerTextSender:E,trackChoiceSetter:y},T.addEventListener("mediaSourceOpen",function(){R()},a.signal),i.signal.register(()=>{p.dispose()}),p.addEventListener("warning",A=>{$({type:"warning",contentId:o,value:De(A)})},i.signal),p.addEventListener("manifestReady",A=>{if(d!==null){c.warn("WP: Multiple `manifestReady` events, ignoring");return}d=A,this._currentContent!==null&&(this._currentContent.manifest=d),R()},a.signal),p.addEventListener("error",A=>{r(A)},i.signal),p.start();function R(){if(d===null||T.readyState==="closed"||a.isUsed())return;let A=d.getMetadataSnapshot();d.addEventListener("manifestUpdate",x=>{if(d===null)return;let M=H(d.getMetadataSnapshot(),{periods:[]});$({type:"manifest-update",contentId:o,value:{manifest:M,updates:x}})},i.signal),h(),t(A)}})}getCurrentContent(){return this._currentContent}scheduleManifestRefresh(e){var t;(t=this._currentContent)==null||t.manifestFetcher.scheduleManualRefresh(e)}reloadMediaSource(e){if(this._currentMediaSourceCanceller.cancel(),this._currentContent===null)return Promise.reject(new Error("CP: No content anymore"));this._currentContent.trackChoiceSetter.reset(),this._currentMediaSourceCanceller=new W,$({type:"reloading-media-source",contentId:this._currentContent.contentId,value:e},[]);let[t,r,i]=Ks(this._currentContent.contentId,{hasMseInWorker:this._hasMseInWorker,hasVideo:this._hasVideo,hasText:this._currentContent.workerTextSender!==null},this._currentMediaSourceCanceller.signal);return this._currentContent.mediaSource=t,this._currentContent.segmentSinksStore=r,this._currentContent.workerTextSender=i,new Promise((a,o)=>{t.addEventListener("mediaSourceOpen",function(){a()},this._currentMediaSourceCanceller.signal),t.addEventListener("mediaSourceClose",function(){o(new Error("MediaSource ReadyState changed to close during init."))},this._currentMediaSourceCanceller.signal),this._currentMediaSourceCanceller.signal.register(s=>{o(s)})})}disposeCurrentContent(){this._contentCanceller.cancel(),this._contentCanceller=new W}};function Ks(n,e,t){let r;if(e.hasMseInWorker){let s=new Ln(Gs());r=s;let u,f=s.handle;if(f.type==="handle")u={type:"handle",value:f.value};else{let d=URL.createObjectURL(f.value);u={type:"url",value:d},t.register(()=>{URL.revokeObjectURL(d)})}$({type:"attach-media-source",contentId:n,value:u,mediaSourceId:r.id},[f.value])}else r=new Fn(Gs(),n,$);let i=e.hasText?new er(n,$):null,{hasVideo:a}=e,o=new bt(r,a,i);return t.register(()=>{o.disposeAll(),i==null||i.stop(),r.dispose()}),[r,o,i]}function Ha(){let n=!1,e=new jt({hasMseInWorker:!1,hasVideo:!0}),t=null,r=new jo;ae.dashParsers.wasm=r,ae.dashParsers.fastJs=Do,ae.transports.dash=ss;let i=null;onmessage=function(a){var s,u,f;c.debug("Worker: received message",a.data.type);let o=a.data;switch(o.type){case"init":Ie(!n),n=!0,Ya(o.value),js(o.value.logLevel,o.value.sendBackLogs),o.value.dashWasmUrl!==void 0&&r.isCompatible()&&r.initialize({wasmUrl:o.value.dashWasmUrl}).catch(d=>{let l=d instanceof Error?d.toString():"Unknown Error";c.error("Worker: Could not initialize DASH_WASM parser",l)}),(!o.value.hasVideo||o.value.hasMseInWorker)&&(e.disposeCurrentContent(),e=new jt({hasMseInWorker:o.value.hasMseInWorker,hasVideo:o.value.hasVideo})),ae.codecSupportProber=o.value.hasMseInWorker?mo:co,$({type:"init-success",value:null});break;case"log-level-update":js(o.value.logLevel,o.value.sendBackLogs);break;case"prepare":cf(e,o.value);break;case"start":{let d=e.getCurrentContent();if(o.contentId!==(d==null?void 0:d.contentId))return;t!==null&&(t.cancel(),t=null);let l=new W,m=new j(H(o.value.initialObservation,{position:new Ct(...o.value.initialObservation.position)}));i=m,t=l,t.signal.register(()=>{m.finish()}),Ys(o.value,e,m,l.signal);break}case"observation":{let d=e.getCurrentContent();if(o.contentId!==(d==null?void 0:d.contentId))return;let l=o.value,{buffered:m}=l,p=Ta(d.mediaSource,null);p.audio!==null&&(m.audio=p.audio),p.video!==null&&(m.video=p.video),i==null||i.setValue(H(l,{position:new Ct(...o.value.position)}));break}case"ref-update":pf(o);break;case"stop":if(o.contentId!==((s=e.getCurrentContent())==null?void 0:s.contentId))return;e.disposeCurrentContent(),t!==null&&(t.cancel(),t=null);break;case"sb-success":{let d=e.getCurrentContent();if(o.mediaSourceId!==(d==null?void 0:d.mediaSource.id))return;let{sourceBuffers:l}=d.mediaSource,m=K(l,p=>p.type===o.sourceBufferType);if(m===void 0){c.info("WP: Success for an unknown SourceBuffer",o.sourceBufferType);return}if(m.onOperationSuccess===void 0){c.warn("WP: A SourceBufferInterface with MSE performed a cross-thread operation",o.sourceBufferType);return}m.onOperationSuccess(o.operationId,o.value.buffered);break}case"sb-error":{let d=e.getCurrentContent();if(o.mediaSourceId!==(d==null?void 0:d.mediaSource.id))return;let{sourceBuffers:l}=d.mediaSource,m=K(l,p=>p.type===o.sourceBufferType);if(m===void 0){c.info("WP: Error for an unknown SourceBuffer",o.sourceBufferType);return}if(m.onOperationFailure===void 0){c.warn("WP: A SourceBufferInterface with MSE performed a cross-thread operation",o.sourceBufferType);return}m.onOperationFailure(o.operationId,o.value);break}case"media-source-ready-state-change":{let d=e.getCurrentContent();if(o.mediaSourceId!==(d==null?void 0:d.mediaSource.id))return;if(d.mediaSource.onMediaSourceReadyStateChanged===void 0){c.warn("WP: A MediaSourceInterface with MSE performed a cross-thread operation");return}d.mediaSource.onMediaSourceReadyStateChanged(o.value);break}case"decipherability-update":{if(o.contentId!==((u=e.getCurrentContent())==null?void 0:u.contentId))return;let d=e.getCurrentContent();if(d===null||d.manifest===null)return;let l=o.value;d.manifest.updateRepresentationsDeciperability(m=>{for(let p of l)if(m.representation.uniqueId===p.representationUniqueId)return p.decipherable;return m.representation.decipherable});break}case"codec-support-update":{let d=e.getCurrentContent();if(d===null||d.manifest===null)return;if(typeof((f=ae.codecSupportProber)==null?void 0:f.updateCache)=="function")for(let{mimeType:l,codec:m,result:p}of o.value)ae.codecSupportProber.updateCache(l,m,p);try{let l=d.manifest.refreshCodecSupport(o.value);l!==null&&$({type:"warning",contentId:d.contentId,value:De(l)})}catch(l){$({type:"error",contentId:d.contentId,value:De(l)})}break}case"urls-update":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;d.manifestFetcher.updateContentUrls(o.value.urls,o.value.refreshNow);break}case"track-update":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;d.trackChoiceSetter.setTrack(o.value.periodId,o.value.bufferType,o.value.choice);break}case"rep-update":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;d.trackChoiceSetter.updateRepresentations(o.value.periodId,o.value.adaptationId,o.value.bufferType,o.value.choice);break}case"add-text-success":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;if(d.workerTextSender===null){c.error("WP: Added text track but text track aren't enabled");return}d.workerTextSender.onPushedTrackSuccess(o.value.ranges);break}case"push-text-error":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;if(d.workerTextSender===null){c.error("WP: Added text track but text track aren't enabled");return}d.workerTextSender.onPushedTrackError(new Error(o.value.message));break}case"remove-text-success":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;if(d.workerTextSender===null){c.error("WP: Removed text track but text track aren't enabled");return}d.workerTextSender.onRemoveSuccess(o.value.ranges);break}case"remove-text-error":{let d=e.getCurrentContent();if(d===null||d.contentId!==o.contentId)return;if(d.workerTextSender===null){c.error("WP: Removed text track but text track aren't enabled");return}d.workerTextSender.onRemoveError(new Error(o.value.message));break}case"pull-segment-sink-store-infos":{gf(e,o.value.messageId);break}default:We(o)}}}function cf(n,e){n.initializeNewContent(e).then(t=>{$({type:"manifest-ready",contentId:e.contentId,value:{manifest:t}})},t=>{$({type:"error",contentId:e.contentId,value:De(t)})})}function pf(n){switch(n.value.name){case"wantedBufferAhead":za.setValueIfChanged(n.value.newVal);break;case"maxVideoBufferSize":Wa.setValueIfChanged(n.value.newVal);break;case"maxBufferBehind":qa.setValueIfChanged(n.value.newVal);break;case"maxBufferAhead":Va.setValueIfChanged(n.value.newVal);break;case"limitVideoResolution":qr.setValueIfChanged(n.value.newVal);break;case"throttleVideoBitrate":Hr.setValueIfChanged(n.value.newVal);break;default:We(n.value)}}function Ys(n,e,t,r){var k;let i=new W;i.linkToSignal(r);let a=new Map,o=e.getCurrentContent();if(o===null||o.manifest===null){let _=new Re("NONE","Loading content when none is prepared");$({type:"error",contentId:void 0,value:De(_)});return}let{contentId:s,manifest:u,mediaSource:f,representationEstimator:d,segmentSinksStore:l,segmentFetcherCreator:m}=o,{drmSystemId:p,enableFastSwitching:g,initialTime:h,onCodecSwitch:I}=n;if(t.onUpdate(_=>{o.decipherabilityFreezeDetector.needToReload(_)&&R({timeOffset:0,minimumPosition:0,maximumPosition:1/0}),["video","audio","text"].forEach(A=>{var M;let x=l.getStatus(A);x.type==="initialized"&&x.value.synchronizeInventory((M=_.buffered[A])!=null?M:[])})}),((k=u.getPeriodForTime(h))!=null?k:u.getNextPeriod(h))===void 0){let _=new Q("MEDIA_STARTING_TIME_NOT_FOUND","Wanted starting time not found in the Manifest.");$({type:"error",contentId:s,value:De(_)});return}let T=new In(t,s,$,i.signal),P=_a(u,f,T,l,{onWarning:_=>$({type:"warning",contentId:s,value:De(_)}),onPeriodChanged:_=>{$({type:"active-period-changed",contentId:s,value:{periodId:_.id}})}},i.signal);As({initialPeriod:u.periods[0],manifest:u},T,d,l,m,{wantedBufferAhead:za,maxVideoBufferSize:Wa,maxBufferAhead:Va,maxBufferBehind:qa,drmSystemId:p,enableFastSwitching:g,onCodecSwitch:I},E(),i.signal);function E(){return{needsBufferFlush(_){$({type:"needs-buffer-flush",contentId:s,value:_})},streamStatusUpdate(_){C(_),u.isLastPeriodKnown&&_.period.id===u.periods[u.periods.length-1].id&&(_.hasFinishedLoading||_.isEmptyStream?P.onLastSegmentFinishedLoading(_.bufferType):P.onLastSegmentLoadingResume(_.bufferType))},needsManifestRefresh(){e.scheduleManifestRefresh({enablePartialRefresh:!0,canUseUnsafeMode:!0})},manifestMightBeOufOfSync(){let{OUT_OF_SYNC_MANIFEST_REFRESH_DELAY:_}=U.getCurrent();e.scheduleManifestRefresh({enablePartialRefresh:!1,canUseUnsafeMode:!1,delay:_})},lockedStream(_){$({type:"locked-stream",contentId:s,value:{periodId:_.period.id,bufferType:_.bufferType}})},adaptationChange(_){var A,x;P.onAdaptationChange(_.type,_.period,_.adaptation),!i.signal.isCancelled()&&$({type:"adaptation-changed",contentId:s,value:{adaptationId:(x=(A=_.adaptation)==null?void 0:A.id)!=null?x:null,periodId:_.period.id,type:_.type}})},representationChange(_){var A,x;P.onRepresentationChange(_.type,_.period),!i.signal.isCancelled()&&$({type:"representation-changed",contentId:s,value:{adaptationId:_.adaptation.id,representationId:(x=(A=_.representation)==null?void 0:A.id)!=null?x:null,periodId:_.period.id,type:_.type}})},inbandEvent(_){$({type:"inband-event",contentId:s,value:_})},warning(_){$({type:"warning",contentId:s,value:De(_)})},periodStreamReady(_){o!==null&&(o.trackChoiceSetter.addTrackSetter(_.period.id,_.type,_.adaptationRef),$({type:"period-stream-ready",contentId:s,value:{periodId:_.period.id,bufferType:_.type}}))},periodStreamCleared(_){if(o===null)return;let A=a.get(_.period);A!==void 0&&(A.delete(_.type),A.size===0&&a.delete(_.period)),o.trackChoiceSetter.removeTrackSetter(_.period.id,_.type),$({type:"period-stream-cleared",contentId:s,value:{periodId:_.period.id,bufferType:_.type}})},bitrateEstimateChange(_){$({type:"bitrate-estimate-change",contentId:s,value:{bitrate:_.bitrate,bufferType:_.type}})},needsMediaSourceReload(_){R(_)},needsDecipherabilityFlush(){$({type:"needs-decipherability-flush",contentId:s,value:null})},encryptionDataEncountered(_){for(let A of _){let x=A.content,M=ge({},x);M.manifest instanceof Nt&&(M.manifest=M.manifest.getMetadataSnapshot()),M.period instanceof lt&&(M.period=M.period.getMetadataSnapshot()),M.adaptation instanceof ut&&(M.adaptation=M.adaptation.getMetadataSnapshot()),M.representation instanceof en&&(M.representation=M.representation.getMetadataSnapshot()),$({type:"encryption-data-encountered",contentId:s,value:{keyIds:A.keyIds,values:A.values,content:M,type:A.type}})}},error(_){$({type:"error",contentId:s,value:De(_)})}}}function C(_){let{imminentDiscontinuity:A}=_,x=a.get(_.period),M=x==null?void 0:x.get(_.bufferType);if(M!==void 0){if(M.discontinuity===null){if(A===null)return}else if(A!==null&&M.discontinuity.start===A.start&&M.discontinuity.end===A.end)return}x===void 0&&(x=new Map,a.set(_.period,x));let N={periodId:_.period.id,bufferType:_.bufferType,discontinuity:_.imminentDiscontinuity,position:_.position};x.set(_.bufferType,N),$({type:"discontinuity-update",contentId:s,value:N})}function R(_){let x=t.getValue().position.getWanted();i!==null&&i.cancel(),e.reloadMediaSource(_).then(()=>{Ys({initialTime:x,drmSystemId:n.drmSystemId,enableFastSwitching:n.enableFastSwitching,onCodecSwitch:n.onCodecSwitch},e,t,r)},M=>{$({type:"error",contentId:s,value:De(M)})})}}function js(n,e){e?c.setLevel(n,(t,r)=>{let i=r.map(a=>a instanceof Error?De(a):a);postMessage({type:"log",value:{logLevel:t,logs:i}})}):c.setLevel(n)}function gf(n,e){let t=n.getCurrentContent();if(t===null)return;let r=t.segmentSinksStore.getSegmentSinksMetrics();$({type:"segment-sink-store-update",contentId:t.contentId,value:{segmentSinkMetrics:r,messageId:e}})}var Qs=Ha;Qs();})(); diff --git a/worker.js b/worker.js index 166868293f..a60e8d68d3 120000 --- a/worker.js +++ b/worker.js @@ -1 +1 @@ -./versions/4.0.0/demo/worker.js \ No newline at end of file +./versions/4.1.0/demo/worker.js \ No newline at end of file