W72crm_web-master/node_modules/vue-i18n/dist/vue-i18n.esm.browser.min.js

1 line
24 KiB
JavaScript
Raw Permalink Normal View History

2025-05-27 11:25:53 +08:00
const t=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"],e=["dateStyle","timeStyle","calendar","localeMatcher","hour12","hourCycle","timeZone","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function n(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}const s=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function i(t){return"string"==typeof t}const a=Object.prototype.toString,o="[object Object]";function l(t){return a.call(t)===o}function c(t){return null==t}function h(t){return"function"==typeof t}function u(...t){let e=null,n=null;return 1===t.length?r(t[0])||s(t[0])?n=t[0]:"string"==typeof t[0]&&(e=t[0]):2===t.length&&("string"==typeof t[0]&&(e=t[0]),(r(t[1])||s(t[1]))&&(n=t[1])),{locale:e,params:n}}function _(t){return JSON.parse(JSON.stringify(t))}function m(t,e){return!!~t.indexOf(e)}const f=Object.prototype.hasOwnProperty;function g(t,e){return f.call(t,e)}function p(t){const e=Object(t);for(let t=1;t<arguments.length;t++){const n=arguments[t];if(null!=n){let t;for(t in n)g(n,t)&&(r(n[t])?e[t]=p(e[t],n[t]):e[t]=n[t])}}return e}function d(t,e){if(t===e)return!0;const n=r(t),i=r(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{const n=s(t),r=s(e);if(n&&r)return t.length===e.length&&t.every((t,n)=>d(t,e[n]));if(n||r)return!1;{const n=Object.keys(t),s=Object.keys(e);return n.length===s.length&&n.every(n=>d(t[n],e[n]))}}catch(t){return!1}}var b={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render(t,{data:e,parent:n,props:s,slots:r}){const{$i18n:i}=n;if(!i)return;const{path:a,locale:o,places:l}=s,c=r(),h=i.i(a,o,function(t){let e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(c)||l?function(t,e){const n=e?function(t){return Array.isArray(t)?t.reduce(y,{}):Object.assign({},t)}(e):{};if(!t)return n;const s=(t=t.filter(t=>t.tag||""!==t.text.trim())).every(k);return t.reduce(s?v:y,n)}(c.default,l):c),u=s.tag&&!0!==s.tag||!1===s.tag?s.tag:"span";return u?t(u,e,h):h}};function v(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function y(t,e,n){return t[n]=e,t}function k(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var F={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render(e,{props:n,parent:s,data:a}){const o=s.$i18n;if(!o)return null;let l=null,c=null;i(n.format)?l=n.format:r(n.format)&&(n.format.key&&(l=n.format.key),c=Object.keys(n.format).reduce((e,s)=>m(t,s)?Object.assign({},e,{[s]:n.format[s]}):e,null));const h=n.locale||o.locale,u=o._ntp(n.value,h,l,c),_=u.map((t,e)=>{const n=a.scopedSlots&&a.scopedSlots[t.type];return n?n({[t.type]:t.value,index:e,parts:u}):t.value}),f=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return f?e(f,{attrs:a.attrs,class:a.class,staticClass:a.staticClass},_):_}};function $(t,e,n){C(t,n)&&T(t,e,n)}function w(t,e,n,s){if(!C(t,n))return;const r=n.context.$i18n;(function(t,e){const n=e.context;return t._locale===n.$i18n.locale})(t,n)&&d(e.value,e.oldValue)&&d(t._localeMessage,r.getLocaleMessage(r.locale))||T(t,e,n)}function M(t,e,s,r){if(!s.context)return void n("Vue instance does not exists in VNode context");const i=s.context.$i18n||{};e.modifiers.preserve||i.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}function C(t,e){const s=e.context;return s?!!s.$i18n||(n("VueI18n instance does not exists in Vue instance"),!1):(n("Vue instance does not exists in VNode context"),!1)}function T(t,e,s){const r=e.value,{path:a,locale:o,args:c,choice:h}=function(t){let