hugo-theme-introduction/assets/vendor/momentjs/moment-timezone-with-data-2012-2022.min.js

1 line
32 KiB
JavaScript
Raw Normal View History

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