You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
181 KiB

5 years ago
!function(c,M){"use strict";"object"==typeof module&&module.exports?module.exports=M(require("moment")):"function"==typeof define&&define.amd?define(["moment"],M):M(c.moment)}(this,function(b){"use strict";var M,p={},n={},O={},q={};b&&"string"==typeof b.version||E("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var c=b.version.split("."),z=+c[0],A=+c[1];function a(c){return 96<c?c-87:64<c?c-29:c-48}function o(c){var M=0,z=c.split("."),A=z[0],o=z[1]||"",b=1,p=0,n=1;for(45===c.charCodeAt(0)&&(n=-(M=1));M<A.length;M++)p=60*p+a(A.charCodeAt(M));for(M=0;M<o.length;M++)b/=60,p+=a(o.charCodeAt(M))*b;return p*n}function L(c){for(var M=0;M<c.length;M++)c[M]=o(c[M])}function N(c,M){var z,A=[];for(z=0;z<M.length;z++)A[z]=c[M[z]];return A}function i(c){var M=c.split("|"),z=M[2].split(" "),A=M[3].split(""),o=M[4].split(" ");return L(z),L(A),L(o),function(c,M){for(var z=0;z<M;z++)c[z]=Math.round((c[z-1]||0)+6e4*c[z]);c[M-1]=1/0}(o,A.length),{name:M[0],abbrs:N(M[1].split(" "),A),offsets:N(z,A),untils:o,population:0|M[5]}}function W(c){c&&this._set(i(c))}function e(c){var M=c.toTimeString(),z=M.match(/\([a-z ]+\)/i);"GMT"===(z=z&&z[0]?(z=z[0].match(/[A-Z]/g))?z.join(""):void 0:(z=M.match(/[A-Z]{3,5}/g))?z[0]:void 0)&&(z=void 0),this.at=+c,this.abbr=z,this.offset=c.getTimezoneOffset()}function d(c){this.zone=c,this.offsetScore=0,this.abbrScore=0}function X(c,M){for(var z,A;A=6e4*((M.at-c.at)/12e4|0);)(z=new e(new Date(c.at+A))).offset===c.offset?c=z:M=z;return c}function f(c,M){return c.offsetScore!==M.offsetScore?c.offsetScore-M.offsetScore:c.abbrScore!==M.abbrScore?c.abbrScore-M.abbrScore:c.zone.population!==M.zone.population?M.zone.population-c.zone.population:M.zone.name.localeCompare(c.zone.name)}function B(c,M){var z,A;for(L(M),z=0;z<M.length;z++)A=M[z],q[A]=q[A]||{},q[A][c]=!0}function r(){try{var c=Intl.DateTimeFormat().resolvedOptions().timeZone;if(c&&3<c.length){var M=O[T(c)];if(M)return M;E("Moment Timezone found "+c+" from the Intl api, but did not have that data loaded.")}}catch(c){}var z,A,o,b=function(){var c,M,z,A=(new Date).getFullYear()-2,o=new e(new Date(A,0,1)),b=[o];for(z=1;z<48;z++)(M=new e(new Date(A,z,1))).offset!==o.offset&&(c=X(o,M),b.push(c),b.push(new e(new Date(c.at+6e4)))),o=M;for(z=0;z<4;z++)b.push(new e(new Date(A+z,0,1))),b.push(new e(new Date(A+z,6,1)));return b}(),p=b.length,n=function(c){var M,z,A,o=c.length,b={},p=[];for(M=0;M<o;M++)for(z in A=q[c[M].offset]||{})A.hasOwnProperty(z)&&(b[z]=!0);for(M in b)b.hasOwnProperty(M)&&p.push(O[M]);return p}(b),a=[];for(A=0;A<n.length;A++){for(z=new d(u(n[A]),p),o=0;o<p;o++)z.scoreOffsetAt(b[o]);a.push(z)}return a.sort(f),0<a.length?a[0].zone.name:void 0}function T(c){return(c||"").toLowerCase().replace(/\//g,"_")}function l(c){var M,z,A,o;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)o=T(z=(A=c[M].split("|"))[0]),p[o]=c[M],O[o]=z,B(o,A[2].split(" "))}function u(c,M){c=T(c);var z,A=p[c];return A instanceof W?A:"string"==typeof A?(A=new W(A),p[c]=A):n[c]&&M!==u&&(z=u(n[c],u))?((A=p[c]=new W)._set(z),A.name=O[c],A):null}function t(c){var M,z,A,o;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)A=T((z=c[M].split("|"))[0]),o=T(z[1]),n[A]=o,O[A]=z[0],n[o]=A,O[o]=z[1]}function s(c){l(c.zones),t(c.links),R.dataVersion=c.version}function C(c){var M="X"===c._f||"x"===c._f;return!(!c._a||void 0!==c._tzm||M)}function E(c){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(c)}function R(c){var M=Array.prototype.slice.call(arguments,0,-1),z=arguments[arguments.length-1],A=u(z),o=b.utc.apply(null,M);return A&&!b.isMoment(c)&&C(o)&&o.add(A.parse(o),"minutes"),o.tz(z),o}(z<2||2==z&&A<6)&&E("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+b.version+". See momentjs.com"),W.prototype={_set:function(c){this.name=c.name,this.abbrs=c.abbrs,this.untils=c.untils,this.offsets=c.offsets,this.population=c.population},_index:function(c){var M,z=+c,A=this.untils;for(M=0;M<A.length;M++)if(z<A[M])return M},parse:function(c){var M,z,A,o,b=+c,p=this.offsets,n=this.untils,a=n.length-1;for(o=0;