VulpesOS/assets/webapps/bluetooth.gaiamobile.org/shared/js/l10n.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

1 line
No EOL
23 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;;;;;!function(t,e){"use strict";function n(t,e,n){this.name="L10nError",this.message=t,this.id=e,this.loc=n}function r(){}function i(t){function e(t,e){return-1!==e.indexOf(t)}function n(t,e,n){return typeof t==typeof e&&t>=e&&n>=t}var r={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3},i={0:function(){return"other"},1:function(t){return n(t%100,3,10)?"few":0===t?"zero":n(t%100,11,99)?"many":2===t?"two":1===t?"one":"other"},2:function(t){return 0!==t&&t%10===0?"many":2===t?"two":1===t?"one":"other"},3:function(t){return 1===t?"one":"other"},4:function(t){return n(t,0,1)?"one":"other"},5:function(t){return n(t,0,2)&&2!==t?"one":"other"},6:function(t){return 0===t?"zero":t%10===1&&t%100!==11?"one":"other"},7:function(t){return 2===t?"two":1===t?"one":"other"},8:function(t){return n(t,3,6)?"few":n(t,7,10)?"many":2===t?"two":1===t?"one":"other"},9:function(t){return 0===t||1!==t&&n(t%100,1,19)?"few":1===t?"one":"other"},10:function(t){return n(t%10,2,9)&&!n(t%100,11,19)?"few":t%10!==1||n(t%100,11,19)?"other":"one"},11:function(t){return n(t%10,2,4)&&!n(t%100,12,14)?"few":t%10===0||n(t%10,5,9)||n(t%100,11,14)?"many":t%10===1&&t%100!==11?"one":"other"},12:function(t){return n(t,2,4)?"few":1===t?"one":"other"},13:function(t){return n(t%10,2,4)&&!n(t%100,12,14)?"few":1!==t&&n(t%10,0,1)||n(t%10,5,9)||n(t%100,12,14)?"many":1===t?"one":"other"},14:function(t){return n(t%100,3,4)?"few":t%100===2?"two":t%100===1?"one":"other"},15:function(t){return 0===t||n(t%100,2,10)?"few":n(t%100,11,19)?"many":1===t?"one":"other"},16:function(t){return t%10===1&&11!==t?"one":"other"},17:function(t){return 3===t?"few":0===t?"zero":6===t?"many":2===t?"two":1===t?"one":"other"},18:function(t){return 0===t?"zero":n(t,0,2)&&0!==t&&2!==t?"one":"other"},19:function(t){return n(t,2,10)?"few":n(t,0,1)?"one":"other"},20:function(t){return!n(t%10,3,4)&&t%10!==9||n(t%100,10,19)||n(t%100,70,79)||n(t%100,90,99)?t%1e6===0&&0!==t?"many":t%10!==2||e(t%100,[12,72,92])?t%10!==1||e(t%100,[11,71,91])?"other":"one":"two":"few"},21:function(t){return 0===t?"zero":1===t?"one":"other"},22:function(t){return n(t,0,1)||n(t,11,99)?"one":"other"},23:function(t){return n(t%10,1,2)||t%20===0?"one":"other"},24:function(t){return n(t,3,10)||n(t,13,19)?"few":e(t,[2,12])?"two":e(t,[1,11])?"one":"other"}},a=r[t.replace(/-.*$/,"")];return a in i?i[a]:function(){return"other"}}function a(t,n){var r=Object.keys(t);if("string"==typeof t.$v&&2===r.length)return t.$v;for(var i,a,s=0;a=r[s];s++)"$"!==a[0]&&(i||(i=Object.create(null)),i[a]=o(t[a],n,t.$i+"."+a));return{id:t.$i,value:t.$v!==e?t.$v:null,index:t.$x||null,attrs:i||null,env:n,dirty:!1}}function o(t,n,r){return"string"==typeof t?t:{id:r,value:t.$v||(t!==e?t:null),index:t.$x||null,env:n,dirty:!1}}function s(t,e){if("string"==typeof e)return[{},e];if(e.dirty)throw new n("Cyclic reference detected: "+e.id);e.dirty=!0;var r;try{r=d({},t,e.env,e.value,e.index)}finally{e.dirty=!1}return r}function u(t,e,r){if(ct.indexOf(r)>-1)return[{},e["__"+r]];if(t&&t.hasOwnProperty(r)){if("string"==typeof t[r]||"number"==typeof t[r]&&!isNaN(t[r]))return[{},t[r]];throw new n("Arg must be a string or a number: "+r)}if(r in e&&"__proto__"!==r)return s(t,e[r]);throw new n("Unknown reference: "+r)}function l(t,e,r,i){var a;try{a=u(e,r,i)}catch(o){return[{error:o},"{{ "+i+" }}"]}var s=a[1];if("number"==typeof s)return a;if("string"==typeof s){if(s.length>=ft)throw new n("Too many characters in placeable ("+s.length+", max allowed is "+ft+")");return(t.contextIsNonLatin1||s.match(ht))&&(a[1]=pt+s+gt),a}return[{},"{{ "+i+" }}"]}function c(t,e,n,r){return r.reduce(function(r,i){if("string"==typeof i)return[r[0],r[1]+i];if("idOrVar"===i.t){var a=l(t,e,n,i.v);return[r[0],r[1]+a[1]]}},[t,""])}function f(t,n,r,i){var a=i[0].v,o=u(t,n,a)[1];if("function"!=typeof o)return o;var s=i[1]?u(t,n,i[1])[1]:e;if(o===n.__plural){if(0===s&&"zero"in r)return"zero";if(1===s&&"one"in r)return"one";if(2===s&&"two"in r)return"two"}return o(s)}function d(t,e,r,i,a){if(!i)return[t,i];if("string"==typeof i||"boolean"==typeof i||"number"==typeof i)return[t,i];if(Array.isArray(i))return t.contextIsNonLatin1=i.some(function(t){return"string"==typeof t&&t.match(ht)}),c(t,e,r,i);if(a){var o=f(e,r,i,a);if(i.hasOwnProperty(o))return d(t,e,r,i[o])}if("other"in i)return d(t,e,r,i.other);throw new n("Unresolvable value")}function h(t,e){if("string"==typeof t)return e(t);if("idOrVar"===t.t)return t;for(var n,r=Array.isArray(t)?[]:{},i=Object.keys(t),a=0;n=i[a];a++)"$i"===n||"$x"===n?r[n]=t[n]:r[n]=h(t[n],e);return r}function p(t){return t.replace(bt,function(t){return t+t.toLowerCase()})}function g(t,e){return e.replace(mt,function(e){return t.charAt(e.charCodeAt(0)-65)})}function v(t){return t.replace(wt,function(t){return"‮"+t+"‬"})}function m(t,e){if(!e)return e;var n=e.split(xt),r=n.map(function(e){return xt.test(e)?e:t(e)});return r.join("")}function b(t,e,n,r){this.id=t,this.translate=m.bind(null,function(t){return g(n,r(t))}),this.name=this.translate(e)}function y(t,e){this.id=t,this.ctx=e,this.isReady=!1,this.entries=Object.create(null),this.entries.__plural=i(this.isPseudo()?this.ctx.defaultLocale:t)}function L(t,e){return vt.createEntry(h(t,zt[this.id].translate),e)}function w(t){this.id=t,this.isReady=!1,this.isLoading=!1,this.defaultLocale="en-US",this.availableLocales=[],this.supportedLocales=[],this.qps=[],this.resLinks=[],this.locales={},this._emitter=new r,this._ready=new Promise(this.once.bind(this))}function x(t,e){return this._emitter.emit("notfounderror",e),t}function z(t){for(var r,i,a=0;r=this.supportedLocales[a];){i=this.getLocale(r),i.isReady||i.build(null);var o=i.entries[t];if(o!==e)return o;a++,x.call(this,t,new n('"'+t+'" not found in '+r+" in "+this.id,t,r))}throw new n('"'+t+'" missing from all supported locales in '+this.id,t)}function E(t,e){try{return vt.format(t,e)}catch(n){this._emitter.emit("resolveerror",n);var r={error:n};return[r,e.id]}}function A(t,e){return"string"==typeof e?e:E.call(this,t,e)[1]}function O(t,e){var n=E.call(this,t,e),r=n[1],i={value:r,attrs:null};e.attrs&&(i.attrs=Object.create(null));for(var a in e.attrs){var o=E.call(this,t,e.attrs[a]);i.attrs[a]=o[1]}return i}function _(t,e,n){return this._ready.then(z.bind(this,e)).then(t.bind(this,n),x.bind(this,e))}function k(t,e,r){if(!this.isReady)throw new n("Context not ready");var i;try{i=z.call(this,e)}catch(a){if(a.loc)throw a;return x.call(this,e,a),""}return t.call(this,r,i)}function N(t,e,n){for(var r,i=0;i<e.length;i++){var a=e[i];if(-1!==t.indexOf(a)){r=a;break}}return r&&r!==n?[r,n]:[n]}function $(t){var e=this.getLocale(t[0]);e.isReady?j.call(this,t):e.build(j.bind(this,t))}function j(t){this.supportedLocales=t,this.isReady=!0,this._emitter.emit("ready")}function S(t){return Ot.indexOf(t)>=0?"rtl":"ltr"}function C(t){return $t[document.readyState]>=$t.interactive?void t():void document.addEventListener("readystatechange",function e(){$t[document.readyState]>=$t.interactive&&(document.removeEventListener("readystatechange",e),t())})}function q(){_t=new MutationObserver(H.bind(navigator.mozL10n)),_t.observe(document,Nt)}function P(t){t||q(),I.call(navigator.mozL10n)}function I(){for(var t,e={},n=document.head.querySelectorAll('link[rel="localization"],meta[name="availableLanguages"],meta[name="defaultLanguage"],meta[name="appVersion"],script[type="application/l10n"]'),r=0;t=n[r];r++){var i=t.getAttribute("rel")||t.nodeName.toLowerCase();switch(i){case"localization":this.ctx.resLinks.push(t.getAttribute("href"));break;case"meta":F.call(this,t,e);break;case"script":M.call(this,t)}}var a;navigator.mozApps&&navigator.mozApps.getAdditionalLanguages?(a=navigator.mozApps.getAdditionalLanguages()["catch"](function(t){console.error("Error while loading getAdditionalLanguages",t)}),document.addEventListener("additionallanguageschange",function(t){R.call(this,e,t.detail),this.ctx.requestLocales.apply(this.ctx,navigator.languages||[navigator.language])}.bind(this))):a=Promise.resolve(),a.then(function(t){R.call(this,e,t),U.call(this)}.bind(this))}function R(t,e){var n=V.call(this,t,e);navigator.mozL10n._config.localeSources=n[1],this.ctx.registerLocales(n[0],Object.keys(n[1]))}function T(t,e){for(var n,r=0;n=e[r];r++)if(n.target===t)return n;return null}function V(t,e){var n,r,i=Object.create(null),a=t.defaultLanguage||this.ctx.defaultLocale;if(t.availableLanguages)for(n in t.availableLanguages)i[n]="app";if(e)for(n in e)r=T(this._config.appVersion,e[n]),r&&(n in i&&t.availableLanguages[n]&&!(parseInt(r.revision)>t.availableLanguages[n])||(i[n]="extra"));return a in i||(i[a]="app"),[a,i]}function D(t){var e={};return t.split(",").forEach(function(t){t=t.trim().split(":"),e[t[0]]=parseInt(t[1])}),e}function F(t,e){switch(t.getAttribute("name")){case"availableLanguages":e.availableLanguages=D(t.getAttribute("content"));break;case"defaultLanguage":e.defaultLanguage=t.getAttribute("content");break;case"appVersion":navigator.mozL10n._config.appVersion=t.getAttribute("content")}}function M(t){var e=t.getAttribute("lang"),n=this.ctx.getLocale(e);n.addAST(JSON.parse(t.textContent))}function U(){this.ctx.requestLocales.apply(this.ctx,navigator.languages||[navigator.language]),t.addEventListener("languagechange",function(){this.ctx.requestLocales.apply(this.ctx,navigator.languages||[navigator.language])}.bind(this))}function J(t){for(var e,n=new Set,r=0;r<t.length;r++){if(e=t[r],"childList"===e.type)for(var i,a=0;a<e.addedNodes.length;a++)i=e.addedNodes[a],i.nodeType===Node.ELEMENT_NODE&&n.add(i);"attributes"===e.type&&n.add(e.target)}n.forEach(function(t){t.childElementCount?B.call(this,t):t.hasAttribute("data-l10n-id")&&et.call(this,t)},this)}function H(t,e){e.disconnect(),J.call(this,t),e.observe(document,Nt)}function X(){if(navigator.mozL10n._config.isPretranslated||W.call(this),navigator.mozL10n._config.isPretranslated=!1,kt){for(var t,e=0;t=kt[e];e++)et.call(this,t);kt=null}_t||q(),Z.call(this)}function Z(){var e=new CustomEvent("localized",{bubbles:!1,cancelable:!1,detail:{language:this.ctx.supportedLocales[0]}});t.dispatchEvent(e)}function W(){document.documentElement.lang=this.language.code,document.documentElement.dir=this.language.direction,B.call(this,document.documentElement)}function B(t){"function"==typeof t.hasAttribute&&t.hasAttribute("data-l10n-id")&&et.call(this,t);for(var e=Q(t),n=0;n<e.length;n++)et.call(this,e[n])}function G(t,e,n){t.setAttribute("data-l10n-id",e),n&&t.setAttribute("data-l10n-args",JSON.stringify(n))}function K(t){return{id:t.getAttribute("data-l10n-id"),args:JSON.parse(t.getAttribute("data-l10n-args"))}}function Q(t){return t?t.querySelectorAll("*[data-l10n-id]"):[]}function Y(t){return"ariaValueText"===t?"aria-valuetext":t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).replace(/^-/,"")}function tt(t){return Ct[t]}function et(t){if(!this.ctx.isReady)return kt||(kt=[]),void kt.push(t);var n=t.getAttribute("data-l10n-id");if(!n)return!1;var r=t.getAttribute("data-l10n-args"),i=this.ctx.getEntity(n,r?JSON.parse(r.replace(St,tt)):e),a=i.value;if("string"==typeof a)if(jt.test(a)){var o=t.ownerDocument.createElement("template");o.innerHTML=a,nt(t,o.content)}else t.textContent=a;for(var s in i.attrs){var u=Y(s);it({name:u},t)&&t.setAttribute(u,i.attrs[s])}}function nt(t,e){for(var n,r,i,a=e.ownerDocument.createDocumentFragment();i=e.childNodes[0];)if(e.removeChild(i),i.nodeType!==Node.TEXT_NODE){var o=ot(i),s=at(t,i,o);if(s)nt(s,i),a.appendChild(s);else if(rt(i)){var u=i.ownerDocument.createElement(i.nodeName);nt(u,i),a.appendChild(u)}else a.appendChild(document.createTextNode(i.textContent))}else a.appendChild(i);if(t.textContent="",t.appendChild(a),e.attributes)for(n=0,r;r=e.attributes[n];n++)it(r,t)&&t.setAttribute(r.name,r.value)}function rt(t){return-1!==At.elements.indexOf(t.tagName.toLowerCase())}function it(t,e){var n=t.name.toLowerCase(),r=e.tagName.toLowerCase();if(-1!==At.attributes.global.indexOf(n))return!0;if(!At.attributes[r])return!1;if(-1!==At.attributes[r].indexOf(n))return!0;if("input"===r&&"value"===n){var i=e.type.toLowerCase();if("submit"===i||"button"===i||"reset"===i)return!0}return!1}function at(t,e,n){for(var r,i=0,a=0;r=t.children[a];a++)if(r.nodeType===Node.ELEMENT_NODE&&r.tagName===e.tagName){if(i===n)return r;i++}return null}function ot(t){for(var e,n=0;e=t.previousElementSibling;)e.tagName===t.tagName&&n++;return n}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n;var st={_load:function(t,e,r,i){var a,o=new XMLHttpRequest;o.overrideMimeType&&o.overrideMimeType(t),o.open("GET",e,!i),"application/json"===t&&(i?a=!0:o.responseType="json"),o.addEventListener("load",function(t){if(200===t.target.status||0===t.target.status){var i=t.target.response||t.target.responseText;r(null,a?JSON.parse(i):i)}else r(new n("Not found: "+e))}),o.addEventListener("error",r),o.addEventListener("timeout",r);try{o.send(null)}catch(s){if("NS_ERROR_FILE_NOT_FOUND"!==s.name)throw s;r(new n("Not found: "+e))}},load:function(t,e,n){return st._load("text/plain",t,e,n)},loadJSON:function(t,e,n){return st._load("application/json",t,e,n)}};r.prototype.emit=function(){if(this._listeners){var t=Array.prototype.slice.call(arguments),e=t.shift();if(this._listeners[e])for(var n=this._listeners[e].slice(),r=0;r<n.length;r++)n[r].apply(this,t)}},r.prototype.addEventListener=function(t,e){this._listeners||(this._listeners={}),t in this._listeners||(this._listeners[t]=[]),this._listeners[t].push(e)},r.prototype.removeEventListener=function(t,e){if(this._listeners){var n=this._listeners[t],r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var ut=100,lt={patterns:null,entryIds:null,init:function(){this.patterns={comment:/^\s*#|^\s*$/,entity:/^([^=\s]+)\s*=\s*(.*)$/,multiline:/[^\\]\\$/,index:/\{\[\s*(\w+)(?:\(([^\)]*)\))?\s*\]\}/i,unicode:/\\u([0-9a-fA-F]{1,4})/g,entries:/[^\r\n]+/g,controlChars:/\\([\\\n\r\t\b\f\{\}\"\'])/g,placeables:/\{\{\s*([^\s]*?)\s*\}\}/}},parse:function(t,e){this.patterns||this.init();var n=[];this.entryIds=Object.create(null);var r=e.match(this.patterns.entries);if(!r)return n;for(var i=0;i<r.length;i++){var a=r[i];if(!this.patterns.comment.test(a)){for(;this.patterns.multiline.test(a)&&i<r.length;)a=a.slice(0,-1)+r[++i].trim();var o=a.match(this.patterns.entity);if(o)try{this.parseEntity(o[1],o[2],n)}catch(s){if(!t)throw s;t._emitter.emit("parseerror",s)}}}return n},parseEntity:function(t,e,r){var i,a,o=t.indexOf("[");-1!==o?(i=t.substr(0,o),a=t.substring(o+1,t.length-1)):(i=t,a=null);var s=i.split(".");if(s.length>2)throw new n('Error in ID: "'+i+'". Nested attributes are not supported.');var u;if(s.length>1){if(i=s[0],u=s[1],"$"===u[0])throw new n('Attribute can\'t start with "$"',t)}else u=null;this.setEntityValue(i,u,a,this.unescapeString(e),r)},setEntityValue:function(t,n,r,i,a){var o,s,u=i.indexOf("{{")>-1?this.parseString(i):i;return n?(o=this.entryIds[t],o===e?(s={$i:t},r?(s[n]={},s[n][r]=u):s[n]=u,a.push(s),void(this.entryIds[t]=a.length-1)):r?("string"==typeof a[o][n]&&(a[o][n]={$x:this.parseIndex(a[o][n]),$v:{}}),void(a[o][n].$v[r]=u)):void(a[o][n]=u)):r?(o=this.entryIds[t],o===e?(s={},s[r]=u,a.push({$i:t,$v:s}),void(this.entryIds[t]=a.length-1)):("string"==typeof a[o].$v&&(a[o].$x=this.parseIndex(a[o].$v),a[o].$v={}),void(a[o].$v[r]=u))):(a.push({$i:t,$v:u}),void(this.entryIds[t]=a.length-1))},parseString:function(t){var e=t.split(this.patterns.placeables),r=[],i=e.length,a=(i-1)/2;if(a>=ut)throw new n("Too many placeables ("+a+", max allowed is "+ut+")");for(var o=0;o<e.length;o++)0!==e[o].length&&(o%2===1?r.push({t:"idOrVar",v:e[o]}):r.push(e[o]));return r},unescapeString:function(t){return-1!==t.lastIndexOf("\\")&&(t=t.replace(this.patterns.controlChars,"$1")),t.replace(this.patterns.unicode,function(t,e){return unescape("%u"+"0000".slice(e.length)+e)})},parseIndex:function(t){var e=t.match(this.patterns.index);if(!e)throw new n("Malformed index");return e[2]?[{t:"idOrVar",v:e[1]},e[2]]:[{t:"idOrVar",v:e[1]}]}},ct=["plural"],ft=2500,dt=/\{\{\s*(.+?)\s*\}\}/g,ht=/[^\x01-\xFF]/,pt="⁨",gt="⁩",vt={createEntry:a,format:s,rePlaceables:dt},mt=/[a-zA-Z]/g,bt=/[aeiouAEIOU]/g,yt="ȦƁƇḒḖƑƓĦĪĴĶĿḾȠǾƤɊŘŞŦŬṼẆẊẎẐ[\\]^_`ȧƀƈḓḗƒɠħīĵķŀḿƞǿƥɋřşŧŭṽẇẋẏẑ",Lt="∀ԐↃpƎɟפHIſӼ˥WNOԀÒᴚS⊥∩ɅMXʎZ[\\]ᵥ_,ɐqɔpǝɟƃɥıɾʞʅɯuodbɹsʇnʌʍxʎz",wt=/[^\W0-9_]+/g,xt=/(%[EO]?\w|\{\s*.+?\s*\}|&[#\w]+;|<\s*.+?\s*>)/,zt={"fr-x-psaccent":new b("fr-x-psaccent","Runtime Accented",yt,p),"ar-x-psbidi":new b("ar-x-psbidi","Runtime Bidi",Lt,v)};y.prototype.isPseudo=function(){return-1!==this.ctx.qps.indexOf(this.id)};var Et={extra:function(t,e,n,r,i,a){"properties"===r&&(r="text"),navigator.mozApps.getLocalizationResource(t,e,n,r).then(i.bind(null,null),a)},app:function(t,e,n,r,i,a,o){switch(r){case"properties":st.load(n,i,o);break;case"json":st.loadJSON(n,i,o)}}};y.prototype.build=function(t){function e(e){e&&a._emitter.emit("fetcherror",e),--s<=0&&(o.isReady=!0,t&&t())}function n(t,n){!t&&n&&o.addAST(n),e(t)}function r(t,n){if(!t&&n){var r=lt.parse(a,n);o.addAST(r)}e(t)}var i=!t,a=this.ctx,o=this,s=a.resLinks.length;if(0===s)return void e();var u=this.isPseudo()?a.defaultLocale:this.id,l=null,c="app";"undefined"!=typeof navigator&&(c=navigator.mozL10n._config.localeSources[this.id]||"app",l=navigator.mozL10n._config.appVersion);for(var f=0;f<a.resLinks.length;f++){var d,h=decodeURI(a.resLinks[f]),p=h.replace("{locale}",u),g=p.substr(p.lastIndexOf(".")+1);switch(g){case"json":d=n;break;case"properties":d=r}Et[c](this.id,l,p,g,d,e,i)}},y.prototype.addAST=function(t){for(var e=this.isPseudo()?L.bind(this):vt.createEntry,n=0;n<t.length;n++)this.entries[t[n].$i]=e(t[n],this.entries)},w.prototype.formatValue=function(t,e){return _.call(this,A,t,e)},w.prototype.formatEntity=function(t,e){return _.call(this,O,t,e)},w.prototype.get=function(t,e){return k.call(this,A,t,e)},w.prototype.getEntity=function(t,e){return k.call(this,O,t,e)},w.prototype.getLocale=function(t){var e=this.locales;return e[t]?e[t]:e[t]=new y(t,this)},w.prototype.registerLocales=function(t,e){if(t&&(this.defaultLocale=t),this.availableLocales=[this.defaultLocale],this.qps=Object.keys(zt),e)for(var n,r=0;n=e[r];r++)if(-1===this.availableLocales.indexOf(n)){this.availableLocales.push(n);var i=this.qps.indexOf(n);-1!==i&&this.qps.splice(i,1)}},w.prototype.requestLocales=function(){if(this.isLoading&&!this.isReady)throw new n("Context not ready");this.isLoading=!0;var t=Array.prototype.slice.call(arguments);if(0===t.length)throw new n("No locales requested");var e=N(this.availableLocales.concat(this.qps),t,this.defaultLocale);this.supportedLocales[0]!==e[0]&&$.call(this,e)},w.prototype.addEventListener=function(t,e){this._emitter.addEventListener(t,e)},w.prototype.removeEventListener=function(t,e){this._emitter.removeEventListener(t,e)},w.prototype.ready=function(t){this.isReady&&setTimeout(t),this.addEventListener("ready",t)},w.prototype.once=function(t){if(this.isReady)return void setTimeout(t);var e=function(){this.removeEventListener("ready",e),t()}.bind(this);this.addEventListener("ready",e)};var At={elements:["a","em","strong","small","s","cite","q","dfn","abbr","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","ruby","rt","rp","bdi","bdo","span","br","wbr"],attributes:{global:["title","aria-label","aria-valuetext","aria-moz-hint"],a:["download"],area:["download","alt"],input:["alt","placeholder"],menuitem:["label"],menu:["label"],optgroup:["label"],option:["label"],track:["label"],img:["alt"],textarea:["placeholder"],th:["abbr"]}},Ot=["ar","he","fa","ps","ar-x-psbidi","ur"],_t=null,kt=null,Nt={attributes:!0,characterData:!1,childList:!0,subtree:!0,attributeFilter:["data-l10n-id","data-l10n-args"]};navigator.mozL10n={ctx:null,get:function(t,e){return navigator.mozL10n.ctx.get(t,e)},formatValue:function(t,e){return navigator.mozL10n.ctx.formatValue(t,e)},formatEntity:function(t,e){return navigator.mozL10n.ctx.formatEntity(t,e)},translateFragment:function(t){return B.call(navigator.mozL10n,t)},setAttributes:G,getAttributes:K,ready:function(t){return navigator.mozL10n.ctx.ready(t)},once:function(t){return navigator.mozL10n.ctx.once(t)},get readyState(){return navigator.mozL10n.ctx.isReady?"complete":"loading"},language:{set code(t){navigator.mozL10n.ctx.requestLocales(t)},get code(){return navigator.mozL10n.ctx.supportedLocales[0]},get direction(){return S(navigator.mozL10n.ctx.supportedLocales[0])}},qps:zt,_config:{appVersion:null,localeSources:Object.create(null),isPretranslated:!1},_getInternalAPI:function(){return{Error:n,Context:w,Locale:y,Resolver:vt,getPluralRule:i,rePlaceables:dt,translateDocument:W,onMetaInjected:F,PropertiesParser:lt,walkContent:h,buildLocaleList:V}}};var $t={loading:0,interactive:1,complete:2},jt=/<|&#?\w+;/,St=/[&<>]/g,Ct={"&":"&amp;","<":"&lt;",">":"&gt;"},qt=!1;if(navigator.mozL10n.ctx=new w(t.document?document.URL:null),navigator.mozL10n.ctx.ready(X.bind(navigator.mozL10n)),navigator.mozL10n.ctx.addEventListener("notfounderror",function(t){(qt||"en-US"===t.loc)&&console.warn(t.toString())}),qt&&(navigator.mozL10n.ctx.addEventListener("fetcherror",console.error.bind(console)),navigator.mozL10n.ctx.addEventListener("parseerror",console.error.bind(console)),navigator.mozL10n.ctx.addEventListener("resolveerror",console.error.bind(console))),t.document){navigator.mozL10n._config.isPretranslated=document.documentElement.lang===navigator.language;var Pt=!navigator.mozL10n._config.isPretranslated;C(P.bind(navigator.mozL10n,Pt))}document.l10n={setAttributes:navigator.mozL10n.setAttributes,getAttributes:navigator.mozL10n.getAttributes,formatValue:function(t,e){return navigator.mozL10n.formatValue(t,e)},translateFragment:function(t){return Promise.resolve(navigator.mozL10n.translateFragment(t))},ready:new Promise(function(t){navigator.mozL10n.once(t)}),formatValues:function(){var t=arguments,e=t.map(function(t){return Array.isArray(t)?navigator.mozL10n.formatValue(t[0],t[1]):navigator.mozL10n.formatValue(t)});return Promise.all(e)},requestLanguages:function(t){navigator.mozL10n.ctx.requestLocales.apply(navigator.mozL10n.ctx,t)},pseudo:{"fr-x-psaccent":{getName:function(){return Promise.resolve(navigator.mozL10n.qps["fr-x-psaccent"].name)},processString:function(t){return Promise.resolve(navigator.mozL10n.qps["fr-x-psaccent"].translate(t))}},"ar-x-psbidi":{getName:function(){return Promise.resolve(navigator.mozL10n.qps["ar-x-psbidi"].name)},processString:function(t){return Promise.resolve(navigator.mozL10n.qps["ar-x-psbidi"].translate(t))}}}},navigator.mozL10n.ready(function(){document.documentElement.setAttribute("langs",navigator.mozL10n.ctx.supportedLocales.join(" "))}),navigator.mozL10n.once(function(){t.addEventListener("localized",function(){document.dispatchEvent(new CustomEvent("DOMRetranslated",{bubbles:!1,cancelable:!1}))})})}(this);