LocalCDN-Firefox-Chrome-Brave/resources/vue-i18n/8.24.3/vue-i18n.min.jsm

6 lines
26 KiB
JavaScript
Raw Normal View History

/*!
* vue-i18n v8.24.3
* (c) 2021 kazuya kawaguchi
* Released under the MIT License.
*/
var t,e;t=this,e=function(){"use strict";var t=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var n=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function a(t){return"string"==typeof t}var i=Object.prototype.toString,o="[object Object]";function s(t){return i.call(t)===o}function l(t){return null==t}function c(t){return"function"==typeof t}function u(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var a=null,i=null;return 1===t.length?r(t[0])||n(t[0])?i=t[0]:"string"==typeof t[0]&&(a=t[0]):2===t.length&&("string"==typeof t[0]&&(a=t[0]),(r(t[1])||n(t[1]))&&(i=t[1])),{locale:a,params:i}}function f(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return!!~t.indexOf(e)}var p=Object.prototype.hasOwnProperty;function m(t,e){return p.call(t,e)}function _(t){for(var e=arguments,n=Object(t),a=1;a<arguments.length;a++){var i=e[a];if(null!=i){var o=void 0;for(o in i)m(i,o)&&(r(i[o])?n[o]=_(n[o],i[o]):n[o]=i[o])}}return n}function g(t,e){if(t===e)return!0;var a=r(t),i=r(e);if(!a||!i)return!a&&!i&&String(t)===String(e);try{var o=n(t),s=n(e);if(o&&s)return t.length===e.length&&t.every(function(t,n){return g(t,e[n])});if(o||s)return!1;var l=Object.keys(t),c=Object.keys(e);return l.length===c.length&&l.every(function(n){return g(t[n],e[n])})}catch(t){return!1}}var v={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n){if(t.i18n instanceof nt){if(t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(function(t){e=_(e,JSON.parse(t))}),Object.keys(e).forEach(function(n){t.i18n.mergeLocaleMessage(n,e[n])})}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(s(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this.$root.$i18n:null;if(n&&(t.i18n.root=this.$root,t.i18n.formatter=n.formatter,t.i18n.fallbackLocale=n.fallbackLocale,t.i18n.formatFallbackMessages=n.formatFallbackMessages,t.i18n.silentTranslationWarn=n.silentTranslationWarn,t.i18n.silentFallbackWarn=n.silentFallbackWarn,t.i18n.pluralizationRules=n.pluralizationRules,t.i18n.preserveDirectiveContent=n.preserveDirectiveContent,this.$root.$once("hook:beforeDestroy",function(){t.i18n.root=null,t.i18n.formatter=null,t.i18n.fallbackLocale=null,t.i18n.formatFallbackMessages=null,t.i18n.silentTranslationWarn=null,t.i18n.silentFallbackWarn=null,t.i18n.pluralizationRules=null,t.i18n.preserveDirectiveContent=null})),t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach(function(t){r=_(r,JSON.parse(t))}),t.i18n.messages=r}catch(t){}var a=t.i18n.sharedMessages;a&&s(a)&&(t.i18n.messages=_(t.i18n.messages,a)),this._i18n=new nt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?t.i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):s(t.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},mounted:function(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick(function(){t._subscri