ttag
Version:
[](https://stand-with-ukraine.pp.ua)
1 lines • 15.9 kB
JavaScript
!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e=t();for(var r in e)("object"==typeof exports?exports:n)[r]=e[r]}}(this,(()=>(()=>{var n={44:(n,t)=>{"use strict";var e=/(\w+)[-_].*/;function r(n,t){if(t[n])return t[n];var r=n.match(e);if(!r)throw new Error("Can't find lang or lcale with code "+n);return t[r[1]]}function o(n){return n>1}function f(n){return 1!==n}function i(n){return 0}var u={ach:{n:2,f:o},af:{n:2,f},ak:{n:2,f:o},am:{n:2,f:o},an:{n:2,f},ar:{n:6,f:function(n){return 0===n?0:1===n?1:2===n?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5}},arn:{n:2,f:o},ast:{n:2,f},ay:{n:1,f:i},az:{n:2,f},be:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},bg:{n:2,f},bn:{n:2,f},bo:{n:1,f:i},br:{n:2,f:o},brx:{n:2,f},bs:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},ca:{n:2,f},cgg:{n:1,f:i},cs:{n:3,f:function(n){return 1===n?0:n>=2&&n<=4?1:2}},csb:{n:3,f:function(n){return 1===n?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},cy:{n:4,f:function(n){return 1===n?0:2===n?1:8!==n&&11!==n?2:3}},da:{n:2,f},de:{n:2,f},doi:{n:2,f},dz:{n:1,f:i},el:{n:2,f},en:{n:2,f},eo:{n:2,f},es:{n:2,f},et:{n:2,f},eu:{n:2,f},fa:{n:1,f:i},ff:{n:2,f},fi:{n:2,f},fil:{n:2,f:o},fo:{n:2,f},fr:{n:2,f:function(n){return n<=-2||n>=2}},fur:{n:2,f},fy:{n:2,f},ga:{n:5,f:function(n){return 1===n?0:2===n?1:n<7?2:n<11?3:4}},gd:{n:4,f:function(n){return 1===n||11===n?0:2===n||12===n?1:n>2&&n<20?2:3}},gl:{n:2,f},gu:{n:2,f},gun:{n:2,f:o},ha:{n:2,f},he:{n:2,f},hi:{n:2,f},hne:{n:2,f},hr:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},hu:{n:2,f},hy:{n:2,f},id:{n:1,f:i},is:{n:2,f:function(n){return n%10!=1||n%100==11}},it:{n:2,f},ja:{n:1,f:i},jbo:{n:1,f:i},jv:{n:2,f:function(n){return 0!==n}},ka:{n:1,f:i},kab:{n:2,f},kk:{n:2,f},km:{n:1,f:i},kn:{n:2,f},ko:{n:1,f:i},ku:{n:2,f},kw:{n:4,f:function(n){return 1===n?0:2===n?1:3===n?2:3}},ky:{n:1,f:i},lb:{n:2,f},ln:{n:2,f:o},lo:{n:1,f:i},lt:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2}},lv:{n:3,f:function(n){return n%10==1&&n%100!=11?0:0!==n?1:2}},mai:{n:2,f},mfe:{n:2,f:o},mg:{n:2,f:o},mi:{n:2,f:o},mk:{n:2,f:function(n){return 1===n||n%10==1?0:1}},ml:{n:2,f},mn:{n:2,f},mni:{n:2,f},mnk:{n:3,f:function(n){return 0===n?0:1===n?1:2}},mr:{n:2,f},ms:{n:1,f:i},mt:{n:4,f:function(n){return 1===n?0:0===n||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3}},my:{n:1,f:i},nah:{n:2,f},nap:{n:2,f},nb:{n:2,f},ne:{n:2,f},nl:{n:2,f},nn:{n:2,f},no:{n:2,f},nso:{n:2,f},oc:{n:2,f:o},or:{n:2,f},pa:{n:2,f},pap:{n:2,f},pl:{n:3,f:function(n){return 1===n?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},pms:{n:2,f},ps:{n:2,f},pt:{n:2,f},rm:{n:2,f},ro:{n:3,f:function(n){return 1===n?0:0===n||n%100>0&&n%100<20?1:2}},ru:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},rw:{n:2,f},sah:{n:1,f:i},sat:{n:2,f},sco:{n:2,f},sd:{n:2,f},se:{n:2,f},si:{n:2,f},sk:{n:3,f:function(n){return 1===n?0:n>=2&&n<=4?1:2}},sl:{n:4,f:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0}},so:{n:2,f},son:{n:2,f},sq:{n:2,f},sr:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},su:{n:1,f:i},sv:{n:2,f},sw:{n:2,f},ta:{n:2,f},te:{n:2,f},tg:{n:2,f:o},th:{n:1,f:i},ti:{n:2,f:o},tk:{n:2,f},tr:{n:2,f:o},tt:{n:1,f:i},ug:{n:1,f:i},uk:{n:3,f:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2}},ur:{n:2,f},uz:{n:2,f:o},vi:{n:1,f:i},wa:{n:2,f:o},wo:{n:1,f:i},yo:{n:2,f},zh:{n:1,f:i}},a={};t.getNPlurals=function(n){return r(n,u).n},t.getPluralFunc=function(n){if(a[n])return a[n];var t=r(n,u),e=function(n,e){return e[+t.f(n)]};return a[n]=e,e}},429:(n,t,e)=>{n.exports=e(44)}},t={};function e(r){var o=t[r];if(void 0!==o)return o.exports;var f=t[r]={exports:{}};return n[r](f,f.exports,e),f.exports}e.d=(n,t)=>{for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),e.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function n(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(n){o(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))}))}return t}function o(n,t,e){return(t=function(n){var t=function(n,t){if("object"!=typeof n||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var r=e.call(n,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"==typeof t?t:String(t)}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}e.r(r),e.d(r,{Context:()=>F,TTag:()=>H,_:()=>B,addLocale:()=>R,c:()=>q,gettext:()=>U,jt:()=>G,msgid:()=>N,ngettext:()=>J,setDedent:()=>K,setDefaultLang:()=>Q,t:()=>V,useLocale:()=>X,useLocales:()=>Y});const f=function n(e){return r.withOptions=r=>n(t(t({},e),r)),r;function r(n,...t){const r="string"==typeof n?[n]:n.raw,{escapeSpecialCharacters:o=Array.isArray(n)}=e;let f="";for(let n=0;n<r.length;n++){let e=r[n];o&&(e=e.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\{/g,"{")),f+=e,n<t.length&&(f+=t[n])}const i=f.split("\n");let u=null;for(const n of i){const t=n.match(/^(\s+)\S+/);if(t){const n=t[1].length;u=u?Math.min(u,n):n}}if(null!==u){const n=u;f=i.map((t=>" "===t[0]||"\t"===t[0]?t.slice(n):t)).join("\n")}return f.trim().replace(/\\n/g,"\n")}}({});var i=e(429);function u(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var r,o,f,i,u=[],a=!0,c=!1;try{if(f=(e=e.call(n)).next,0===t){if(Object(e)!==e)return;a=!1}else for(;!(a=(r=f.call(e)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{if(!a&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}(n,t)||function(n,t){if(n){if("string"==typeof n)return a(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?a(n,t):void 0}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}var c,l=function(n,t){for(var e=[],r=t.length,o=n.length,f=0;f<o;f++){var i=f<r?"${".concat(f,"}"):"";e.push(n[f]+i)}return e.join("")},s=function(){return{values:[],index:-1,toString:function(){return this.index=(this.index+1)%this.values.length,this.values[this.index].toString()}}},g=function(n){return n.replace(/\s/g,"")},v={},y=(c=function(n){return new RegExp("\\$\\{(?:[\\s]+?|\\s?)".concat(n,"(?:[\\s]+?|\\s?)}"))},function(n){return v[n]||(v[n]=c(n)),v[n]}),p=function(n,t){return t.reduce((function(n,t,e){return n.replace(y(String(e)),String(t))}),n)},h=function(n,t){var e=t.length-1;return n.reduce((function(n,r,o){return n+r+(o<=e?t[o]:"")}),"")},d={},m=/\splural ?=?([\s\S]*);?/,b=/\$\{\s*([.\w+\[\]])*\s*\}/g;function x(n){for(var t=[],e=0,r=Object.entries(n);e<r.length;e++){var o=u(r[e],1)[0];n.hasOwnProperty(o)&&t.push(o)}return t}function w(n,t){return n.replace(b,(function(n){return"${".concat(t[g(n)],"}")}))}function j(n){var t={},e=n.match(b);if(!e)return null;for(var r=0;r<e.length;r++){var o=g(e[r]);t[o]=t[o]||s(),t[o].values.push(r)}return t}function L(n){var t=j(n.msgid);if(!t)return n;var e={msgid:w(n.msgid,t),msgstr:[]};n.msgid_plural&&(e.msgid_plural=w(n.msgid_plural,t));for(var r=n.msgstr,o=0;o<r.length;o++)e.msgstr.push(w(r[o],t));return e.comments=n.comments,e}function O(n,t){var e=j(n);return e?[w(n,e),t.map((function(n){return w(n,e)}))]:[n,t]}function S(n){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},S(n)}function P(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,k(r.key),r)}}function k(n){var t=function(n,t){if("object"!==S(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var r=e.call(n,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===S(t)?t:String(t)}var C=function(){function n(){var t,e,r;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=this,r={locales:{},currentLocales:[],currentLocale:"en",dedent:!0,defaultLang:"en"},(e=k(e="config"))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}var t,e;return t=n,e=[{key:"addLocale",value:function(n,t){var e;if("translations"in t)e=function(n){for(var t={},e=x(n.translations),r=0;r<e.length;r++){for(var o=e[r],f=n.translations[o],i={},u=x(f),a=0;a<u.length;a++){var c=L(f[u[a]]);i[c.msgid]=c}t[o]=i}return n.translations=t,n}(t);else{if(!t.contexts)throw new Error("Invalid locale data format");e=function(n){for(var t={},e=x(n.contexts),r=0;r<e.length;r++){for(var o=e[r],f={},i=x(n.contexts[o]),a=0;a<i.length;a++){var c=i[a],l=u(O(c,n.contexts[o][c]),2),s=l[0],g=l[1];f[s]=g}t[o]=f}return n.contexts=t,n}(t)}this.config.locales[n]=e}},{key:"setCurrentLocale",value:function(n){this.config.currentLocale=n}},{key:"setDedent",value:function(n){this.config.dedent=n}},{key:"setCurrentLocales",value:function(n){this.config.currentLocales=n}},{key:"getAvailLocales",value:function(){return this.config.locales}},{key:"getCurrentLocales",value:function(){return this.config.currentLocales.map((function(n){return"string"==typeof n?n:n()}))}},{key:"getCurrentLocale",value:function(){return"string"==typeof this.config.currentLocale?this.config.currentLocale:this.config.currentLocale()}},{key:"isDedent",value:function(){return this.config.dedent}},{key:"setDefaultLang",value:function(n){this.config.defaultLang=n}},{key:"getDefaultPluralFn",value:function(){return(0,i.getPluralFunc)(this.config.defaultLang)}},{key:"getDefaultPluralFormsCount",value:function(){return(0,i.getNPlurals)(this.config.defaultLang)}},{key:"getCurrentLocaleHeaders",value:function(){var n=this.getCurrentLocale();return this.config.locales[n].headers}}],e&&P(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),n}();function D(n){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},D(n)}function T(n,t,e){return(t=$(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function A(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function _(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,$(r.key),r)}}function E(n,t,e){return t&&_(n.prototype,t),e&&_(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function $(n){var t=function(n,t){if("object"!==D(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var r=e.call(n,"string");if("object"!==D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===D(t)?t:String(t)}var F=function(){function n(t){A(this,n),this.context=t,this.getContext=this.getContext}return E(n,[{key:"getContext",value:function(){return this.context}}]),n}();function z(n){if(!n)return!1;for(var t=0;t<n.length;t++)if(!n[t].length)return!1;return!0}var I=/(\${\s*\d+\s*})/g,M=/\${\s*(\d+)\s*}/;function N(n){if(n&&"reduce"in n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];var o=new String(h(n,e));return o._strs=n,o._exprs=e,o}return n}var H=E((function n(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:new C,context:new F("")},r=e.config,o=e.context;A(this,n),T(this,"maybeDedent",(function(n){return t.conf.isDedent()?"string"!=typeof(e=n)||-1===e.indexOf("\n")?e:f(e):n;var e})),T(this,"findTransObj",(function(n,e,r){var o,f=t.conf.getAvailLocales()[n];if(!f)return null;if("translations"in f){var i=f.translations[r]||f.translations[""],u=i&&i[e];if(u&&(!(o=u)||!o.comments||"fuzzy"!==o.comments.flag)&&z(u.msgstr))return u.msgstr}if("contexts"in f){var a=f.contexts[r]||f.contexts[""],c=a&&a[e];if(c&&z(c))return c}return null})),T(this,"findTranslation",(function(n,e){var r=t.conf.getCurrentLocales();if(r.length)for(var o=0;o<r.length;o++){var f=t.findTransObj(r[o],n,e);if(f)return t.conf.setCurrentLocale(r[o]),f}return t.findTransObj(t.conf.getCurrentLocale(),n,e)})),T(this,"setDefaultLang",(function(n){t.conf.setDefaultLang(n)})),T(this,"useLocales",(function(n){t.conf.setCurrentLocales(n)})),T(this,"setDedent",(function(n){t.conf.setDedent(Boolean(n))})),T(this,"useLocale",(function(n){t.conf.setCurrentLocale(n)})),T(this,"addLocale",(function(n,e){t.conf.addLocale(n,e)})),T(this,"t",(function(n){var e=n;if(n&&"reduce"in n){for(var r=arguments.length,o=new Array(r>1?r-1:0),f=1;f<r;f++)o[f-1]=arguments[f];var i=t.maybeDedent(l(n,o)),u=t.ctx.getContext(),a=t.findTranslation(i,u);e=a?p(a[0],o):h(n,o)}return e})),T(this,"jt",(function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(n&&"reduce"in n){var f=t.maybeDedent(l(n,r)),i=t.ctx.getContext(),u=t.findTranslation(f,i);return u?u[0].split(I).map((function(n){var t=n.match(M);return t?r[+t[1]]:n})):function(n,t){return n.reduce((function(n,e,r){return void 0!==t[r]?n.concat(e,t[r]):n.concat(e)}),[])}(n,r)}return n})),T(this,"ngettext",(function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];var o=t.maybeDedent(l(e[0]._strs,e[0]._exprs)),f=e[e.length-1],u=e.slice(1,-1);u.unshift(e[0].toString());var a=t.findTranslation(o,t.ctx.getContext());if(a){var c=function(n){var t=n.getCurrentLocaleHeaders(),e=t.language||t.Language;return e?(0,i.getPluralFunc)(e):function(n){var t=d[n];return t||(t=new Function("n","args",function(n){return"return args[+ (".concat(n,")];")}(n)),d[n]=t),t}(function(n){var t,e=n["plural-forms"]||n["Plural-Forms"];if(!e)throw new Error('po. data should include "language" or "plural-form" header for ngettext');var r=(null===(t=m.exec(e))||void 0===t?void 0:t[1])||[];return";"===r[r.length-1]&&(r=r.slice(0,-1)),r}(t))}(t.conf)(f,a)||"";return p(c,e[0]._exprs)}return t.conf.getDefaultPluralFn()(f,u)})),T(this,"gettext",(function(n){var e=t.ctx.getContext(),r=t.findTranslation(n,e);return r?r[0]:n})),T(this,"_",this.gettext),T(this,"copyWithNewContext",(function(e){return new n({config:t.conf,context:new F(e)})})),T(this,"c",(function(n){var e=t.copyWithNewContext(n);return{t:e.t,jt:e.jt,gettext:e.gettext,ngettext:e.ngettext}})),this.conf=r,this.ctx=o||new F("")})),W=new H,q=W.c,B=W._,R=W.addLocale,U=W.gettext,G=W.jt,J=W.ngettext,K=W.setDedent,Q=W.setDefaultLang,V=W.t,X=W.useLocale,Y=W.useLocales})(),r})()));