UNPKG

@world-vision-canada/wvc-design-system

Version:

WVC Vue Design system is a fork of Vue Design System, an open-source tool for building Design Systems with Vue.js

7 lines 29.6 kB
(("undefined"!==typeof self?self:this)["webpackJsonpwvc"]=("undefined"!==typeof self?self:this)["webpackJsonpwvc"]||[]).push([[0],{2350:function(t,e){function n(t,e){var n=t[1]||"",a=t[3];if(!a)return n;if(e&&"function"===typeof btoa){var i=r(a),o=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}function r(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+e;return"/*# "+n+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r})).join("")},e.i=function(t,n){"string"===typeof t&&(t=[[null,t,""]]);for(var r={},a=0;a<this.length;a++){var i=this[a][0];"number"===typeof i&&(r[i]=!0)}for(a=0;a<t.length;a++){var o=t[a];"number"===typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},2877:function(t,e,n){"use strict";function r(t,e,n,r,a,i,o,s){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),o?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):a&&(l=s?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return r}))},"35d6":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},a=0;a<e.length;a++){var i=e[a],o=i[0],s=i[1],l=i[2],c=i[3],u={id:t+":"+a,css:s,media:l,sourceMap:c};r[o]?r[o].parts.push(u):n.push(r[o]={id:o,parts:[u]})}return n}function a(t,e,n){var a=r(t,e);i(a,n)}function i(t,e){for(var n=e._injectedStyles||(e._injectedStyles={}),r=0;r<t.length;r++){var a=t[r],i=n[a.id];if(!i){for(var o=0;o<a.parts.length;o++)s(a.parts[o],e);n[a.id]=!0}}}function o(t){var e=document.createElement("style");return e.type="text/css",t.appendChild(e),e}function s(t,e){var n=o(e),r=t.css,a=t.media,i=t.sourceMap;if(a&&n.setAttribute("media",a),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),n.styleSheet)n.styleSheet.cssText=r;else{while(n.firstChild)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(r))}}n.r(e),n.d(e,"default",(function(){return a}))},a925:function(t,e,n){"use strict"; /*! * vue-i18n v8.22.1 * (c) 2020 kazuya kawaguchi * Released under the MIT License. */var r=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher","unit"];function a(t,e){"undefined"!==typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}function i(t,e){"undefined"!==typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}var o=Array.isArray;function s(t){return null!==t&&"object"===typeof t}function l(t){return"boolean"===typeof t}function c(t){return"string"===typeof t}var u=Object.prototype.toString,f="[object Object]";function h(t){return u.call(t)===f}function p(t){return null===t||void 0===t}function m(t){return"function"===typeof t}function _(){var t=[],e=arguments.length;while(e--)t[e]=arguments[e];var n=null,r=null;return 1===t.length?s(t[0])||o(t[0])?r=t[0]:"string"===typeof t[0]&&(n=t[0]):2===t.length&&("string"===typeof t[0]&&(n=t[0]),(s(t[1])||o(t[1]))&&(r=t[1])),{locale:n,params:r}}function g(t){return JSON.parse(JSON.stringify(t))}function v(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}function d(t,e){return!!~t.indexOf(e)}var b=Object.prototype.hasOwnProperty;function y(t,e){return b.call(t,e)}function w(t){for(var e=arguments,n=Object(t),r=1;r<arguments.length;r++){var a=e[r];if(void 0!==a&&null!==a){var i=void 0;for(i in a)y(a,i)&&(s(a[i])?n[i]=w(n[i],a[i]):n[i]=a[i])}}return n}function k(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var a=o(t),i=o(e);if(a&&i)return t.length===e.length&&t.every((function(t,n){return k(t,e[n])}));if(a||i)return!1;var l=Object.keys(t),c=Object.keys(e);return l.length===c.length&&l.every((function(n){return k(t[n],e[n])}))}catch(u){return!1}}function F(t){return t.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function $(t){return null!=t&&Object.keys(t).forEach((function(e){"string"==typeof t[e]&&(t[e]=F(t[e]))})),t}function C(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){var n=[],r=arguments.length-2;while(r-- >0)n[r]=arguments[r+2];var a=this.$i18n;return a._tc.apply(a,[t,a.locale,a._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}var M={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n)if(t.i18n instanceof $t){if(t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach((function(t){e=w(e,JSON.parse(t))})),Object.keys(e).forEach((function(n){t.i18n.mergeLocaleMessage(n,e[n])}))}catch(o){0}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(h(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof $t?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),t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach((function(t){r=w(r,JSON.parse(t))})),t.i18n.messages=r}catch(o){0}var a=t.i18n,i=a.sharedMessages;i&&h(i)&&(t.i18n.messages=w(t.i18n.messages,i)),this._i18n=new $t(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 0;else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof $t?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof $t&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?(t.i18n instanceof $t||h(t.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof $t||t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof $t)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick((function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}},T={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:function(t,e){var n=e.data,r=e.parent,a=e.props,i=e.slots,o=r.$i18n;if(o){var s=a.path,l=a.locale,c=a.places,u=i(),f=o.i(s,l,L(u)||c?x(u.default,c):u),h=a.tag&&!0!==a.tag||!1===a.tag?a.tag:"span";return h?t(h,n,f):f}}};function L(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}function x(t,e){var n=e?I(e):{};if(!t)return n;t=t.filter((function(t){return t.tag||""!==t.text.trim()}));var r=t.every(j);return t.reduce(r?O:D,n)}function I(t){return Array.isArray(t)?t.reduce(D,{}):Object.assign({},t)}function O(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function D(t,e,n){return t[n]=e,t}function j(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var S,W={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:function(t,e){var n=e.props,a=e.parent,i=e.data,o=a.$i18n;if(!o)return null;var l=null,u=null;c(n.format)?l=n.format:s(n.format)&&(n.format.key&&(l=n.format.key),u=Object.keys(n.format).reduce((function(t,e){var a;return d(r,e)?Object.assign({},t,(a={},a[e]=n.format[e],a)):t}),null));var f=n.locale||o.locale,h=o._ntp(n.value,f,l,u),p=h.map((function(t,e){var n,r=i.scopedSlots&&i.scopedSlots[t.type];return r?r((n={},n[t.type]=t.value,n.index=e,n.parts=h,n)):t.value})),m=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return m?t(m,{attrs:i.attrs,class:i["class"],staticClass:i.staticClass},p):p}};function N(t,e,n){E(t,n)&&V(t,e,n)}function R(t,e,n,r){if(E(t,n)){var a=n.context.$i18n;P(t,n)&&k(e.value,e.oldValue)&&k(t._localeMessage,a.getLocaleMessage(a.locale))||V(t,e,n)}}function H(t,e,n,r){var i=n.context;if(i){var o=n.context.$i18n||{};e.modifiers.preserve||o.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t["_vt"],t._locale=void 0,delete t["_locale"],t._localeMessage=void 0,delete t["_localeMessage"]}else a("Vue instance does not exists in VNode context")}function E(t,e){var n=e.context;return n?!!n.$i18n||(a("VueI18n instance does not exists in Vue instance"),!1):(a("Vue instance does not exists in VNode context"),!1)}function P(t,e){var n=e.context;return t._locale===n.$i18n.locale}function V(t,e,n){var r,i,o=e.value,s=A(o),l=s.path,c=s.locale,u=s.args,f=s.choice;if(l||c||u)if(l){var h=n.context;t._vt=t.textContent=null!=f?(r=h.$i18n).tc.apply(r,[l,f].concat(U(c,u))):(i=h.$i18n).t.apply(i,[l].concat(U(c,u))),t._locale=h.$i18n.locale,t._localeMessage=h.$i18n.getLocaleMessage(h.$i18n.locale)}else a("`path` is required in v-t directive");else a("value type not supported")}function A(t){var e,n,r,a;return c(t)?e=t:h(t)&&(e=t.path,n=t.locale,r=t.args,a=t.choice),{path:e,locale:n,args:r,choice:a}}function U(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||h(e))&&n.push(e),n}function z(t){z.installed=!0,S=t;S.version&&Number(S.version.split(".")[0]);C(S),S.mixin(M),S.directive("t",{bind:N,update:R,unbind:H}),S.component(T.name,T),S.component(W.name,W);var e=S.config.optionMergeStrategies;e.i18n=function(t,e){return void 0===e?t:e}}var J=function(){this._caches=Object.create(null)};J.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=X(t),this._caches[t]=n),G(n,e)};var B=/^(?:\d)+/,q=/^(?:\w)+/;function X(t){var e=[],n=0,r="";while(n<t.length){var a=t[n++];if("{"===a){r&&e.push({type:"text",value:r}),r="";var i="";a=t[n++];while(void 0!==a&&"}"!==a)i+=a,a=t[n++];var o="}"===a,s=B.test(i)?"list":o&&q.test(i)?"named":"unknown";e.push({value:i,type:s})}else"%"===a?"{"!==t[n]&&(r+=a):r+=a}return r&&e.push({type:"text",value:r}),e}function G(t,e){var n=[],r=0,a=Array.isArray(e)?"list":s(e)?"named":"unknown";if("unknown"===a)return n;while(r<t.length){var i=t[r];switch(i.type){case"text":n.push(i.value);break;case"list":n.push(e[parseInt(i.value,10)]);break;case"named":"named"===a&&n.push(e[i.value]);break;case"unknown":0;break}r++}return n}var Z=0,K=1,Q=2,Y=3,tt=0,et=1,nt=2,rt=3,at=4,it=5,ot=6,st=7,lt=8,ct=[];ct[tt]={ws:[tt],ident:[rt,Z],"[":[at],eof:[st]},ct[et]={ws:[et],".":[nt],"[":[at],eof:[st]},ct[nt]={ws:[nt],ident:[rt,Z],0:[rt,Z],number:[rt,Z]},ct[rt]={ident:[rt,Z],0:[rt,Z],number:[rt,Z],ws:[et,K],".":[nt,K],"[":[at,K],eof:[st,K]},ct[at]={"'":[it,Z],'"':[ot,Z],"[":[at,Q],"]":[et,Y],eof:lt,else:[at,Z]},ct[it]={"'":[at,Z],eof:lt,else:[it,Z]},ct[ot]={'"':[at,Z],eof:lt,else:[ot,Z]};var ut=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function ft(t){return ut.test(t)}function ht(t){var e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e!==n||34!==e&&39!==e?t:t.slice(1,-1)}function pt(t){if(void 0===t||null===t)return"eof";var e=t.charCodeAt(0);switch(e){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function mt(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(ft(e)?ht(e):"*"+e)}function _t(t){var e,n,r,a,i,o,s,l=[],c=-1,u=tt,f=0,h=[];function p(){var e=t[c+1];if(u===it&&"'"===e||u===ot&&'"'===e)return c++,r="\\"+e,h[Z](),!0}h[K]=function(){void 0!==n&&(l.push(n),n=void 0)},h[Z]=function(){void 0===n?n=r:n+=r},h[Q]=function(){h[Z](),f++},h[Y]=function(){if(f>0)f--,u=at,h[Z]();else{if(f=0,void 0===n)return!1;if(n=mt(n),!1===n)return!1;h[K]()}};while(null!==u)if(c++,e=t[c],"\\"!==e||!p()){if(a=pt(e),s=ct[u],i=s[a]||s["else"]||lt,i===lt)return;if(u=i[0],o=h[i[1]],o&&(r=i[2],r=void 0===r?e:r,!1===o()))return;if(u===st)return l}}var gt=function(){this._cache=Object.create(null)};gt.prototype.parsePath=function(t){var e=this._cache[t];return e||(e=_t(t),e&&(this._cache[t]=e)),e||[]},gt.prototype.getPathValue=function(t,e){if(!s(t))return null;var n=this.parsePath(e);if(0===n.length)return null;var r=n.length,a=t,i=0;while(i<r){var o=a[n[i]];if(void 0===o)return null;a=o,i++}return a};var vt,dt=/<\/?[\w\s="/.':;#-\/]+>/,bt=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,yt=/^@(?:\.([a-z]+))?:/,wt=/[()]/g,kt={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},Ft=new J,$t=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!==typeof window&&window.Vue&&z(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||{},o=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||Ft,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new gt,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex){var a=r.getChoiceIndex;return a.call(e,t,n)}var i=function(t,e){return t=Math.abs(t),2===e?t?t>1?1:0:1:t?Math.min(t,2):0};return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):i(t,n)},this._exist=function(t,n){return!(!t||!n)&&(!p(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(a).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,a[t])})),this._initVM({locale:n,fallbackLocale:r,messages:a,dateTimeFormats:i,numberFormats:o})},Ct={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0}};$t.prototype._checkLocaleMessage=function(t,e,n){var r=[],s=function(t,e,n,r){if(h(n))Object.keys(n).forEach((function(a){var i=n[a];h(i)?(r.push(a),r.push("."),s(t,e,i,r),r.pop(),r.pop()):(r.push(a),s(t,e,i,r),r.pop())}));else if(o(n))n.forEach((function(n,a){h(n)?(r.push("["+a+"]"),r.push("."),s(t,e,n,r),r.pop(),r.pop()):(r.push("["+a+"]"),s(t,e,n,r),r.pop())}));else if(c(n)){var l=dt.test(n);if(l){var u="Detected HTML in message '"+n+"' of keypath '"+r.join("")+"' at '"+e+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?a(u):"error"===t&&i(u)}}};s(e,t,n,r)},$t.prototype._initVM=function(t){var e=S.config.silent;S.config.silent=!0,this._vm=new S({data:t}),S.config.silent=e},$t.prototype.destroyVM=function(){this._vm.$destroy()},$t.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},$t.prototype.unsubscribeDataChanging=function(t){v(this._dataListeners,t)},$t.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",(function(){var e=t._dataListeners.length;while(e--)S.nextTick((function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()}))}),{deep:!0})},$t.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",(function(e){t.$set(t,"locale",e),t.$forceUpdate()}),{immediate:!0})},$t.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},Ct.vm.get=function(){return this._vm},Ct.messages.get=function(){return g(this._getMessages())},Ct.dateTimeFormats.get=function(){return g(this._getDateTimeFormats())},Ct.numberFormats.get=function(){return g(this._getNumberFormats())},Ct.availableLocales.get=function(){return Object.keys(this.messages).sort()},Ct.locale.get=function(){return this._vm.locale},Ct.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},Ct.fallbackLocale.get=function(){return this._vm.fallbackLocale},Ct.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},Ct.formatFallbackMessages.get=function(){return this._formatFallbackMessages},Ct.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},Ct.missing.get=function(){return this._missing},Ct.missing.set=function(t){this._missing=t},Ct.formatter.get=function(){return this._formatter},Ct.formatter.set=function(t){this._formatter=t},Ct.silentTranslationWarn.get=function(){return this._silentTranslationWarn},Ct.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},Ct.silentFallbackWarn.get=function(){return this._silentFallbackWarn},Ct.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},Ct.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},Ct.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},Ct.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},Ct.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])}))}},Ct.postTranslation.get=function(){return this._postTranslation},Ct.postTranslation.set=function(t){this._postTranslation=t},$t.prototype._getMessages=function(){return this._vm.messages},$t.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},$t.prototype._getNumberFormats=function(){return this._vm.numberFormats},$t.prototype._warnDefault=function(t,e,n,r,a,i){if(!p(n))return n;if(this._missing){var o=this._missing.apply(null,[t,e,r,a]);if(c(o))return o}else 0;if(this._formatFallbackMessages){var s=_.apply(void 0,a);return this._render(e,i,s.params,e)}return e},$t.prototype._isFallbackRoot=function(t){return!t&&!p(this._root)&&this._fallbackRoot},$t.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},$t.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},$t.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},$t.prototype._interpolate=function(t,e,n,r,a,i,s){if(!e)return null;var l,u=this._path.getPathValue(e,n);if(o(u)||h(u))return u;if(p(u)){if(!h(e))return null;if(l=e[n],!c(l)&&!m(l))return null}else{if(!c(u)&&!m(u))return null;l=u}return c(l)&&(l.indexOf("@:")>=0||l.indexOf("@.")>=0)&&(l=this._link(t,e,l,r,"raw",i,s)),this._render(l,a,i,n)},$t.prototype._link=function(t,e,n,r,a,i,s){var l=n,c=l.match(bt);for(var u in c)if(c.hasOwnProperty(u)){var f=c[u],h=f.match(yt),p=h[0],m=h[1],_=f.replace(p,"").replace(wt,"");if(d(s,_))return l;s.push(_);var g=this._interpolate(t,e,_,r,"raw"===a?"string":a,"raw"===a?void 0:i,s);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");var v=this._root.$i18n;g=v._translate(v._getMessages(),v.locale,v.fallbackLocale,_,r,a,i)}g=this._warnDefault(t,_,g,r,o(i)?i:[i],a),this._modifiers.hasOwnProperty(m)?g=this._modifiers[m](g):kt.hasOwnProperty(m)&&(g=kt[m](g)),s.pop(),l=g?l.replace(f,g):l}return l},$t.prototype._createMessageContext=function(t){var e=o(t)?t:[],n=s(t)?t:{},r=function(t){return e[t]},a=function(t){return n[t]};return{list:r,named:a}},$t.prototype._render=function(t,e,n,r){if(m(t))return t(this._createMessageContext(n));var a=this._formatter.interpolate(t,n,r);return a||(a=Ft.interpolate(t,n,r)),"string"!==e||c(a)?a:a.join("")},$t.prototype._appendItemToChain=function(t,e,n){var r=!1;return d(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},$t.prototype._appendLocaleToChain=function(t,e,n){var r,a=e.split("-");do{var i=a.join("-");r=this._appendItemToChain(t,i,n),a.splice(-1,1)}while(a.length&&!0===r);return r},$t.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,a=0;a<e.length&&l(r);a++){var i=e[a];c(i)&&(r=this._appendLocaleToChain(t,i,n))}return r},$t.prototype._getLocaleChain=function(t,e){if(""===t)return[];this._localeChainCache||(this._localeChainCache={});var n=this._localeChainCache[t];if(!n){e||(e=this.fallbackLocale),n=[];var r,a=[t];while(o(a))a=this._appendBlockToChain(n,a,e);r=o(e)?e:s(e)?e["default"]?e["default"]:null:e,a=c(r)?[r]:r,a&&this._appendBlockToChain(n,a,null),this._localeChainCache[t]=n}return n},$t.prototype._translate=function(t,e,n,r,a,i,o){for(var s,l=this._getLocaleChain(e,n),c=0;c<l.length;c++){var u=l[c];if(s=this._interpolate(u,t[u],r,a,i,o,[r]),!p(s))return s}return null},$t.prototype._t=function(t,e,n,r){var a,i=[],o=arguments.length-4;while(o-- >0)i[o]=arguments[o+4];if(!t)return"";var s=_.apply(void 0,i);this._escapeParameterHtml&&(s.params=$(s.params));var l=s.locale||e,c=this._translate(n,l,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(c)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return c=this._warnDefault(l,t,c,r,i,"string"),this._postTranslation&&null!==c&&void 0!==c&&(c=this._postTranslation(c,t)),c},$t.prototype.t=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},$t.prototype._i=function(t,e,n,r,a){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",a);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,a)}return this._warnDefault(e,t,i,r,[a],"raw")},$t.prototype.i=function(t,e,n){return t?(c(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},$t.prototype._tc=function(t,e,n,r,a){var i,o=[],s=arguments.length-5;while(s-- >0)o[s]=arguments[s+5];if(!t)return"";void 0===a&&(a=1);var l={count:a,n:a},c=_.apply(void 0,o);return c.params=Object.assign(l,c.params),o=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(o)),a)},$t.prototype.fetchChoice=function(t,e){if(!t||!c(t))return null;var n=t.split("|");return e=this.getChoiceIndex(e,n.length),n[e]?n[e].trim():t},$t.prototype.tc=function(t,e){var n,r=[],a=arguments.length-2;while(a-- >0)r[a]=arguments[a+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},$t.prototype._te=function(t,e,n){var r=[],a=arguments.length-3;while(a-- >0)r[a]=arguments[a+3];var i=_.apply(void 0,r).locale||e;return this._exist(n[i],t)},$t.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},$t.prototype.getLocaleMessage=function(t){return g(this._vm.messages[t]||{})},$t.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},$t.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,w({},this._vm.messages[t]||{},e))},$t.prototype.getDateTimeFormat=function(t){return g(this._vm.dateTimeFormats[t]||{})},$t.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},$t.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,w(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},$t.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},$t.prototype._localizeDateTime=function(t,e,n,r,a){for(var i=e,o=r[i],s=this._getLocaleChain(e,n),l=0;l<s.length;l++){var c=s[l];if(o=r[c],i=c,!p(o)&&!p(o[a]))break}if(p(o)||p(o[a]))return null;var u=o[a],f=i+"__"+a,h=this._dateTimeFormatters[f];return h||(h=this._dateTimeFormatters[f]=new Intl.DateTimeFormat(i,u)),h.format(t)},$t.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""},$t.prototype.d=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var r=this.locale,a=null;return 1===e.length?c(e[0])?a=e[0]:s(e[0])&&(e[0].locale&&(r=e[0].locale),e[0].key&&(a=e[0].key)):2===e.length&&(c(e[0])&&(a=e[0]),c(e[1])&&(r=e[1])),this._d(t,r,a)},$t.prototype.getNumberFormat=function(t){return g(this._vm.numberFormats[t]||{})},$t.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},$t.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,w(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},$t.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},$t.prototype._getNumberFormatter=function(t,e,n,r,a,i){for(var o=e,s=r[o],l=this._getLocaleChain(e,n),c=0;c<l.length;c++){var u=l[c];if(s=r[u],o=u,!p(s)&&!p(s[a]))break}if(p(s)||p(s[a]))return null;var f,h=s[a];if(i)f=new Intl.NumberFormat(o,Object.assign({},h,i));else{var m=o+"__"+a;f=this._numberFormatters[m],f||(f=this._numberFormatters[m]=new Intl.NumberFormat(o,h))}return f},$t.prototype._n=function(t,e,n,r){if(!$t.availabilities.numberFormat)return"";if(!n){var a=r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e);return a.format(t)}var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),o=i&&i.format(t);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},r))}return o||""},$t.prototype.n=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var a=this.locale,i=null,o=null;return 1===e.length?c(e[0])?i=e[0]:s(e[0])&&(e[0].locale&&(a=e[0].locale),e[0].key&&(i=e[0].key),o=Object.keys(e[0]).reduce((function(t,n){var a;return d(r,n)?Object.assign({},t,(a={},a[n]=e[0][n],a)):t}),null)):2===e.length&&(c(e[0])&&(i=e[0]),c(e[1])&&(a=e[1])),this._n(t,a,i,o)},$t.prototype._ntp=function(t,e,n,r){if(!$t.availabilities.numberFormat)return[];if(!n){var a=r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e);return a.formatToParts(t)}var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),o=i&&i.formatToParts(t);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return o||[]},Object.defineProperties($t.prototype,Ct),Object.defineProperty($t,"availabilities",{get:function(){if(!vt){var t="undefined"!==typeof Intl;vt={dateTimeFormat:t&&"undefined"!==typeof Intl.DateTimeFormat,numberFormat:t&&"undefined"!==typeof Intl.NumberFormat}}return vt}}),$t.install=z,$t.version="8.22.1",e["a"]=$t}}]); //# sourceMappingURL=wvc.umd.min.0.js.map