| 1 |
- var Interpreter=function(t){var i="";function f(t,n){return t?"string"==typeof t?t:t.reduce(function(t,r){return t.concat([function(n,e){if(e=e||{},"string"==typeof n)return n;if(n[2]&&"object"==typeof n[2]){var t=Object.keys(n[2]).reduce(function(t,r){return t[r]=f(n[2][r],e),t},{}),r=t[e[0]],u=e[n[0]];return void 0!==u?t[u.toString()]||t.other||i:r||t.other||i}if("object"==typeof n&&0<n.length)return function t(r,n,e){void 0===e&&(e=0);if(!n||!r||r.length<=0)return"";n=n[r[e]];if("string"==typeof n)return n;if("number"==typeof n)return n.toString();if(!n)return"{"+r.join(".")+"}";return t(r,n,++e)}(n[0].split("."),e,0);return""}(r,n)])},[]).join(""):i}function c(t,r,n){r=t[r];if(!r)return n;r=r[n];return r||n}return t.getMessageInterpreter=function(i,o){function e(t,r,n){var e,u;return f((e=t,u=o,(n=(t=i)[n=n])&&(n=n[e])||c(t,u,e)),r)}return function(t,r,n){return 2===arguments.length?e(t,null,r):3!==arguments.length?"":e(t,r,n)}},t}({});
|