7 lines
49 KiB
JavaScript
7 lines
49 KiB
JavaScript
|
/*!
|
||
|
* vue-i18n v9.2.2
|
||
|
* (c) 2022 kazuya kawaguchi
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
|
var VueI18n=function(e,t){"use strict";const n="undefined"!=typeof window,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,a=e=>r?Symbol(e):e,l=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),o=e=>"number"==typeof e&&isFinite(e),s=e=>"[object RegExp]"===h(e),c=e=>L(e)&&0===Object.keys(e).length;function u(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const i=Object.assign;function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const m=Object.prototype.hasOwnProperty;function p(e,t){return m.call(e,t)}const g=Array.isArray,d=e=>"function"==typeof e,_=e=>"string"==typeof e,v=e=>"boolean"==typeof e,b=e=>null!==e&&"object"==typeof e,k=Object.prototype.toString,h=e=>k.call(e),L=e=>"[object Object]"===h(e),y=15;function T(e,t,n={}){const{domain:r,messages:a,args:l}=n,o=new SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function E(e){throw e}function F(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const N=" ",I="\n",O=String.fromCharCode(8232),R=String.fromCharCode(8233);function C(e){const t=e;let n=0,r=1,a=1,l=0;const o=e=>"\r"===t[e]&&t[e+1]===I,s=e=>t[e]===R,c=e=>t[e]===O,u=e=>o(e)||(e=>t[e]===I)(e)||s(e)||c(e),i=e=>o(e)||s(e)||c(e)?I:t[e];function f(){return l=0,u(n)&&(r++,a=0),o(n)&&n++,n++,a++,t[n]}return{index:()=>n,line:()=>r,column:()=>a,peekOffset:()=>l,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+l),next:f,peek:function(){return o(n+l)&&l++,l++,t[n+l]},reset:function(){n=0,r=1,a=1,l=0},resetPeek:function(e=0){l=e},skipToPeek:function(){const e=n+l;for(;e!==n;)f();l=0}}}const P=void 0;function w(e,t={}){const n=!1!==t.location,r=C(e),a=()=>r.index(),l=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},o=l(),s=a(),c={currentType:14,offset:s,startLoc:o,endLoc:o,lastType:14,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},u=()=>c,{onError:i}=t;function f(e,t,r){e.endLoc=l(),e.currentType=t;const a={type:t};return n&&(a.loc=F(e.startLoc,e.endLoc)),null!=r&&(a.value=r),a}const m=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(l(),"")}function g(e){let t="";for(;e.currentPeek()===N||e.currentPeek()===I;)t+=e.currentPeek(),e.peek();return t}function d(e){const t=g(e);return e.skipToPeek(),t}function _(e){if(e===P)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function v(e,t){const{currentType:n}=t;if(2!==n)return!1;g(e);const r=function(e){if(e===P)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function b(e){g(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const n=(t=!1,r="",a=!1)=>{const l=e.currentPeek();return"{"===l?"%"!==r&&t:"@"!==l&&l?"%"===l?(e.peek(),n(t,"%",!0)):"|"===l?!("%"!==r&&!a)||!(r===N||r===I):l===N?(e.peek(),n(!0,N,a)):l!==I||(e.peek(),n(!0,I,a)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function h(e,t){const n=e.currentChar();return n===P?P:t(n)?(e.next(),n):null}function L(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function y(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function T(e){return h(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function E(e){let t="",n="";for(;t=y(e);)n+=t;return n}function O(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!k(e))break;t+=n,e.next()}else if(n===N||n===I)if(k(e))t+=n,e.next();else{if(b(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function R(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return w(e,t,4);case"U":return w(e,t,6);default:return l(),""}}function w(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=T(e);if(!t){l(),e.currentChar();break}r+=t}return`\\${t}${r}`}function M(e){d(e);const t=p(e,"|");
|