annot-server/static/js/libs-annotviz.min.js
author ymh <ymh.work@gmail.com>
Fri, 17 Apr 2015 15:32:19 +0200
changeset 166 fa9e24e46968
parent 130 0a2b4991d48c
permissions -rw-r--r--
pianoroll use ts_server
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
130
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     1
require=function e(t,r,i){function n(s,o){if(!r[s]){if(!t[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return n(r?r:e)},l,l.exports,e,t,r,i)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<i.length;s++)n(i[s]);return n}({lodash:[function(e,t,r){(function(e){(function(){function i(e,t,r){for(var i=(r||0)-1,n=e?e.length:0;++i<n;)if(e[i]===t)return i;return-1}function n(e,t){var r=typeof t;if(e=e.cache,"boolean"==r||null==t)return e[t]?0:-1;"number"!=r&&"string"!=r&&(r="object");var n="number"==r?t:M+t;return e=(e=e[r])&&e[n],"object"==r?e&&i(e,t)>-1?0:-1:e?0:-1}function a(e){var t=this.cache,r=typeof e;if("boolean"==r||null==e)t[e]=!0;else{"number"!=r&&"string"!=r&&(r="object");var i="number"==r?e:M+e,n=t[r]||(t[r]={});"object"==r?(n[i]||(n[i]=[])).push(e):n[i]=!0}}function s(e){return e.charCodeAt(0)}function o(e,t){for(var r=e.criteria,i=t.criteria,n=-1,a=r.length;++n<a;){var s=r[n],o=i[n];if(s!==o){if(s>o||"undefined"==typeof s)return 1;if(o>s||"undefined"==typeof o)return-1}}return e.index-t.index}function h(e){var t=-1,r=e.length,i=e[0],n=e[r/2|0],s=e[r-1];if(i&&"object"==typeof i&&n&&"object"==typeof n&&s&&"object"==typeof s)return!1;var o=d();o["false"]=o["null"]=o["true"]=o.undefined=!1;var h=d();for(h.array=e,h.cache=o,h.push=a;++t<r;)h.push(e[t]);return h}function u(e){return"\\"+K[e]}function l(){return g.pop()||[]}function d(){return y.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function c(e){e.length=0,g.length<T&&g.push(e)}function f(e){var t=e.cache;t&&f(t),e.array=e.cache=e.criteria=e.object=e.number=e.string=e.value=null,y.length<T&&y.push(e)}function _(e,t,r){t||(t=0),"undefined"==typeof r&&(r=e?e.length:0);for(var i=-1,n=r-t||0,a=Array(0>n?0:n);++i<n;)a[i]=e[t+i];return a}function p(e){function t(e){return e&&"object"==typeof e&&!$i(e)&&Fi.call(e,"__wrapped__")?e:new r(e)}function r(e,t){this.__chain__=!!t,this.__wrapped__=e}function a(e){function t(){if(i){var e=_(i);Ri.apply(e,arguments)}if(this instanceof t){var a=y(r.prototype),s=r.apply(a,e||arguments);return Ct(s)?s:a}return r.apply(n,e||arguments)}var r=e[0],i=e[2],n=e[4];return Ki(t,e),t}function g(e,t,r,i,n){if(r){var a=r(e);if("undefined"!=typeof a)return a}var s=Ct(e);if(!s)return e;var o=Yi.call(e);if(!V[o])return e;var h=qi[o];switch(o){case I:case W:return new h(+e);case U:case z:return new h(e);case H:return a=h(e.source,S.exec(e)),a.lastIndex=e.lastIndex,a}var u=$i(e);if(t){var d=!i;i||(i=l()),n||(n=l());for(var f=i.length;f--;)if(i[f]==e)return n[f];a=u?h(e.length):{}}else a=u?_(e):an({},e);return u&&(Fi.call(e,"index")&&(a.index=e.index),Fi.call(e,"input")&&(a.input=e.input)),t?(i.push(e),n.push(a),(u?Kt:hn)(e,function(e,s){a[s]=g(e,t,r,i,n)}),d&&(c(i),c(n)),a):a}function y(e){return Ct(e)?Ii(e):{}}function T(e,t,r){if("function"!=typeof e)return $r;if("undefined"==typeof t||!("prototype"in e))return e;var i=e.__bindData__;if("undefined"==typeof i&&(Ji.funcNames&&(i=!e.name),i=i||!Ji.funcDecomp,!i)){var n=Ai.call(e);Ji.funcNames||(i=!k.test(n)),i||(i=F.test(n),Ki(e,i))}if(i===!1||i!==!0&&1&i[1])return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,i){return e.call(t,r,i)};case 3:return function(r,i,n){return e.call(t,r,i,n)};case 4:return function(r,i,n,a){return e.call(t,r,i,n,a)}}return Rr(e,t)}function K(e){function t(){var e=h?s:this;if(n){var f=_(n);Ri.apply(f,arguments)}if((a||l)&&(f||(f=_(arguments)),a&&Ri.apply(f,a),l&&f.length<o))return i|=16,K([r,d?i:-4&i,f,null,s,o]);if(f||(f=arguments),u&&(r=e[c]),this instanceof t){e=y(r.prototype);var p=r.apply(e,f);return Ct(p)?p:e}return r.apply(e,f)}var r=e[0],i=e[1],n=e[2],a=e[3],s=e[4],o=e[5],h=1&i,u=2&i,l=4&i,d=8&i,c=r;return Ki(t,e),t}function Q(e,t){var r=-1,a=ht(),s=e?e.length:0,o=s>=L&&a===i,u=[];if(o){var l=h(t);l?(a=n,t=l):o=!1}for(;++r<s;){var d=e[r];a(t,d)<0&&u.push(d)}return o&&f(t),u}function Z(e,t,r,i){for(var n=(i||0)-1,a=e?e.length:0,s=[];++n<a;){var o=e[n];if(o&&"object"==typeof o&&"number"==typeof o.length&&($i(o)||ct(o))){t||(o=Z(o,t,r));var h=-1,u=o.length,l=s.length;for(s.length+=u;++h<u;)s[l++]=o[h]}else r||s.push(o)}return s}function et(e,t,r,i,n,a){if(r){var s=r(e,t);if("undefined"!=typeof s)return!!s}if(e===t)return 0!==e||1/e==1/t;var o=typeof e,h=typeof t;if(!(e!==e||e&&J[o]||t&&J[h]))return!1;if(null==e||null==t)return e===t;var u=Yi.call(e),d=Yi.call(t);if(u==O&&(u=N),d==O&&(d=N),u!=d)return!1;switch(u){case I:case W:return+e==+t;case U:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case H:case z:return e==Li(t)}var f=u==j;if(!f){var _=Fi.call(e,"__wrapped__"),p=Fi.call(t,"__wrapped__");if(_||p)return et(_?e.__wrapped__:e,p?t.__wrapped__:t,r,i,n,a);if(u!=N)return!1;var m=e.constructor,g=t.constructor;if(m!=g&&!(kt(m)&&m instanceof m&&kt(g)&&g instanceof g)&&"constructor"in e&&"constructor"in t)return!1}var y=!n;n||(n=l()),a||(a=l());for(var v=n.length;v--;)if(n[v]==e)return a[v]==t;var M=0;if(s=!0,n.push(e),a.push(t),f){if(v=e.length,M=t.length,s=M==v,s||i)for(;M--;){var L=v,T=t[M];if(i)for(;L--&&!(s=et(e[L],T,r,i,n,a)););else if(!(s=et(e[M],T,r,i,n,a)))break}}else on(t,function(t,o,h){return Fi.call(h,o)?(M++,s=Fi.call(e,o)&&et(e[o],t,r,i,n,a)):void 0}),s&&!i&&on(e,function(e,t,r){return Fi.call(r,t)?s=--M>-1:void 0});return n.pop(),a.pop(),y&&(c(n),c(a)),s}function tt(e,t,r,i,n){($i(t)?Kt:hn)(t,function(t,a){var s,o,h=t,u=e[a];if(t&&((o=$i(t))||un(t))){for(var l=i.length;l--;)if(s=i[l]==t){u=n[l];break}if(!s){var d;r&&(h=r(u,t),(d="undefined"!=typeof h)&&(u=h)),d||(u=o?$i(u)?u:[]:un(u)?u:{}),i.push(t),n.push(u),d||tt(u,t,r,i,n)}}else r&&(h=r(u,t),"undefined"==typeof h&&(h=t)),"undefined"!=typeof h&&(u=h);e[a]=u})}function it(e,t){return e+Ci(Xi()*(t-e+1))}function nt(e,t,r){var a=-1,s=ht(),o=e?e.length:0,u=[],d=!t&&o>=L&&s===i,_=r||d?l():u;if(d){var p=h(_);s=n,_=p}for(;++a<o;){var m=e[a],g=r?r(m,a,e):m;(t?!a||_[_.length-1]!==g:s(_,g)<0)&&((r||d)&&_.push(g),u.push(m))}return d?(c(_.array),f(_)):r&&c(_),u}function at(e){return function(r,i,n){var a={};i=t.createCallback(i,n,3);var s=-1,o=r?r.length:0;if("number"==typeof o)for(;++s<o;){var h=r[s];e(a,h,i(h,s,r),r)}else hn(r,function(t,r,n){e(a,t,i(t,r,n),n)});return a}}function st(e,t,r,i,n,s){var o=1&t,h=2&t,u=4&t,l=16&t,d=32&t;if(!h&&!kt(e))throw new Ti;l&&!r.length&&(t&=-17,l=r=!1),d&&!i.length&&(t&=-33,d=i=!1);var c=e&&e.__bindData__;if(c&&c!==!0)return c=_(c),c[2]&&(c[2]=_(c[2])),c[3]&&(c[3]=_(c[3])),!o||1&c[1]||(c[4]=n),!o&&1&c[1]&&(t|=8),!u||4&c[1]||(c[5]=s),l&&Ri.apply(c[2]||(c[2]=[]),r),d&&Oi.apply(c[3]||(c[3]=[]),i),c[1]|=t,st.apply(null,c);var f=1==t||17===t?a:K;return f([e,t,r,i,n,s])}function ot(e){return en[e]}function ht(){var e=(e=t.indexOf)===gr?i:e;return e}function ut(e){return"function"==typeof e&&Di.test(e)}function lt(e){var t,r;return e&&Yi.call(e)==N&&(t=e.constructor,!kt(t)||t instanceof t)?(on(e,function(e,t){r=t}),"undefined"==typeof r||Fi.call(e,r)):!1}function dt(e){return tn[e]}function ct(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Yi.call(e)==O||!1}function ft(e,t,r,i){return"boolean"!=typeof t&&null!=t&&(i=r,r=t,t=!1),g(e,t,"function"==typeof r&&T(r,i,1))}function _t(e,t,r){return g(e,!0,"function"==typeof t&&T(t,r,1))}function pt(e,t){var r=y(e);return t?an(r,t):r}function mt(e,r,i){var n;return r=t.createCallback(r,i,3),hn(e,function(e,t,i){return r(e,t,i)?(n=t,!1):void 0}),n}function gt(e,r,i){var n;return r=t.createCallback(r,i,3),vt(e,function(e,t,i){return r(e,t,i)?(n=t,!1):void 0}),n}function yt(e,t,r){var i=[];on(e,function(e,t){i.push(t,e)});var n=i.length;for(t=T(t,r,3);n--&&t(i[n--],i[n],e)!==!1;);return e}function vt(e,t,r){var i=Zi(e),n=i.length;for(t=T(t,r,3);n--;){var a=i[n];if(t(e[a],a,e)===!1)break}return e}function Mt(e){var t=[];return on(e,function(e,r){kt(e)&&t.push(r)}),t.sort()}function Lt(e,t){return e?Fi.call(e,t):!1}function Tt(e){for(var t=-1,r=Zi(e),i=r.length,n={};++t<i;){var a=r[t];n[e[a]]=a}return n}function bt(e){return e===!0||e===!1||e&&"object"==typeof e&&Yi.call(e)==I||!1}function xt(e){return e&&"object"==typeof e&&Yi.call(e)==W||!1}function wt(e){return e&&1===e.nodeType||!1}function Yt(e){var t=!0;if(!e)return t;var r=Yi.call(e),i=e.length;return r==j||r==z||r==O||r==N&&"number"==typeof i&&kt(e.splice)?!i:(hn(e,function(){return t=!1}),t)}function Dt(e,t,r,i){return et(e,t,"function"==typeof r&&T(r,i,2))}function St(e){return Gi(e)&&!Ui(parseFloat(e))}function kt(e){return"function"==typeof e}function Ct(e){return!(!e||!J[typeof e])}function At(e){return Ft(e)&&e!=+e}function Et(e){return null===e}function Ft(e){return"number"==typeof e||e&&"object"==typeof e&&Yi.call(e)==U||!1}function Rt(e){return e&&"object"==typeof e&&Yi.call(e)==H||!1}function Pt(e){return"string"==typeof e||e&&"object"==typeof e&&Yi.call(e)==z||!1}function Bt(e){return"undefined"==typeof e}function Ot(e,r,i){var n={};return r=t.createCallback(r,i,3),hn(e,function(e,t,i){n[t]=r(e,t,i)}),n}function jt(e){var t=arguments,r=2;if(!Ct(e))return e;if("number"!=typeof t[2]&&(r=t.length),r>3&&"function"==typeof t[r-2])var i=T(t[--r-1],t[r--],2);else r>2&&"function"==typeof t[r-1]&&(i=t[--r]);for(var n=_(arguments,1,r),a=-1,s=l(),o=l();++a<r;)tt(e,n[a],i,s,o);return c(s),c(o),e}function It(e,r,i){var n={};if("function"!=typeof r){var a=[];on(e,function(e,t){a.push(t)}),a=Q(a,Z(arguments,!0,!1,1));for(var s=-1,o=a.length;++s<o;){var h=a[s];n[h]=e[h]}}else r=t.createCallback(r,i,3),on(e,function(e,t,i){r(e,t,i)||(n[t]=e)});return n}function Wt(e){for(var t=-1,r=Zi(e),i=r.length,n=fi(i);++t<i;){var a=r[t];n[t]=[a,e[a]]}return n}function Gt(e,r,i){var n={};if("function"!=typeof r)for(var a=-1,s=Z(arguments,!0,!1,1),o=Ct(e)?s.length:0;++a<o;){var h=s[a];h in e&&(n[h]=e[h])}else r=t.createCallback(r,i,3),on(e,function(e,t,i){r(e,t,i)&&(n[t]=e)});return n}function Ut(e,r,i,n){var a=$i(e);if(null==i)if(a)i=[];else{var s=e&&e.constructor,o=s&&s.prototype;i=y(o)}return r&&(r=t.createCallback(r,n,4),(a?Kt:hn)(e,function(e,t,n){return r(i,e,t,n)})),i}function Nt(e){for(var t=-1,r=Zi(e),i=r.length,n=fi(i);++t<i;)n[t]=e[r[t]];return n}function Ht(e){for(var t=arguments,r=-1,i=Z(t,!0,!1,1),n=t[2]&&t[2][t[1]]===e?1:i.length,a=fi(n);++r<n;)a[r]=e[i[r]];return a}function zt(e,t,r){var i=-1,n=ht(),a=e?e.length:0,s=!1;return r=(0>r?Hi(0,a+r):r)||0,$i(e)?s=n(e,t,r)>-1:"number"==typeof a?s=(Pt(e)?e.indexOf(t,r):n(e,t,r))>-1:hn(e,function(e){return++i>=r?!(s=e===t):void 0}),s}function Vt(e,r,i){var n=!0;r=t.createCallback(r,i,3);var a=-1,s=e?e.length:0;if("number"==typeof s)for(;++a<s&&(n=!!r(e[a],a,e)););else hn(e,function(e,t,i){return n=!!r(e,t,i)});return n}function Xt(e,r,i){var n=[];r=t.createCallback(r,i,3);var a=-1,s=e?e.length:0;if("number"==typeof s)for(;++a<s;){var o=e[a];r(o,a,e)&&n.push(o)}else hn(e,function(e,t,i){r(e,t,i)&&n.push(e)});return n}function qt(e,r,i){r=t.createCallback(r,i,3);var n=-1,a=e?e.length:0;if("number"!=typeof a){var s;return hn(e,function(e,t,i){return r(e,t,i)?(s=e,!1):void 0}),s}for(;++n<a;){var o=e[n];if(r(o,n,e))return o}}function Jt(e,r,i){var n;return r=t.createCallback(r,i,3),$t(e,function(e,t,i){return r(e,t,i)?(n=e,!1):void 0}),n}function Kt(e,t,r){var i=-1,n=e?e.length:0;if(t=t&&"undefined"==typeof r?t:T(t,r,3),"number"==typeof n)for(;++i<n&&t(e[i],i,e)!==!1;);else hn(e,t);return e}function $t(e,t,r){var i=e?e.length:0;if(t=t&&"undefined"==typeof r?t:T(t,r,3),"number"==typeof i)for(;i--&&t(e[i],i,e)!==!1;);else{var n=Zi(e);i=n.length,hn(e,function(e,r,a){return r=n?n[--i]:--i,t(a[r],r,a)})}return e}function Qt(e,t){var r=_(arguments,2),i=-1,n="function"==typeof t,a=e?e.length:0,s=fi("number"==typeof a?a:0);return Kt(e,function(e){s[++i]=(n?t:e[t]).apply(e,r)}),s}function Zt(e,r,i){var n=-1,a=e?e.length:0;if(r=t.createCallback(r,i,3),"number"==typeof a)for(var s=fi(a);++n<a;)s[n]=r(e[n],n,e);else s=[],hn(e,function(e,t,i){s[++n]=r(e,t,i)});return s}function er(e,r,i){var n=-1/0,a=n;if("function"!=typeof r&&i&&i[r]===e&&(r=null),null==r&&$i(e))for(var o=-1,h=e.length;++o<h;){var u=e[o];u>a&&(a=u)}else r=null==r&&Pt(e)?s:t.createCallback(r,i,3),Kt(e,function(e,t,i){var s=r(e,t,i);s>n&&(n=s,a=e)});return a}function tr(e,r,i){var n=1/0,a=n;if("function"!=typeof r&&i&&i[r]===e&&(r=null),null==r&&$i(e))for(var o=-1,h=e.length;++o<h;){var u=e[o];a>u&&(a=u)}else r=null==r&&Pt(e)?s:t.createCallback(r,i,3),Kt(e,function(e,t,i){var s=r(e,t,i);n>s&&(n=s,a=e)});return a}function rr(e,r,i,n){if(!e)return i;var a=arguments.length<3;r=t.createCallback(r,n,4);var s=-1,o=e.length;if("number"==typeof o)for(a&&(i=e[++s]);++s<o;)i=r(i,e[s],s,e);else hn(e,function(e,t,n){i=a?(a=!1,e):r(i,e,t,n)});return i}function ir(e,r,i,n){var a=arguments.length<3;return r=t.createCallback(r,n,4),$t(e,function(e,t,n){i=a?(a=!1,e):r(i,e,t,n)}),i}function nr(e,r,i){return r=t.createCallback(r,i,3),Xt(e,function(e,t,i){return!r(e,t,i)})}function ar(e,t,r){if(e&&"number"!=typeof e.length&&(e=Nt(e)),null==t||r)return e?e[it(0,e.length-1)]:m;var i=sr(e);return i.length=zi(Hi(0,t),i.length),i}function sr(e){var t=-1,r=e?e.length:0,i=fi("number"==typeof r?r:0);return Kt(e,function(e){var r=it(0,++t);i[t]=i[r],i[r]=e}),i}function or(e){var t=e?e.length:0;return"number"==typeof t?t:Zi(e).length}function hr(e,r,i){var n;r=t.createCallback(r,i,3);var a=-1,s=e?e.length:0;if("number"==typeof s)for(;++a<s&&!(n=r(e[a],a,e)););else hn(e,function(e,t,i){return!(n=r(e,t,i))});return!!n}function ur(e,r,i){var n=-1,a=$i(r),s=e?e.length:0,h=fi("number"==typeof s?s:0);for(a||(r=t.createCallback(r,i,3)),Kt(e,function(e,t,i){var s=h[++n]=d();a?s.criteria=Zt(r,function(t){return e[t]}):(s.criteria=l())[0]=r(e,t,i),s.index=n,s.value=e}),s=h.length,h.sort(o);s--;){var u=h[s];h[s]=u.value,a||c(u.criteria),f(u)}return h}function lr(e){return e&&"number"==typeof e.length?_(e):Nt(e)}function dr(e){for(var t=-1,r=e?e.length:0,i=[];++t<r;){var n=e[t];n&&i.push(n)}return i}function cr(e){return Q(e,Z(arguments,!0,!0,1))}function fr(e,r,i){var n=-1,a=e?e.length:0;for(r=t.createCallback(r,i,3);++n<a;)if(r(e[n],n,e))return n;return-1}function _r(e,r,i){var n=e?e.length:0;for(r=t.createCallback(r,i,3);n--;)if(r(e[n],n,e))return n;return-1}function pr(e,r,i){var n=0,a=e?e.length:0;if("number"!=typeof r&&null!=r){var s=-1;for(r=t.createCallback(r,i,3);++s<a&&r(e[s],s,e);)n++}else if(n=r,null==n||i)return e?e[0]:m;return _(e,0,zi(Hi(0,n),a))}function mr(e,t,r,i){return"boolean"!=typeof t&&null!=t&&(i=r,r="function"!=typeof t&&i&&i[t]===e?null:t,t=!1),null!=r&&(e=Zt(e,r,i)),Z(e,t)}function gr(e,t,r){if("number"==typeof r){var n=e?e.length:0;r=0>r?Hi(0,n+r):r||0}else if(r){var a=Yr(e,t);return e[a]===t?a:-1}return i(e,t,r)}function yr(e,r,i){var n=0,a=e?e.length:0;if("number"!=typeof r&&null!=r){var s=a;for(r=t.createCallback(r,i,3);s--&&r(e[s],s,e);)n++}else n=null==r||i?1:r||n;return _(e,0,zi(Hi(0,a-n),a))}function vr(){for(var e=[],t=-1,r=arguments.length,a=l(),s=ht(),o=s===i,u=l();++t<r;){var d=arguments[t];($i(d)||ct(d))&&(e.push(d),a.push(o&&d.length>=L&&h(t?e[t]:u)))}var _=e[0],p=-1,m=_?_.length:0,g=[];e:for(;++p<m;){var y=a[0];if(d=_[p],(y?n(y,d):s(u,d))<0){for(t=r,(y||u).push(d);--t;)if(y=a[t],(y?n(y,d):s(e[t],d))<0)continue e;g.push(d)}}for(;r--;)y=a[r],y&&f(y);return c(a),c(u),g}function Mr(e,r,i){var n=0,a=e?e.length:0;if("number"!=typeof r&&null!=r){var s=a;for(r=t.createCallback(r,i,3);s--&&r(e[s],s,e);)n++}else if(n=r,null==n||i)return e?e[a-1]:m;return _(e,Hi(0,a-n))}function Lr(e,t,r){var i=e?e.length:0;for("number"==typeof r&&(i=(0>r?Hi(0,i+r):zi(r,i-1))+1);i--;)if(e[i]===t)return i;return-1}function Tr(e){for(var t=arguments,r=0,i=t.length,n=e?e.length:0;++r<i;)for(var a=-1,s=t[r];++a<n;)e[a]===s&&(Bi.call(e,a--,1),n--);return e}function br(e,t,r){e=+e||0,r="number"==typeof r?r:+r||1,null==t&&(t=e,e=0);for(var i=-1,n=Hi(0,Si((t-e)/(r||1))),a=fi(n);++i<n;)a[i]=e,e+=r;return a}function xr(e,r,i){var n=-1,a=e?e.length:0,s=[];for(r=t.createCallback(r,i,3);++n<a;){var o=e[n];r(o,n,e)&&(s.push(o),Bi.call(e,n--,1),a--)}return s}function wr(e,r,i){if("number"!=typeof r&&null!=r){var n=0,a=-1,s=e?e.length:0;for(r=t.createCallback(r,i,3);++a<s&&r(e[a],a,e);)n++}else n=null==r||i?1:Hi(0,r);return _(e,n)}function Yr(e,r,i,n){var a=0,s=e?e.length:a;for(i=i?t.createCallback(i,n,1):$r,r=i(r);s>a;){var o=a+s>>>1;i(e[o])<r?a=o+1:s=o}return a}function Dr(){return nt(Z(arguments,!0,!0))}function Sr(e,r,i,n){return"boolean"!=typeof r&&null!=r&&(n=i,i="function"!=typeof r&&n&&n[r]===e?null:r,r=!1),null!=i&&(i=t.createCallback(i,n,3)),nt(e,r,i)}function kr(e){return Q(e,_(arguments,1))}function Cr(){for(var e=-1,t=arguments.length;++e<t;){var r=arguments[e];if($i(r)||ct(r))var i=i?nt(Q(i,r).concat(Q(r,i))):r}return i||[]}function Ar(){for(var e=arguments.length>1?arguments:arguments[0],t=-1,r=e?er(fn(e,"length")):0,i=fi(0>r?0:r);++t<r;)i[t]=fn(e,t);return i}function Er(e,t){var r=-1,i=e?e.length:0,n={};for(t||!i||$i(e[0])||(t=[]);++r<i;){var a=e[r];t?n[a]=t[r]:a&&(n[a[0]]=a[1])}return n}function Fr(e,t){if(!kt(t))throw new Ti;return function(){return--e<1?t.apply(this,arguments):void 0}}function Rr(e,t){return arguments.length>2?st(e,17,_(arguments,2),null,t):st(e,1,null,null,t)}function Pr(e){for(var t=arguments.length>1?Z(arguments,!0,!1,1):Mt(e),r=-1,i=t.length;++r<i;){var n=t[r];e[n]=st(e[n],1,null,null,e)}return e}function Br(e,t){return arguments.length>2?st(t,19,_(arguments,2),null,e):st(t,3,null,null,e)}function Or(){for(var e=arguments,t=e.length;t--;)if(!kt(e[t]))throw new Ti;return function(){for(var t=arguments,r=e.length;r--;)t=[e[r].apply(this,t)];return t[0]}}function jr(e,t){return t="number"==typeof t?t:+t||e.length,st(e,4,null,null,null,t)}function Ir(e,t,r){var i,n,a,s,o,h,u,l=0,d=!1,c=!0;if(!kt(e))throw new Ti;if(t=Hi(0,t)||0,r===!0){var f=!0;c=!1}else Ct(r)&&(f=r.leading,d="maxWait"in r&&(Hi(t,r.maxWait)||0),c="trailing"in r?r.trailing:c);var _=function(){var r=t-(pn()-s);if(0>=r){n&&ki(n);var d=u;n=h=u=m,d&&(l=pn(),a=e.apply(o,i),h||n||(i=o=null))}else h=Pi(_,r)},p=function(){h&&ki(h),n=h=u=m,(c||d!==t)&&(l=pn(),a=e.apply(o,i),h||n||(i=o=null))};return function(){if(i=arguments,s=pn(),o=this,u=c&&(h||!f),d===!1)var r=f&&!h;else{n||f||(l=s);var m=d-(s-l),g=0>=m;g?(n&&(n=ki(n)),l=s,a=e.apply(o,i)):n||(n=Pi(p,m))}return g&&h?h=ki(h):h||t===d||(h=Pi(_,t)),r&&(g=!0,a=e.apply(o,i)),!g||h||n||(i=o=null),a}}function Wr(e){if(!kt(e))throw new Ti;var t=_(arguments,1);return Pi(function(){e.apply(m,t)},1)}function Gr(e,t){if(!kt(e))throw new Ti;var r=_(arguments,2);return Pi(function(){e.apply(m,r)},t)}function Ur(e,t){if(!kt(e))throw new Ti;var r=function(){var i=r.cache,n=t?t.apply(this,arguments):M+arguments[0];return Fi.call(i,n)?i[n]:i[n]=e.apply(this,arguments)};return r.cache={},r}function Nr(e){var t,r;if(!kt(e))throw new Ti;return function(){return t?r:(t=!0,r=e.apply(this,arguments),e=null,r)}}function Hr(e){return st(e,16,_(arguments,1))}function zr(e){return st(e,32,null,_(arguments,1))}function Vr(e,t,r){var i=!0,n=!0;if(!kt(e))throw new Ti;return r===!1?i=!1:Ct(r)&&(i="leading"in r?r.leading:i,n="trailing"in r?r.trailing:n),X.leading=i,X.maxWait=t,X.trailing=n,Ir(e,t,X)}function Xr(e,t){return st(t,16,[e])}function qr(e){return function(){return e}}function Jr(e,t,r){var i=typeof e;if(null==e||"function"==i)return T(e,t,r);if("object"!=i)return ti(e);var n=Zi(e),a=n[0],s=e[a];return 1!=n.length||s!==s||Ct(s)?function(t){for(var r=n.length,i=!1;r--&&(i=et(t[n[r]],e[n[r]],null,!0)););return i}:function(e){var t=e[a];return s===t&&(0!==s||1/s==1/t)}}function Kr(e){return null==e?"":Li(e).replace(nn,ot)}function $r(e){return e}function Qr(e,i,n){var a=!0,s=i&&Mt(i);i&&(n||s.length)||(null==n&&(n=i),o=r,i=e,e=t,s=Mt(i)),n===!1?a=!1:Ct(n)&&"chain"in n&&(a=n.chain);var o=e,h=kt(o);Kt(s,function(t){var r=e[t]=i[t];h&&(o.prototype[t]=function(){var t=this.__chain__,i=this.__wrapped__,n=[i];Ri.apply(n,arguments);var s=r.apply(e,n);if(a||t){if(i===s&&Ct(s))return this;s=new o(s),s.__chain__=t}return s})})}function Zr(){return e._=wi,this}function ei(){}function ti(e){return function(t){return t[e]}}function ri(e,t,r){var i=null==e,n=null==t;if(null==r&&("boolean"==typeof e&&n?(r=e,e=1):n||"boolean"!=typeof t||(r=t,n=!0)),i&&n&&(t=1),e=+e||0,n?(t=e,e=0):t=+t||0,r||e%1||t%1){var a=Xi();return zi(e+a*(t-e+parseFloat("1e-"+((a+"").length-1))),t)}return it(e,t)}function ii(e,t){if(e){var r=e[t];return kt(r)?e[t]():r}}function ni(e,r,i){var n=t.templateSettings;e=Li(e||""),i=sn({},i,n);var a,s=sn({},i.imports,n.imports),o=Zi(s),h=Nt(s),l=0,d=i.interpolate||E,c="__p += '",f=Mi((i.escape||E).source+"|"+d.source+"|"+(d===C?D:E).source+"|"+(i.evaluate||E).source+"|$","g");e.replace(f,function(t,r,i,n,s,o){return i||(i=n),c+=e.slice(l,o).replace(R,u),r&&(c+="' +\n__e("+r+") +\n'"),s&&(a=!0,c+="';\n"+s+";\n__p += '"),i&&(c+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),l=o+t.length,t}),c+="';\n";var _=i.variable,p=_;p||(_="obj",c="with ("+_+") {\n"+c+"\n}\n"),c=(a?c.replace(x,""):c).replace(w,"$1").replace(Y,"$1;"),c="function("+_+") {\n"+(p?"":_+" || ("+_+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+c+"return __p\n}";var g="\n/*\n//# sourceURL="+(i.sourceURL||"/lodash/template/source["+B++ +"]")+"\n*/";try{var y=mi(o,"return "+c+g).apply(m,h)}catch(v){throw v.source=c,v}return r?y(r):(y.source=c,y)}function ai(e,t,r){e=(e=+e)>-1?e:0;var i=-1,n=fi(e);for(t=T(t,r,1);++i<e;)n[i]=t(i);return n}function si(e){return null==e?"":Li(e).replace(rn,dt)}function oi(e){var t=++v;return Li(null==e?"":e)+t}function hi(e){return e=new r(e),e.__chain__=!0,e}function ui(e,t){return t(e),e}function li(){return this.__chain__=!0,this}function di(){return Li(this.__wrapped__)}function ci(){return this.__wrapped__}e=e?rt.defaults($.Object(),e,rt.pick($,P)):$;var fi=e.Array,_i=e.Boolean,pi=e.Date,mi=e.Function,gi=e.Math,yi=e.Number,vi=e.Object,Mi=e.RegExp,Li=e.String,Ti=e.TypeError,bi=[],xi=vi.prototype,wi=e._,Yi=xi.toString,Di=Mi("^"+Li(Yi).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Si=gi.ceil,ki=e.clearTimeout,Ci=gi.floor,Ai=mi.prototype.toString,Ei=ut(Ei=vi.getPrototypeOf)&&Ei,Fi=xi.hasOwnProperty,Ri=bi.push,Pi=e.setTimeout,Bi=bi.splice,Oi=bi.unshift,ji=function(){try{var e={},t=ut(t=vi.defineProperty)&&t,r=t(e,e,e)&&t}catch(i){}return r}(),Ii=ut(Ii=vi.create)&&Ii,Wi=ut(Wi=fi.isArray)&&Wi,Gi=e.isFinite,Ui=e.isNaN,Ni=ut(Ni=vi.keys)&&Ni,Hi=gi.max,zi=gi.min,Vi=e.parseInt,Xi=gi.random,qi={};qi[j]=fi,qi[I]=_i,qi[W]=pi,qi[G]=mi,qi[N]=vi,qi[U]=yi,qi[H]=Mi,qi[z]=Li,r.prototype=t.prototype;var Ji=t.support={};Ji.funcDecomp=!ut(e.WinRTError)&&F.test(p),Ji.funcNames="string"==typeof mi.name,t.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:C,variable:"",imports:{_:t}},Ii||(y=function(){function t(){}return function(r){if(Ct(r)){t.prototype=r;var i=new t;t.prototype=null}return i||e.Object()}}());var Ki=ji?function(e,t){q.value=t,ji(e,"__bindData__",q)}:ei,$i=Wi||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Yi.call(e)==j||!1},Qi=function(e){var t,r=e,i=[];if(!r)return i;if(!J[typeof e])return i;for(t in r)Fi.call(r,t)&&i.push(t);return i},Zi=Ni?function(e){return Ct(e)?Ni(e):[]}:Qi,en={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tn=Tt(en),rn=Mi("("+Zi(tn).join("|")+")","g"),nn=Mi("["+Zi(en).join("")+"]","g"),an=function(e,t,r){var i,n=e,a=n;if(!n)return a;var s=arguments,o=0,h="number"==typeof r?2:s.length;if(h>3&&"function"==typeof s[h-2])var u=T(s[--h-1],s[h--],2);else h>2&&"function"==typeof s[h-1]&&(u=s[--h]);for(;++o<h;)if(n=s[o],n&&J[typeof n])for(var l=-1,d=J[typeof n]&&Zi(n),c=d?d.length:0;++l<c;)i=d[l],a[i]=u?u(a[i],n[i]):n[i];return a},sn=function(e,t,r){var i,n=e,a=n;if(!n)return a;for(var s=arguments,o=0,h="number"==typeof r?2:s.length;++o<h;)if(n=s[o],n&&J[typeof n])for(var u=-1,l=J[typeof n]&&Zi(n),d=l?l.length:0;++u<d;)i=l[u],"undefined"==typeof a[i]&&(a[i]=n[i]);return a},on=function(e,t,r){var i,n=e,a=n;if(!n)return a;if(!J[typeof n])return a;t=t&&"undefined"==typeof r?t:T(t,r,3);for(i in n)if(t(n[i],i,e)===!1)return a;return a},hn=function(e,t,r){var i,n=e,a=n;if(!n)return a;if(!J[typeof n])return a;t=t&&"undefined"==typeof r?t:T(t,r,3);for(var s=-1,o=J[typeof n]&&Zi(n),h=o?o.length:0;++s<h;)if(i=o[s],t(n[i],i,e)===!1)return a;return a},un=Ei?function(e){if(!e||Yi.call(e)!=N)return!1;var t=e.valueOf,r=ut(t)&&(r=Ei(t))&&Ei(r);return r?e==r||Ei(e)==r:lt(e)}:lt,ln=at(function(e,t,r){Fi.call(e,r)?e[r]++:e[r]=1}),dn=at(function(e,t,r){(Fi.call(e,r)?e[r]:e[r]=[]).push(t)}),cn=at(function(e,t,r){e[r]=t}),fn=Zt,_n=Xt,pn=ut(pn=pi.now)&&pn||function(){return(new pi).getTime()},mn=8==Vi(b+"08")?Vi:function(e,t){return Vi(Pt(e)?e.replace(A,""):e,t||0)};return t.after=Fr,t.assign=an,t.at=Ht,t.bind=Rr,t.bindAll=Pr,t.bindKey=Br,t.chain=hi,t.compact=dr,t.compose=Or,t.constant=qr,t.countBy=ln,t.create=pt,t.createCallback=Jr,t.curry=jr,t.debounce=Ir,t.defaults=sn,t.defer=Wr,t.delay=Gr,t.difference=cr,t.filter=Xt,t.flatten=mr,t.forEach=Kt,t.forEachRight=$t,t.forIn=on,t.forInRight=yt,t.forOwn=hn,t.forOwnRight=vt,t.functions=Mt,t.groupBy=dn,t.indexBy=cn,t.initial=yr,t.intersection=vr,t.invert=Tt,t.invoke=Qt,t.keys=Zi,t.map=Zt,t.mapValues=Ot,t.max=er,t.memoize=Ur,t.merge=jt,t.min=tr,t.omit=It,t.once=Nr,t.pairs=Wt,t.partial=Hr,t.partialRight=zr,t.pick=Gt,t.pluck=fn,t.property=ti,t.pull=Tr,t.range=br,t.reject=nr,t.remove=xr,t.rest=wr,t.shuffle=sr,t.sortBy=ur,t.tap=ui,t.throttle=Vr,t.times=ai,t.toArray=lr,t.transform=Ut,t.union=Dr,t.uniq=Sr,t.values=Nt,t.where=_n,t.without=kr,t.wrap=Xr,t.xor=Cr,t.zip=Ar,t.zipObject=Er,t.collect=Zt,t.drop=wr,t.each=Kt,t.eachRight=$t,t.extend=an,t.methods=Mt,t.object=Er,t.select=Xt,t.tail=wr,t.unique=Sr,t.unzip=Ar,Qr(t),t.clone=ft,t.cloneDeep=_t,t.contains=zt,t.escape=Kr,t.every=Vt,t.find=qt,t.findIndex=fr,t.findKey=mt,t.findLast=Jt,t.findLastIndex=_r,t.findLastKey=gt,t.has=Lt,t.identity=$r,t.indexOf=gr,t.isArguments=ct,t.isArray=$i,t.isBoolean=bt,t.isDate=xt,t.isElement=wt,t.isEmpty=Yt,t.isEqual=Dt,t.isFinite=St,t.isFunction=kt,t.isNaN=At,t.isNull=Et,t.isNumber=Ft,t.isObject=Ct,t.isPlainObject=un,t.isRegExp=Rt,t.isString=Pt,t.isUndefined=Bt,t.lastIndexOf=Lr,t.mixin=Qr,t.noConflict=Zr,t.noop=ei,t.now=pn,t.parseInt=mn,t.random=ri,t.reduce=rr,t.reduceRight=ir,t.result=ii,t.runInContext=p,t.size=or,t.some=hr,t.sortedIndex=Yr,t.template=ni,t.unescape=si,t.uniqueId=oi,t.all=Vt,t.any=hr,t.detect=qt,t.findWhere=qt,t.foldl=rr,t.foldr=ir,t.include=zt,t.inject=rr,Qr(function(){var e={};return hn(t,function(r,i){t.prototype[i]||(e[i]=r)}),e}(),!1),t.first=pr,t.last=Mr,t.sample=ar,t.take=pr,t.head=pr,hn(t,function(e,i){var n="sample"!==i;t.prototype[i]||(t.prototype[i]=function(t,i){var a=this.__chain__,s=e(this.__wrapped__,t,i);return a||null!=t&&(!i||n&&"function"==typeof t)?new r(s,a):s})}),t.VERSION="2.4.1",t.prototype.chain=li,t.prototype.toString=di,t.prototype.value=ci,t.prototype.valueOf=ci,Kt(["join","pop","shift"],function(e){var i=bi[e];t.prototype[e]=function(){var e=this.__chain__,t=i.apply(this.__wrapped__,arguments);return e?new r(t,e):t}}),Kt(["push","reverse","sort","unshift"],function(e){var r=bi[e];t.prototype[e]=function(){return r.apply(this.__wrapped__,arguments),this}}),Kt(["concat","slice","splice"],function(e){var i=bi[e];t.prototype[e]=function(){return new r(i.apply(this.__wrapped__,arguments),this.__chain__)}}),t}var m,g=[],y=[],v=0,M=+new Date+"",L=75,T=40,b=" 	\f \n\r\u2028\u2029 ᠎              ",x=/\b__p \+= '';/g,w=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,D=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,k=/^\s*function[ \n\r\t]+\w/,C=/<%=([\s\S]+?)%>/g,A=RegExp("^["+b+"]*0+(?=.$)"),E=/($^)/,F=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,P=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],B=0,O="[object Arguments]",j="[object Array]",I="[object Boolean]",W="[object Date]",G="[object Function]",U="[object Number]",N="[object Object]",H="[object RegExp]",z="[object String]",V={};V[G]=!1,V[O]=V[j]=V[I]=V[W]=V[U]=V[N]=V[H]=V[z]=!0;var X={leading:!1,maxWait:0,trailing:!1},q={configurable:!1,enumerable:!1,value:null,writable:!1},J={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},K={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},$=J[typeof window]&&window||this,Q=J[typeof r]&&r&&!r.nodeType&&r,Z=J[typeof t]&&t&&!t.nodeType&&t,et=Z&&Z.exports===Q&&Q,tt=J[typeof e]&&e;!tt||tt.global!==tt&&tt.window!==tt||($=tt);var rt=p();"function"==typeof define&&"object"==typeof define.amd&&define.amd?($._=rt,define(function(){return rt})):Q&&Z?et?(Z.exports=rt)._=rt:Q._=rt:$._=rt}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],moment:[function(e,t){(function(r){(function(i){function n(e,t,r){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:r;default:throw new Error("Implement me")}}function a(e,t){return Ct.call(e,t)}function s(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function o(e){xt.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function h(e,t){var r=!0;return g(function(){return r&&(o(e),r=!1),t.apply(this,arguments)},t)}function u(e,t){Lr[e]||(o(t),Lr[e]=!0)}function l(e,t){return function(r){return M(e.call(this,r),t)}}function d(e,t){return function(r){return this.localeData().ordinal(e.call(this,r),t)}}function c(e,t){var r,i,n=12*(t.year()-e.year())+(t.month()-e.month()),a=e.clone().add(n,"months");return 0>t-a?(r=e.clone().add(n-1,"months"),i=(t-a)/(a-r)):(r=e.clone().add(n+1,"months"),i=(t-a)/(r-a)),-(n+i)}function f(e,t,r){var i;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?(i=e.isPM(r),i&&12>t&&(t+=12),i||12!==t||(t=0),t):t}function _(){}function p(e,t){t!==!1&&B(e),y(this,e),this._d=new Date(+e._d),br===!1&&(br=!0,xt.updateOffset(this),br=!1)}function m(e){var t=k(e),r=t.year||0,i=t.quarter||0,n=t.month||0,a=t.week||0,s=t.day||0,o=t.hour||0,h=t.minute||0,u=t.second||0,l=t.millisecond||0;this._milliseconds=+l+1e3*u+6e4*h+36e5*o,this._days=+s+7*a,this._months=+n+3*i+12*r,this._data={},this._locale=xt.localeData(),this._bubble()}function g(e,t){for(var r in t)a(t,r)&&(e[r]=t[r]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t){var r,i,n;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=t._pf),"undefined"!=typeof t._locale&&(e._locale=t._locale),It.length>0)for(r in It)i=It[r],n=t[i],"undefined"!=typeof n&&(e[i]=n);return e}function v(e){return 0>e?Math.ceil(e):Math.floor(e)}function M(e,t,r){for(var i=""+Math.abs(e),n=e>=0;i.length<t;)i="0"+i;return(n?r?"+":"":"-")+i}function L(e,t){var r={milliseconds:0,months:0};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function T(e,t){var r;return t=G(t,e),e.isBefore(t)?r=L(e,t):(r=L(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r}function b(e,t){return function(r,i){var n,a;return null===i||isNaN(+i)||(u(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),a=r,r=i,i=a),r="string"==typeof r?+r:r,n=xt.duration(r,i),x(this,n,e),this
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     2
}}function x(e,t,r,i){var n=t._milliseconds,a=t._days,s=t._months;i=null==i?!0:i,n&&e._d.setTime(+e._d+n*r),a&&yt(e,"Date",gt(e,"Date")+a*r),s&&mt(e,gt(e,"Month")+s*r),i&&xt.updateOffset(e,a||s)}function w(e){return"[object Array]"===Object.prototype.toString.call(e)}function Y(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function D(e,t,r){var i,n=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),s=0;for(i=0;n>i;i++)(r&&e[i]!==t[i]||!r&&A(e[i])!==A(t[i]))&&s++;return s+a}function S(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=_r[e]||pr[t]||t}return e}function k(e){var t,r,i={};for(r in e)a(e,r)&&(t=S(r),t&&(i[t]=e[r]));return i}function C(e){var t,r;if(0===e.indexOf("week"))t=7,r="day";else{if(0!==e.indexOf("month"))return;t=12,r="month"}xt[e]=function(n,a){var s,o,h=xt._locale[e],u=[];if("number"==typeof n&&(a=n,n=i),o=function(e){var t=xt().utc().set(r,e);return h.call(xt._locale,t,n||"")},null!=a)return o(a);for(s=0;t>s;s++)u.push(o(s));return u}}function A(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=t>=0?Math.floor(t):Math.ceil(t)),r}function E(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function F(e,t,r){return ct(xt([e,11,31+t-r]),t,r).week}function R(e){return P(e)?366:365}function P(e){return e%4===0&&e%100!==0||e%400===0}function B(e){var t;e._a&&-2===e._pf.overflow&&(t=e._a[Et]<0||e._a[Et]>11?Et:e._a[Ft]<1||e._a[Ft]>E(e._a[At],e._a[Et])?Ft:e._a[Rt]<0||e._a[Rt]>24||24===e._a[Rt]&&(0!==e._a[Pt]||0!==e._a[Bt]||0!==e._a[Ot])?Rt:e._a[Pt]<0||e._a[Pt]>59?Pt:e._a[Bt]<0||e._a[Bt]>59?Bt:e._a[Ot]<0||e._a[Ot]>999?Ot:-1,e._pf._overflowDayOfYear&&(At>t||t>Ft)&&(t=Ft),e._pf.overflow=t)}function O(e){return null==e._isValid&&(e._isValid=!isNaN(e._d.getTime())&&e._pf.overflow<0&&!e._pf.empty&&!e._pf.invalidMonth&&!e._pf.nullInput&&!e._pf.invalidFormat&&!e._pf.userInvalidated,e._strict&&(e._isValid=e._isValid&&0===e._pf.charsLeftOver&&0===e._pf.unusedTokens.length&&e._pf.bigHour===i)),e._isValid}function j(e){return e?e.toLowerCase().replace("_","-"):e}function I(e){for(var t,r,i,n,a=0;a<e.length;){for(n=j(e[a]).split("-"),t=n.length,r=j(e[a+1]),r=r?r.split("-"):null;t>0;){if(i=W(n.slice(0,t).join("-")))return i;if(r&&r.length>=t&&D(n,r,!0)>=t-1)break;t--}a++}return null}function W(t){var r=null;if(!jt[t]&&Wt)try{r=xt.locale(),e("./locale/"+t),xt.locale(r)}catch(i){}return jt[t]}function G(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(xt.isMoment(e)||Y(e)?+e:+xt(e))-+r,r._d.setTime(+r._d+i),xt.updateOffset(r,!1),r):xt(e).local()}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function N(e){var t,r,i=e.match(Ht);for(t=0,r=i.length;r>t;t++)i[t]=Mr[i[t]]?Mr[i[t]]:U(i[t]);return function(n){var a="";for(t=0;r>t;t++)a+=i[t]instanceof Function?i[t].call(n,e):i[t];return a}}function H(e,t){return e.isValid()?(t=z(t,e.localeData()),mr[t]||(mr[t]=N(t)),mr[t](e)):e.localeData().invalidDate()}function z(e,t){function r(e){return t.longDateFormat(e)||e}var i=5;for(zt.lastIndex=0;i>=0&&zt.test(e);)e=e.replace(zt,r),zt.lastIndex=0,i-=1;return e}function V(e,t){var r,i=t._strict;switch(e){case"Q":return rr;case"DDDD":return nr;case"YYYY":case"GGGG":case"gggg":return i?ar:qt;case"Y":case"G":case"g":return or;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?sr:Jt;case"S":if(i)return rr;case"SS":if(i)return ir;case"SSS":if(i)return nr;case"DDD":return Xt;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return $t;case"a":case"A":return t._locale._meridiemParse;case"x":return er;case"X":return tr;case"Z":case"ZZ":return Qt;case"T":return Zt;case"SSSS":return Kt;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?ir:Vt;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Vt;case"Do":return i?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return r=new RegExp(tt(et(e.replace("\\","")),"i"))}}function X(e){e=e||"";var t=e.match(Qt)||[],r=t[t.length-1]||[],i=(r+"").match(cr)||["-",0,0],n=+(60*i[1])+A(i[2]);return"+"===i[0]?n:-n}function q(e,t,r){var i,n=r._a;switch(e){case"Q":null!=t&&(n[Et]=3*(A(t)-1));break;case"M":case"MM":null!=t&&(n[Et]=A(t)-1);break;case"MMM":case"MMMM":i=r._locale.monthsParse(t,e,r._strict),null!=i?n[Et]=i:r._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(n[Ft]=A(t));break;case"Do":null!=t&&(n[Ft]=A(parseInt(t.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=t&&(r._dayOfYear=A(t));break;case"YY":n[At]=xt.parseTwoDigitYear(t);break;case"YYYY":case"YYYYY":case"YYYYYY":n[At]=A(t);break;case"a":case"A":r._meridiem=t;break;case"h":case"hh":r._pf.bigHour=!0;case"H":case"HH":n[Rt]=A(t);break;case"m":case"mm":n[Pt]=A(t);break;case"s":case"ss":n[Bt]=A(t);break;case"S":case"SS":case"SSS":case"SSSS":n[Ot]=A(1e3*("0."+t));break;case"x":r._d=new Date(A(t));break;case"X":r._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":r._useUTC=!0,r._tzm=X(t);break;case"dd":case"ddd":case"dddd":i=r._locale.weekdaysParse(t),null!=i?(r._w=r._w||{},r._w.d=i):r._pf.invalidWeekday=t;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":e=e.substr(0,1);case"gggg":case"GGGG":case"GGGGG":e=e.substr(0,2),t&&(r._w=r._w||{},r._w[e]=A(t));break;case"gg":case"GG":r._w=r._w||{},r._w[e]=xt.parseTwoDigitYear(t)}}function J(e){var t,r,i,a,s,o,h;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,o=4,r=n(t.GG,e._a[At],ct(xt(),1,4).year),i=n(t.W,1),a=n(t.E,1)):(s=e._locale._week.dow,o=e._locale._week.doy,r=n(t.gg,e._a[At],ct(xt(),s,o).year),i=n(t.w,1),null!=t.d?(a=t.d,s>a&&++i):a=null!=t.e?t.e+s:s),h=ft(r,i,a,o,s),e._a[At]=h.year,e._dayOfYear=h.dayOfYear}function K(e){var t,r,i,a,s=[];if(!e._d){for(i=Q(e),e._w&&null==e._a[Ft]&&null==e._a[Et]&&J(e),e._dayOfYear&&(a=n(e._a[At],i[At]),e._dayOfYear>R(a)&&(e._pf._overflowDayOfYear=!0),r=ht(a,0,e._dayOfYear),e._a[Et]=r.getUTCMonth(),e._a[Ft]=r.getUTCDate()),t=0;3>t&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;7>t;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Rt]&&0===e._a[Pt]&&0===e._a[Bt]&&0===e._a[Ot]&&(e._nextDay=!0,e._a[Rt]=0),e._d=(e._useUTC?ht:ot).apply(null,s),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Rt]=24)}}function $(e){var t;e._d||(t=k(e._i),e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],K(e))}function Q(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Z(e){if(e._f===xt.ISO_8601)return void it(e);e._a=[],e._pf.empty=!0;var t,r,n,a,s,o=""+e._i,h=o.length,u=0;for(n=z(e._f,e._locale).match(Ht)||[],t=0;t<n.length;t++)a=n[t],r=(o.match(V(a,e))||[])[0],r&&(s=o.substr(0,o.indexOf(r)),s.length>0&&e._pf.unusedInput.push(s),o=o.slice(o.indexOf(r)+r.length),u+=r.length),Mr[a]?(r?e._pf.empty=!1:e._pf.unusedTokens.push(a),q(a,r,e)):e._strict&&!r&&e._pf.unusedTokens.push(a);e._pf.charsLeftOver=h-u,o.length>0&&e._pf.unusedInput.push(o),e._pf.bigHour===!0&&e._a[Rt]<=12&&(e._pf.bigHour=i),e._a[Rt]=f(e._locale,e._a[Rt],e._meridiem),K(e),B(e)}function et(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,i,n){return t||r||i||n})}function tt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rt(e){var t,r,i,n,a;if(0===e._f.length)return e._pf.invalidFormat=!0,void(e._d=new Date(0/0));for(n=0;n<e._f.length;n++)a=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._pf=s(),t._f=e._f[n],Z(t),O(t)&&(a+=t._pf.charsLeftOver,a+=10*t._pf.unusedTokens.length,t._pf.score=a,(null==i||i>a)&&(i=a,r=t));g(e,r||t)}function it(e){var t,r,i=e._i,n=hr.exec(i);if(n){for(e._pf.iso=!0,t=0,r=lr.length;r>t;t++)if(lr[t][1].exec(i)){e._f=lr[t][0]+(n[6]||" ");break}for(t=0,r=dr.length;r>t;t++)if(dr[t][1].exec(i)){e._f+=dr[t][0];break}i.match(Qt)&&(e._f+="Z"),Z(e)}else e._isValid=!1}function nt(e){it(e),e._isValid===!1&&(delete e._isValid,xt.createFromInputFallback(e))}function at(e,t){var r,i=[];for(r=0;r<e.length;++r)i.push(t(e[r],r));return i}function st(e){var t,r=e._i;r===i?e._d=new Date:Y(r)?e._d=new Date(+r):null!==(t=Gt.exec(r))?e._d=new Date(+t[1]):"string"==typeof r?nt(e):w(r)?(e._a=at(r.slice(0),function(e){return parseInt(e,10)}),K(e)):"object"==typeof r?$(e):"number"==typeof r?e._d=new Date(r):xt.createFromInputFallback(e)}function ot(e,t,r,i,n,a,s){var o=new Date(e,t,r,i,n,a,s);return 1970>e&&o.setFullYear(e),o}function ht(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function ut(e,t){if("string"==typeof e)if(isNaN(e)){if(e=t.weekdaysParse(e),"number"!=typeof e)return null}else e=parseInt(e,10);return e}function lt(e,t,r,i,n){return n.relativeTime(t||1,!!r,e,i)}function dt(e,t,r){var i=xt.duration(e).abs(),n=kt(i.as("s")),a=kt(i.as("m")),s=kt(i.as("h")),o=kt(i.as("d")),h=kt(i.as("M")),u=kt(i.as("y")),l=n<gr.s&&["s",n]||1===a&&["m"]||a<gr.m&&["mm",a]||1===s&&["h"]||s<gr.h&&["hh",s]||1===o&&["d"]||o<gr.d&&["dd",o]||1===h&&["M"]||h<gr.M&&["MM",h]||1===u&&["y"]||["yy",u];return l[2]=t,l[3]=+e>0,l[4]=r,lt.apply({},l)}function ct(e,t,r){var i,n=r-t,a=r-e.day();return a>n&&(a-=7),n-7>a&&(a+=7),i=xt(e).add(a,"d"),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function ft(e,t,r,i,n){var a,s,o=ht(e,0,1).getUTCDay();return o=0===o?7:o,r=null!=r?r:n,a=n-o+(o>i?7:0)-(n>o?7:0),s=7*(t-1)+(r-n)+a+1,{year:s>0?e:e-1,dayOfYear:s>0?s:R(e-1)+s}}function _t(e){var t,r=e._i,n=e._f;return e._locale=e._locale||xt.localeData(e._l),null===r||n===i&&""===r?xt.invalid({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),xt.isMoment(r)?new p(r,!0):(n?w(n)?rt(e):Z(e):st(e),t=new p(e),t._nextDay&&(t.add(1,"d"),t._nextDay=i),t))}function pt(e,t){var r,i;if(1===t.length&&w(t[0])&&(t=t[0]),!t.length)return xt();for(r=t[0],i=1;i<t.length;++i)t[i][e](r)&&(r=t[i]);return r}function mt(e,t){var r;return"string"==typeof t&&(t=e.localeData().monthsParse(t),"number"!=typeof t)?e:(r=Math.min(e.date(),E(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e)}function gt(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function yt(e,t,r){return"Month"===t?mt(e,r):e._d["set"+(e._isUTC?"UTC":"")+t](r)}function vt(e,t){return function(r){return null!=r?(yt(this,e,r),xt.updateOffset(this,t),this):gt(this,e)}}function Mt(e){return 400*e/146097}function Lt(e){return 146097*e/400}function Tt(e){xt.duration.fn[e]=function(){return this._data[e]}}function bt(e){"undefined"==typeof ender&&(wt=St.moment,St.moment=e?h("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",xt):xt)}for(var xt,wt,Yt,Dt="2.9.0",St="undefined"==typeof r||"undefined"!=typeof window&&window!==r.window?this:r,kt=Math.round,Ct=Object.prototype.hasOwnProperty,At=0,Et=1,Ft=2,Rt=3,Pt=4,Bt=5,Ot=6,jt={},It=[],Wt="undefined"!=typeof t&&t&&t.exports,Gt=/^\/?Date\((\-?\d+)/i,Ut=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Nt=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Ht=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,zt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Vt=/\d\d?/,Xt=/\d{1,3}/,qt=/\d{1,4}/,Jt=/[+\-]?\d{1,6}/,Kt=/\d+/,$t=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qt=/Z|[\+\-]\d\d:?\d\d/gi,Zt=/T/i,er=/[\+\-]?\d+/,tr=/[\+\-]?\d+(\.\d{1,3})?/,rr=/\d/,ir=/\d\d/,nr=/\d{3}/,ar=/\d{4}/,sr=/[+-]?\d{6}/,or=/[+-]?\d+/,hr=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ur="YYYY-MM-DDTHH:mm:ssZ",lr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],dr=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],cr=/([\+\-]|\d\d)/gi,fr=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),_r={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},pr={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},mr={},gr={s:45,m:45,h:22,d:26,M:11},yr="DDD w W M D d".split(" "),vr="M D H h m s w W".split(" "),Mr={M:function(){return this.month()+1},MMM:function(e){return this.localeData().monthsShort(this,e)},MMMM:function(e){return this.localeData().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.localeData().weekdaysMin(this,e)},ddd:function(e){return this.localeData().weekdaysShort(this,e)},dddd:function(e){return this.localeData().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return M(this.year()%100,2)},YYYY:function(){return M(this.year(),4)},YYYYY:function(){return M(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+M(Math.abs(e),6)},gg:function(){return M(this.weekYear()%100,2)},gggg:function(){return M(this.weekYear(),4)},ggggg:function(){return M(this.weekYear(),5)},GG:function(){return M(this.isoWeekYear()%100,2)},GGGG:function(){return M(this.isoWeekYear(),4)},GGGGG:function(){return M(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return M(A(this.milliseconds()/10),2)},SSS:function(){return M(this.milliseconds(),3)},SSSS:function(){return M(this.milliseconds(),3)},Z:function(){var e=this.utcOffset(),t="+";return 0>e&&(e=-e,t="-"),t+M(A(e/60),2)+":"+M(A(e)%60,2)},ZZ:function(){var e=this.utcOffset(),t="+";return 0>e&&(e=-e,t="-"),t+M(A(e/60),2)+M(A(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Lr={},Tr=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],br=!1;yr.length;)Yt=yr.pop(),Mr[Yt+"o"]=d(Mr[Yt],Yt);for(;vr.length;)Yt=vr.pop(),Mr[Yt+Yt]=l(Mr[Yt],2);Mr.DDDD=l(Mr.DDD,3),g(_.prototype,{set:function(e){var t,r;for(r in e)t=e[r],"function"==typeof t?this[r]=t:this["_"+r]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e,t,r){var i,n,a;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;12>i;i++){if(n=xt.utc([2e3,i]),r&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),r||this._monthsParse[i]||(a="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(r&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!r&&this._monthsParse[i].test(e))return i}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,r,i;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(r=xt([2e3,1]).day(t),i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[t]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t,r){var i=this._calendar[e];return"function"==typeof i?i.apply(t,[r]):i},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,r,i){var n=this._relativeTime[r];return"function"==typeof n?n(e,t,r,i):n.replace(/%d/i,e)},pastFuture:function(e,t){var r=this._relativeTime[e>0?"future":"past"];return"function"==typeof r?r(t):r.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(e){return e},postformat:function(e){return e},week:function(e){return ct(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),xt=function(e,t,r,n){var a;return"boolean"==typeof r&&(n=r,r=i),a={},a._isAMomentObject=!0,a._i=e,a._f=t,a._l=r,a._strict=n,a._isUTC=!1,a._pf=s(),_t(a)},xt.suppressDeprecationWarnings=!1,xt.createFromInputFallback=h("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),xt.min=function(){var e=[].slice.call(arguments,0);return pt("isBefore",e)},xt.max=function(){var e=[].slice.call(arguments,0);return pt("isAfter",e)},xt.utc=function(e,t,r,n){var a;return"boolean"==typeof r&&(n=r,r=i),a={},a._isAMomentObject=!0,a._useUTC=!0,a._isUTC=!0,a._l=r,a._i=e,a._f=t,a._strict=n,a._pf=s(),_t(a).utc()},xt.unix=function(e){return xt(1e3*e)},xt.duration=function(e,t){var r,i,n,s,o=e,h=null;return xt.isDuration(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(o={},t?o[t]=e:o.milliseconds=e):(h=Ut.exec(e))?(r="-"===h[1]?-1:1,o={y:0,d:A(h[Ft])*r,h:A(h[Rt])*r,m:A(h[Pt])*r,s:A(h[Bt])*r,ms:A(h[Ot])*r}):(h=Nt.exec(e))?(r="-"===h[1]?-1:1,n=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*r},o={y:n(h[2]),M:n(h[3]),d:n(h[4]),h:n(h[5]),m:n(h[6]),s:n(h[7]),w:n(h[8])}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(s=T(xt(o.from),xt(o.to)),o={},o.ms=s.milliseconds,o.M=s.months),i=new m(o),xt.isDuration(e)&&a(e,"_locale")&&(i._locale=e._locale),i},xt.version=Dt,xt.defaultFormat=ur,xt.ISO_8601=function(){},xt.momentProperties=It,xt.updateOffset=function(){},xt.relativeTimeThreshold=function(e,t){return gr[e]===i?!1:t===i?gr[e]:(gr[e]=t,!0)},xt.lang=h("moment.lang is deprecated. Use moment.locale instead.",function(e,t){return xt.locale(e,t)}),xt.locale=function(e,t){var r;return e&&(r="undefined"!=typeof t?xt.defineLocale(e,t):xt.localeData(e),r&&(xt.duration._locale=xt._locale=r)),xt._locale._abbr},xt.defineLocale=function(e,t){return null!==t?(t.abbr=e,jt[e]||(jt[e]=new _),jt[e].set(t),xt.locale(e),jt[e]):(delete jt[e],null)},xt.langData=h("moment.langData is deprecated. Use moment.localeData instead.",function(e){return xt.localeData(e)}),xt.localeData=function(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return xt._locale;if(!w(e)){if(t=W(e))return t;e=[e]}return I(e)},xt.isMoment=function(e){return e instanceof p||null!=e&&a(e,"_isAMomentObject")},xt.isDuration=function(e){return e instanceof m};for(Yt=Tr.length-1;Yt>=0;--Yt)C(Tr[Yt]);xt.normalizeUnits=function(e){return S(e)},xt.invalid=function(e){var t=xt.utc(0/0);return null!=e?g(t._pf,e):t._pf.userInvalidated=!0,t},xt.parseZone=function(){return xt.apply(null,arguments).parseZone()},xt.parseTwoDigitYear=function(e){return A(e)+(A(e)>68?1900:2e3)},xt.isDate=Y,g(xt.fn=p.prototype,{clone:function(){return xt(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=xt(this).utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():H(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):H(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return O(this)},isDSTShifted:function(){return this._a?this.isValid()&&D(this._a,(this._isUTC?xt.utc(this._a):xt(this._a)).toArray())>0:!1},parsingFlags:function(){return g({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(e){return this.utcOffset(0,e)},local:function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(e){var t=H(this,e||xt.defaultFormat);return this.localeData().postformat(t)},add:b(1,"add"),subtract:b(-1,"subtract"),diff:function(e,t,r){var i,n,a=G(e,this),s=6e4*(a.utcOffset()-this.utcOffset());return t=S(t),"year"===t||"month"===t||"quarter"===t?(n=c(this,a),"quarter"===t?n/=3:"year"===t&&(n/=12)):(i=this-a,n="second"===t?i/1e3:"minute"===t?i/6e4:"hour"===t?i/36e5:"day"===t?(i-s)/864e5:"week"===t?(i-s)/6048e5:i),r?n:v(n)},from:function(e,t){return xt.duration({to:this,from:e}).locale(this.locale()).humanize(!t)},fromNow:function(e){return this.from(xt(),e)},calendar:function(e){var t=e||xt(),r=G(t,this).startOf("day"),i=this.diff(r,"days",!0),n=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(n,this,xt(t)))},isLeapYear:function(){return P(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=ut(e,this.localeData()),this.add(e-t,"d")):t},month:vt("Month",!0),startOf:function(e){switch(e=S(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e?this.weekday(0):"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(e){return e=S(e),e===i||"millisecond"===e?this:this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms")},isAfter:function(e,t){var r;return t=S("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=xt.isMoment(e)?e:xt(e),+this>+e):(r=xt.isMoment(e)?+e:+xt(e),r<+this.clone().startOf(t))},isBefore:function(e,t){var r;return t=S("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=xt.isMoment(e)?e:xt(e),+e>+this):(r=xt.isMoment(e)?+e:+xt(e),+this.clone().endOf(t)<r)},isBetween:function(e,t,r){return this.isAfter(e,r)&&this.isBefore(t,r)},isSame:function(e,t){var r;return t=S(t||"millisecond"),"millisecond"===t?(e=xt.isMoment(e)?e:xt(e),+this===+e):(r=+xt(e),+this.clone().startOf(t)<=r&&r<=+this.clone().endOf(t))},min:h("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(e){return e=xt.apply(null,arguments),this>e?this:e}),max:h("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(e){return e=xt.apply(null,arguments),e>this?this:e}),zone:h("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),utcOffset:function(e,t){var r,i=this._offset||0;return null!=e?("string"==typeof e&&(e=X(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&t&&(r=this._dateUtcOffset()),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?x(this,xt.duration(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,xt.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(X(this._i)),this},hasAlignedHourOffset:function(e){return e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60===0},daysInMonth:function(){return E(this.year(),this.month())},dayOfYear:function(e){var t=kt((xt(this).startOf("day")-xt(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},quarter:function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},weekYear:function(e){var t=ct(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==e?t:this.add(e-t,"y")},isoWeekYear:function(e){var t=ct(this,1,4).year;return null==e?t:this.add(e-t,"y")},week:function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},isoWeek:function(e){var t=ct(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},weekday:function(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return F(this.year(),1,4)},weeksInYear:function(){var e=this.localeData()._week;return F(this.year(),e.dow,e.doy)},get:function(e){return e=S(e),this[e]()},set:function(e,t){var r;if("object"==typeof e)for(r in e)this.set(r,e[r]);else e=S(e),"function"==typeof this[e]&&this[e](t);return this},locale:function(e){var t;return e===i?this._locale._abbr:(t=xt.localeData(e),null!=t&&(this._locale=t),this)},lang:h("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===i?this.localeData():this.locale(e)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),xt.fn.millisecond=xt.fn.milliseconds=vt("Milliseconds",!1),xt.fn.second=xt.fn.seconds=vt("Seconds",!1),xt.fn.minute=xt.fn.minutes=vt("Minutes",!1),xt.fn.hour=xt.fn.hours=vt("Hours",!0),xt.fn.date=vt("Date",!0),xt.fn.dates=h("dates accessor is deprecated. Use date instead.",vt("Date",!0)),xt.fn.year=vt("FullYear",!0),xt.fn.years=h("years accessor is deprecated. Use year instead.",vt("FullYear",!0)),xt.fn.days=xt.fn.day,xt.fn.months=xt.fn.month,xt.fn.weeks=xt.fn.week,xt.fn.isoWeeks=xt.fn.isoWeek,xt.fn.quarters=xt.fn.quarter,xt.fn.toJSON=xt.fn.toISOString,xt.fn.isUTC=xt.fn.isUtc,g(xt.duration.fn=m.prototype,{_bubble:function(){var e,t,r,i=this._milliseconds,n=this._days,a=this._months,s=this._data,o=0;s.milliseconds=i%1e3,e=v(i/1e3),s.seconds=e%60,t=v(e/60),s.minutes=t%60,r=v(t/60),s.hours=r%24,n+=v(r/24),o=v(Mt(n)),n-=v(Lt(o)),a+=v(n/30),n%=30,o+=v(a/12),a%=12,s.days=n,s.months=a,s.years=o},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return v(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(e){var t=dt(this,!e,this.localeData());return e&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(e,t){var r=xt.duration(e,t);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(e,t){var r=xt.duration(e,t);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(e){return e=S(e),this[e.toLowerCase()+"s"]()},as:function(e){var t,r;if(e=S(e),"month"===e||"year"===e)return t=this._days+this._milliseconds/864e5,r=this._months+12*Mt(t),"month"===e?r:r/12;switch(t=this._days+Math.round(Lt(this._months/12)),e){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 24*t*60+this._milliseconds/6e4;case"second":return 24*t*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*t*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+e)}},lang:xt.fn.lang,locale:xt.fn.locale,toIsoString:h("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),r=Math.abs(this.days()),i=Math.abs(this.hours()),n=Math.abs(this.minutes()),a=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(r?r+"D":"")+(i||n||a?"T":"")+(i?i+"H":"")+(n?n+"M":"")+(a?a+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),xt.duration.fn.toString=xt.duration.fn.toISOString;for(Yt in fr)a(fr,Yt)&&Tt(Yt.toLowerCase());xt.duration.fn.asMilliseconds=function(){return this.as("ms")},xt.duration.fn.asSeconds=function(){return this.as("s")},xt.duration.fn.asMinutes=function(){return this.as("m")},xt.duration.fn.asHours=function(){return this.as("h")},xt.duration.fn.asDays=function(){return this.as("d")},xt.duration.fn.asWeeks=function(){return this.as("weeks")},xt.duration.fn.asMonths=function(){return this.as("M")},xt.duration.fn.asYears=function(){return this.as("y")},xt.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=1===A(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}}),function(e){e(xt)}(function(e){return e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,r){return 12>e?r?"vm":"VM":r?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     3
},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}),function(e){e(xt)}(function(e){var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};return e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e){return 12>e?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return r[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}),function(e){e(xt)}(function(e){return e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&10>=e%100?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,r){var a=i(t),s=n[e][i(t)];return 2===a&&(s=s[r?0:1]),s.replace(/%d/i,t)}},s=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"];return e.defineLocale("ar",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e){return 12>e?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return r[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}),function(e){e(xt)}(function(e){var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};return e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e){return 4>e?"gecə":12>e?"səhər":17>e?"gündüz":"axşam"},ordinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var r=e%10,i=e%100-r,n=e>=100?100:null;return e+(t[r]||t[i]||t[n])},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){function t(e,t){var r=e.split("_");return t%10===1&&t%100!==11?r[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?r[1]:r[2]}function r(e,r,i){var n={mm:r?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:r?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===i?r?"хвіліна":"хвіліну":"h"===i?r?"гадзіна":"гадзіну":e+" "+t(n[i],+e)}function i(e,t){var r={nominative:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_"),accusative:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return r[i][e.month()]}function n(e,t){var r={nominative:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),accusative:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_")},i=/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/.test(t)?"accusative":"nominative";return r[i][e.day()]}return e.defineLocale("be",{months:i,monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:n,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:r,mm:r,h:r,hh:r,d:"дзень",dd:r,M:"месяц",MM:r,y:"год",yy:r},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e){return 4>e?"ночы":12>e?"раніцы":17>e?"дня":"вечара"},ordinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&20>r?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},r={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};return e.defineLocale("bn",{months:"জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি".split("_"),weekdaysMin:"রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কএক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|শকাল|দুপুর|বিকেল|রাত/,isPM:function(e){return/^(দুপুর|বিকেল|রাত)$/.test(e)},meridiem:function(e){return 4>e?"রাত":10>e?"শকাল":17>e?"দুপুর":20>e?"বিকেল":"রাত"},week:{dow:0,doy:6}})}),function(e){e(xt)}(function(e){var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},r={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};return e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,isPM:function(e){return/^(ཉིན་གུང|དགོང་དག|མཚན་མོ)$/.test(e)},meridiem:function(e){return 4>e?"མཚན་མོ":10>e?"ཞོགས་ཀས":17>e?"ཉིན་གུང":20>e?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+a(i[r],e)}function r(e){switch(n(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function n(e){return e>9?n(e%10):e}function a(e,t){return 2===t?s(e):e}function s(e){var t={m:"v",b:"v",d:"z"};return t[e.charAt(0)]===i?e:t[e.charAt(0)]+e.substring(1)}return e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY LT",LLLL:"dddd, D [a viz] MMMM YYYY LT"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:r},ordinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i=e+" ";switch(r){case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return i+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return i+=1===e?"dan":"dana";case"MM":return i+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return i+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}return e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var r=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return("w"===t||"W"===t)&&(r="a"),e+r},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e){return e>1&&5>e&&1!==~~(e/10)}function r(e,r,i,n){var a=e+" ";switch(i){case"s":return r||n?"pár sekund":"pár sekundami";case"m":return r?"minuta":n?"minutu":"minutou";case"mm":return r||n?a+(t(e)?"minuty":"minut"):a+"minutami";case"h":return r?"hodina":n?"hodinu":"hodinou";case"hh":return r||n?a+(t(e)?"hodiny":"hodin"):a+"hodinami";case"d":return r||n?"den":"dnem";case"dd":return r||n?a+(t(e)?"dny":"dní"):a+"dny";case"M":return r||n?"měsíc":"měsícem";case"MM":return r||n?a+(t(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return r||n?"rok":"rokem";case"yy":return r||n?a+(t(e)?"roky":"let"):a+"lety"}}var i="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");return e.defineLocale("cs",{months:i,monthsShort:n,monthsParse:function(e,t){var r,i=[];for(r=0;12>r;r++)i[r]=new RegExp("^"+e[r]+"$|^"+t[r]+"$","i");return i}(i,n),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("cv",{months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD-MM-YYYY",LL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]",LLL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT",LLLL:"dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/çул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinalParse:/\d{1,2}-мĕш/,ordinal:"%d-мĕш",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,r="",i=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?r=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(r=i[t]),e+r},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd [d.] D. MMMM YYYY LT"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[r][0]:i[r][1]}return e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT [Uhr]",sameElse:"L",nextDay:"[Morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[Gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[r][0]:i[r][1]}return e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT [Uhr]",sameElse:"L",nextDay:"[Morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[Gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,r){return e>11?r?"μμ":"ΜΜ":r?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var r=this._calendarEl[e],i=t&&t.hours();return"function"==typeof r&&(r=r.apply(t)),r.replace("{}",i%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,r=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,r=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}})}),function(e){e(xt)}(function(e){return e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,r=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY LT",LLLL:"dddd, [la] D[-an de] MMMM, YYYY LT"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,r){return e>11?r?"p.t.m.":"P.T.M.":r?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return/-MMM-/.test(i)?r[e.month()]:t[e.month()]},weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     4
},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r,i){var n={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?n[r][2]?n[r][2]:n[r][1]:i?n[r][0]:n[r][1]}return e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] LT",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] LT",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] LT",llll:"ddd, YYYY[ko] MMM D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},r={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};return e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e){return 12>e?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return r[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},ordinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}),function(e){e(xt)}(function(e){function t(e,t,i,n){var a="";switch(i){case"s":return n?"muutaman sekunnin":"muutama sekunti";case"m":return n?"minuutin":"minuutti";case"mm":a=n?"minuutin":"minuuttia";break;case"h":return n?"tunnin":"tunti";case"hh":a=n?"tunnin":"tuntia";break;case"d":return n?"päivän":"päivä";case"dd":a=n?"päivän":"päivää";break;case"M":return n?"kuukauden":"kuukausi";case"MM":a=n?"kuukauden":"kuukautta";break;case"y":return n?"vuoden":"vuosi";case"yy":a=n?"vuoden":"vuotta"}return a=r(e,n)+" "+a}function r(e,t){return 10>e?t?n[e]:i[e]:e}var i="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",i[7],i[8],i[9]];return e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] LT",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] LT",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] LT",llll:"ddd, Do MMM YYYY, [klo] LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D. MMMM, YYYY LT"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(e){return e+(1===e?"er":"")}})}),function(e){e(xt)}(function(e){return e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(e){return e+(1===e?"er":"")},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),r="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");return e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,i){return/-MMM-/.test(i)?r[e.month()]:t[e.month()]},weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return"uns segundos"===e?"nuns segundos":"en "+e},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY LT",LLLL:"dddd, D [ב]MMMM YYYY LT",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}}})}),function(e){e(xt)}(function(e){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?4>e?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e){return 4>e?"रात":10>e?"सुबह":17>e?"दोपहर":20>e?"शाम":"रात"},week:{dow:0,doy:6}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i=e+" ";switch(r){case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return i+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return i+=1===e?"dan":"dana";case"MM":return i+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return i+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}return e.defineLocale("hr",{months:"sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),monthsShort:"sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){function t(e,t,r,i){var n=e;switch(r){case"s":return i||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(i||t?" perc":" perce");case"mm":return n+(i||t?" perc":" perce");case"h":return"egy"+(i||t?" óra":" órája");case"hh":return n+(i||t?" óra":" órája");case"d":return"egy"+(i||t?" nap":" napja");case"dd":return n+(i||t?" nap":" napja");case"M":return"egy"+(i||t?" hónap":" hónapja");case"MM":return n+(i||t?" hónap":" hónapja");case"y":return"egy"+(i||t?" év":" éve");case"yy":return n+(i||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+i[this.day()]+"] LT[-kor]"}var i="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");return e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,r){return 12>e?r===!0?"de":"DE":r===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){function t(e,t){var r={nominative:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_"),accusative:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return r[i][e.month()]}function r(e){var t="հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_");return t[e.month()]}function i(e){var t="կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_");return t[e.day()]}return e.defineLocale("hy-am",{months:t,monthsShort:r,weekdays:i,weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., LT",LLLL:"dddd, D MMMM YYYY թ., LT"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return 4>e?"գիշերվա":12>e?"առավոտվա":17>e?"ցերեկվա":"երեկոյան"},ordinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"LT.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e){return 11>e?"pagi":15>e?"siang":19>e?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){function t(e){return e%100===11?!0:e%10===1?!1:!0}function r(e,r,i,n){var a=e+" ";switch(i){case"s":return r||n?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return r?"mínúta":"mínútu";case"mm":return t(e)?a+(r||n?"mínútur":"mínútum"):r?a+"mínúta":a+"mínútu";case"hh":return t(e)?a+(r||n?"klukkustundir":"klukkustundum"):a+"klukkustund";case"d":return r?"dagur":n?"dag":"degi";case"dd":return t(e)?r?a+"dagar":a+(n?"daga":"dögum"):r?a+"dagur":a+(n?"dag":"degi");case"M":return r?"mánuður":n?"mánuð":"mánuði";case"MM":return t(e)?r?a+"mánuðir":a+(n?"mánuði":"mánuðum"):r?a+"mánuður":a+(n?"mánuð":"mánuði");case"y":return r||n?"ár":"ári";case"yy":return t(e)?a+(r||n?"ár":"árum"):a+(r||n?"ár":"ári")}}return e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd, D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:r,m:r,mm:r,h:"klukkustund",hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"LTs秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e){return 12>e?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}),function(e){e(xt)}(function(e){function t(e,t){var r={nominative:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),accusative:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},i=/D[oD] *MMMM?/.test(t)?"accusative":"nominative";return r[i][e.month()]}function r(e,t){var r={nominative:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),accusative:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_")},i=/(წინა|შემდეგ)/.test(t)?"accusative":"nominative";return r[i][e.day()]}return e.defineLocale("ka",{months:t,monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:r,weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":20>e||100>=e&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("km",{months:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[ថ្ងៃនៈ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e){return 12>e?"오전":"오후"}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[r][0]:i[r][1]}function r(e){var t=e.substr(0,e.indexOf(" "));return n(t)?"a "+e:"an "+e}function i(e){var t=e.substr(0,e.indexOf(" "));return n(t)?"viru "+e:"virun "+e}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(0>e)return!0;if(10>e)return e>=4&&7>=e?!0:!1;if(100>e){var t=e%10,r=e/10;return n(0===t?r:t)}if(1e4>e){for(;e>=10;)e/=10;return n(e)}return e/=1e3,n(e)}return e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:r,past:i,s:"e puer Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r,i){return t?"kelios sekundės":i?"kelių sekundžių":"kelias sekundes"}function r(e,t,r,i){return t?n(r)[0]:i?n(r)[1]:n(r)[2]}function i(e){return e%10===0||e>10&&20>e}function n(e){return o[e].split("_")}function a(e,t,a,s){var o=e+" ";return 1===e?o+r(e,t,a[0],s):t?o+(i(e)?n(a)[1]:n(a)[0]):s?o+n(a)[1]:o+(i(e)?n(a)[1]:n(a)[2])}function s(e,t){var r=-1===t.indexOf("dddd HH:mm"),i=h[e.day()];return r?i:i.substring(0,i.length-2)+"į"}var o={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},h="sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_");return e.defineLocale("lt",{months:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:s,weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], LT [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, LT [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], LT [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, LT [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:t,m:r,mm:a,h:r,hh:a,d:r,dd:a,M:r,MM:a,y:r,yy:a},ordinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i=e.split("_");return r?t%10===1&&11!==t?i[2]:i[3]:t%10===1&&11!==t?i[0]:i[1]}function r(e,r,n){return e+" "+t(i[n],e,r)}var i={mm:"minūti_minūtes_minūte_minūtes",hh:"stundu_stundas_stunda_stundas",dd:"dienu_dienas_diena_dienas",MM:"mēnesi_mēnešus_mēnesis_mēneši",yy:"gadu_gadus_gads_gadi"};return e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, LT",LLLL:"YYYY. [gada] D. MMMM, dddd, LT"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"%s vēlāk",past:"%s agrāk",s:"dažas sekundes",m:"minūti",mm:r,h:"stundu",hh:r,d:"dienu",dd:r,M:"mēnesi",MM:r,y:"gadu",yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Во изминатата] dddd [во] LT";
166
fa9e24e46968 pianoroll use ts_server
ymh <ymh.work@gmail.com>
parents: 130
diff changeset
     5
case 1:case 2:case 4:case 5:return"[Во изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&20>r?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,isPM:function(e){return/^(ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി)$/.test(e)},meridiem:function(e){return 4>e?"രാത്രി":12>e?"രാവിലെ":17>e?"ഉച്ച കഴിഞ്ഞ്":20>e?"വൈകുന്നേരം":"രാത്രി"}})}),function(e){e(xt)}(function(e){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%s नंतर",past:"%s पूर्वी",s:"सेकंद",m:"एक मिनिट",mm:"%d मिनिटे",h:"एक तास",hh:"%d तास",d:"एक दिवस",dd:"%d दिवस",M:"एक महिना",MM:"%d महिने",y:"एक वर्ष",yy:"%d वर्षे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?4>e?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e){return 4>e?"रात्री":10>e?"सकाळी":17>e?"दुपारी":20>e?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}),function(e){e(xt)}(function(e){return e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"LT.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e){return 11>e?"pagi":15>e?"tengahari":19>e?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},r={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};return e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tirs_ons_tors_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",LTS:"LT.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आइ._सो._मङ्_बु._बि._शु._श.".split("_"),longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/राती|बिहान|दिउँसो|बेलुका|साँझ|राती/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?3>e?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"बेलुका"===t||"साँझ"===t?e+12:void 0},meridiem:function(e){return 3>e?"राती":10>e?"बिहान":15>e?"दिउँसो":18>e?"बेलुका":20>e?"साँझ":"राती"},calendar:{sameDay:"[आज] LT",nextDay:"[भोली] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडी",s:"केही समय",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),r="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");return e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return/-MMM-/.test(i)?r[e.month()]:t[e.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e){return 5>e%10&&e%10>1&&~~(e/10)%10!==1}function r(e,r,i){var n=e+" ";switch(i){case"m":return r?"minuta":"minutę";case"mm":return n+(t(e)?"minuty":"minut");case"h":return r?"godzina":"godzinę";case"hh":return n+(t(e)?"godziny":"godzin");case"MM":return n+(t(e)?"miesiące":"miesięcy");case"yy":return n+(t(e)?"lata":"lat")}}var i="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");return e.defineLocale("pl",{months:function(e,t){return/D MMMM/.test(t)?n[e.month()]:i[e.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:r,y:"rok",yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] LT",LLLL:"dddd, D [de] MMMM [de] YYYY [às] LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"})}),function(e){e(xt)}(function(e){return e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},n=" ";return(e%100>=20||e>=100&&e%100===0)&&(n=" de "),e+n+i[r]}return e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){function t(e,t){var r=e.split("_");return t%10===1&&t%100!==11?r[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?r[1]:r[2]}function r(e,r,i){var n={mm:r?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===i?r?"минута":"минуту":e+" "+t(n[i],+e)}function i(e,t){var r={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return r[i][e.month()]}function n(e,t){var r={nominative:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative";return r[i][e.month()]}function a(e,t){var r={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},i=/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(t)?"accusative":"nominative";return r[i][e.day()]}return e.defineLocale("ru",{months:i,monthsShort:n,weekdays:a,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:r,mm:r,h:"час",hh:r,d:"день",dd:r,M:"месяц",MM:r,y:"год",yy:r},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e){return 4>e?"ночи":12>e?"утра":17>e?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){function t(e){return e>1&&5>e}function r(e,r,i,n){var a=e+" ";switch(i){case"s":return r||n?"pár sekúnd":"pár sekundami";case"m":return r?"minúta":n?"minútu":"minútou";case"mm":return r||n?a+(t(e)?"minúty":"minút"):a+"minútami";case"h":return r?"hodina":n?"hodinu":"hodinou";case"hh":return r||n?a+(t(e)?"hodiny":"hodín"):a+"hodinami";case"d":return r||n?"deň":"dňom";case"dd":return r||n?a+(t(e)?"dni":"dní"):a+"dňami";case"M":return r||n?"mesiac":"mesiacom";case"MM":return r||n?a+(t(e)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return r||n?"rok":"rokom";case"yy":return r||n?a+(t(e)?"roky":"rokov"):a+"rokmi"}}var i="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");return e.defineLocale("sk",{months:i,monthsShort:n,monthsParse:function(e,t){var r,i=[];for(r=0;12>r;r++)i[r]=new RegExp("^"+e[r]+"$|^"+t[r]+"$","i");return i}(i,n),weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){function t(e,t,r){var i=e+" ";switch(r){case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?"minuta":2===e?"minuti":3===e||4===e?"minute":"minut";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?"ura":2===e?"uri":3===e||4===e?"ure":"ur";case"dd":return i+=1===e?"dan":"dni";case"MM":return i+=1===e?"mesec":2===e?"meseca":3===e||4===e?"mesece":"mesecev";case"yy":return i+=1===e?"leto":2===e?"leti":3===e||4===e?"leta":"let"}}return e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[prejšnja] dddd [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"%s nazaj",s:"nekaj sekund",m:t,mm:t,h:t,hh:t,d:"en dan",dd:t,M:"en mesec",MM:t,y:"eno leto",yy:t},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e){return 12>e?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){var t={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&4>=e?t[1]:t[2]},translate:function(e,r,i){var n=t.words[i];return 1===i.length?r?n[0]:n[1]:e+" "+t.correctGrammaticalCase(e,n)}};return e.defineLocale("sr-cyrl",{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],monthsShort:["јан.","феб.","мар.","апр.","мај","јун","јул","авг.","сеп.","окт.","нов.","дец."],weekdays:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],weekdaysShort:["нед.","пон.","уто.","сре.","чет.","пет.","суб."],weekdaysMin:["не","по","ут","ср","че","пе","су"],longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){var t={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&4>=e?t[1]:t[2]},translate:function(e,r,i){var n=t.words[i];return 1===i.length?r?n[0]:n[1]:e+" "+t.correctGrammaticalCase(e,n)}};return e.defineLocale("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",LTS:"LT:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"dddd LT",lastWeek:"[Förra] dddd[en] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10,r=1===~~(e%100/10)?"e":1===t?"a":2===t?"a":"e";return e+r},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e){return 2>e?" யாமம்":6>e?" வைகறை":10>e?" காலை":14>e?" நண்பகல்":18>e?" எற்பாடு":22>e?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?2>e?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}),function(e){e(xt)}(function(e){return e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),longDateFormat:{LT:"H นาฬิกา m นาที",LTS:"LT s วินาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา LT",LLLL:"วันddddที่ D MMMM YYYY เวลา LT"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e){return 12>e?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}),function(e){e(xt)}(function(e){return e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM DD, YYYY LT"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};return e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(e){if(0===e)return e+"'ıncı";var r=e%10,i=e%100-r,n=e>=100?100:null;return e+(t[r]||t[i]||t[n])},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})
130
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     6
}),function(e){e(xt)}(function(e){return e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}),function(e){e(xt)}(function(e){function t(e,t){var r=e.split("_");return t%10===1&&t%100!==11?r[0]:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?r[1]:r[2]}function r(e,r,i){var n={mm:"хвилина_хвилини_хвилин",hh:"година_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===i?r?"хвилина":"хвилину":"h"===i?r?"година":"годину":e+" "+t(n[i],+e)}function i(e,t){var r={nominative:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),accusative:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")},i=/D[oD]? *MMMM?/.test(t)?"accusative":"nominative";return r[i][e.month()]}function n(e,t){var r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},i=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return r[i][e.day()]}function a(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}return e.defineLocale("uk",{months:i,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:n,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., LT",LLLL:"dddd, D MMMM YYYY р., LT"},calendar:{sameDay:a("[Сьогодні "),nextDay:a("[Завтра "),lastDay:a("[Вчора "),nextWeek:a("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return a("[Минулої] dddd [").call(this);case 1:case 2:case 4:return a("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:r,mm:r,h:"годину",hh:r,d:"день",dd:r,M:"місяць",MM:r,y:"рік",yy:r},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e){return 4>e?"ночі":12>e?"ранку":17>e?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("uz",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"D MMMM YYYY, dddd LT"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}),function(e){e(xt)}(function(e){return e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",LTS:"LT:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY LT",LLLL:"dddd, D MMMM [năm] YYYY LT",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t){var r=100*e+t;return 600>r?"凌晨":900>r?"早上":1130>r?"上午":1230>r?"中午":1800>r?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var t,r;return t=e().startOf("week"),r=this.unix()-t.unix()>=604800?"[下]":"[本]",0===this.minutes()?r+"dddAh点整":r+"dddAh点mm"},lastWeek:function(){var t,r;return t=e().startOf("week"),r=this.unix()<t.unix()?"[上]":"[本]",0===this.minutes()?r+"dddAh点整":r+"dddAh点mm"},sameElse:"LL"},ordinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}})}),function(e){e(xt)}(function(e){return e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",LTS:"Ah點m分s秒",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiemParse:/早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t){var r=100*e+t;return 900>r?"早上":1130>r?"上午":1230>r?"中午":1800>r?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"}})}),xt.locale("en"),Wt?t.exports=xt:"function"==typeof define&&define.amd?(define(function(e,t,r){return r.config&&r.config()&&r.config().noGlobal===!0&&(St.moment=wt),xt}),bt(!0)):bt()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],pixi:[function(e,t,r){(function(){var e=this,i=i||{};i.WEBGL_RENDERER=0,i.CANVAS_RENDERER=1,i.VERSION="v2.2.3",i.blendModes={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},i.scaleModes={DEFAULT:0,LINEAR:0,NEAREST:1},i._UID=0,"undefined"!=typeof Float32Array?(i.Float32Array=Float32Array,i.Uint16Array=Uint16Array,i.Uint32Array=Uint32Array,i.ArrayBuffer=ArrayBuffer):(i.Float32Array=Array,i.Uint16Array=Array),i.INTERACTION_FREQUENCY=30,i.AUTO_PREVENT_DEFAULT=!0,i.PI_2=2*Math.PI,i.RAD_TO_DEG=180/Math.PI,i.DEG_TO_RAD=Math.PI/180,i.RETINA_PREFIX="@2x",i.dontSayHello=!1,i.defaultRenderOptions={view:null,transparent:!1,antialias:!1,preserveDrawingBuffer:!1,resolution:1,clearBeforeRender:!0,autoResize:!1},i.sayHello=function(e){if(!i.dontSayHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var t=["%c %c %c Pixi.js "+i.VERSION+" - "+e+"  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ ","background: #ff66a5","background: #ff66a5","color: #ff66a5; background: #030307;","background: #ff66a5","background: #ffc3dc","background: #ff66a5","color: #ff2424; background: #fff","color: #ff2424; background: #fff","color: #ff2424; background: #fff"];console.log.apply(console,t)}else window.console&&console.log("Pixi.js "+i.VERSION+" - http://www.pixijs.com/");i.dontSayHello=!0}},i.Point=function(e,t){this.x=e||0,this.y=t||0},i.Point.prototype.clone=function(){return new i.Point(this.x,this.y)},i.Point.prototype.set=function(e,t){this.x=e||0,this.y=t||(0!==t?this.x:0)},i.Point.prototype.constructor=i.Point,i.Rectangle=function(e,t,r,i){this.x=e||0,this.y=t||0,this.width=r||0,this.height=i||0},i.Rectangle.prototype.clone=function(){return new i.Rectangle(this.x,this.y,this.width,this.height)},i.Rectangle.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var r=this.x;if(e>=r&&e<=r+this.width){var i=this.y;if(t>=i&&t<=i+this.height)return!0}return!1},i.Rectangle.prototype.constructor=i.Rectangle,i.EmptyRectangle=new i.Rectangle(0,0,0,0),i.Polygon=function(e){if(e instanceof Array||(e=Array.prototype.slice.call(arguments)),e[0]instanceof i.Point){for(var t=[],r=0,n=e.length;n>r;r++)t.push(e[r].x,e[r].y);e=t}this.closed=!0,this.points=e},i.Polygon.prototype.clone=function(){var e=this.points.slice();return new i.Polygon(e)},i.Polygon.prototype.contains=function(e,t){for(var r=!1,i=this.points.length/2,n=0,a=i-1;i>n;a=n++){var s=this.points[2*n],o=this.points[2*n+1],h=this.points[2*a],u=this.points[2*a+1],l=o>t!=u>t&&(h-s)*(t-o)/(u-o)+s>e;l&&(r=!r)}return r},i.Polygon.prototype.constructor=i.Polygon,i.Circle=function(e,t,r){this.x=e||0,this.y=t||0,this.radius=r||0},i.Circle.prototype.clone=function(){return new i.Circle(this.x,this.y,this.radius)},i.Circle.prototype.contains=function(e,t){if(this.radius<=0)return!1;var r=this.x-e,i=this.y-t,n=this.radius*this.radius;return r*=r,i*=i,n>=r+i},i.Circle.prototype.getBounds=function(){return new i.Rectangle(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},i.Circle.prototype.constructor=i.Circle,i.Ellipse=function(e,t,r,i){this.x=e||0,this.y=t||0,this.width=r||0,this.height=i||0},i.Ellipse.prototype.clone=function(){return new i.Ellipse(this.x,this.y,this.width,this.height)},i.Ellipse.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var r=(e-this.x)/this.width,i=(t-this.y)/this.height;return r*=r,i*=i,1>=r+i},i.Ellipse.prototype.getBounds=function(){return new i.Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)},i.Ellipse.prototype.constructor=i.Ellipse,i.RoundedRectangle=function(e,t,r,i,n){this.x=e||0,this.y=t||0,this.width=r||0,this.height=i||0,this.radius=n||20},i.RoundedRectangle.prototype.clone=function(){return new i.RoundedRectangle(this.x,this.y,this.width,this.height,this.radius)},i.RoundedRectangle.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var r=this.x;if(e>=r&&e<=r+this.width){var i=this.y;if(t>=i&&t<=i+this.height)return!0}return!1},i.RoundedRectangle.prototype.constructor=i.RoundedRectangle,i.Matrix=function(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0},i.Matrix.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},i.Matrix.prototype.toArray=function(e){this.array||(this.array=new i.Float32Array(9));var t=this.array;return e?(t[0]=this.a,t[1]=this.b,t[2]=0,t[3]=this.c,t[4]=this.d,t[5]=0,t[6]=this.tx,t[7]=this.ty,t[8]=1):(t[0]=this.a,t[1]=this.c,t[2]=this.tx,t[3]=this.b,t[4]=this.d,t[5]=this.ty,t[6]=0,t[7]=0,t[8]=1),t},i.Matrix.prototype.apply=function(e,t){return t=t||new i.Point,t.x=this.a*e.x+this.c*e.y+this.tx,t.y=this.b*e.x+this.d*e.y+this.ty,t},i.Matrix.prototype.applyInverse=function(e,t){t=t||new i.Point;var r=1/(this.a*this.d+this.c*-this.b);return t.x=this.d*r*e.x+-this.c*r*e.y+(this.ty*this.c-this.tx*this.d)*r,t.y=this.a*r*e.y+-this.b*r*e.x+(-this.ty*this.a+this.tx*this.b)*r,t},i.Matrix.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},i.Matrix.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},i.Matrix.prototype.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),i=this.a,n=this.c,a=this.tx;return this.a=i*t-this.b*r,this.b=i*r+this.b*t,this.c=n*t-this.d*r,this.d=n*r+this.d*t,this.tx=a*t-this.ty*r,this.ty=a*r+this.ty*t,this},i.Matrix.prototype.append=function(e){var t=this.a,r=this.b,i=this.c,n=this.d;return this.a=e.a*t+e.b*i,this.b=e.a*r+e.b*n,this.c=e.c*t+e.d*i,this.d=e.c*r+e.d*n,this.tx=e.tx*t+e.ty*i+this.tx,this.ty=e.tx*r+e.ty*n+this.ty,this},i.Matrix.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},i.identityMatrix=new i.Matrix,i.DisplayObject=function(){this.position=new i.Point,this.scale=new i.Point(1,1),this.pivot=new i.Point(0,0),this.rotation=0,this.alpha=1,this.visible=!0,this.hitArea=null,this.buttonMode=!1,this.renderable=!1,this.parent=null,this.stage=null,this.worldAlpha=1,this._interactive=!1,this.defaultCursor="pointer",this.worldTransform=new i.Matrix,this._sr=0,this._cr=1,this.filterArea=null,this._bounds=new i.Rectangle(0,0,1,1),this._currentBounds=null,this._mask=null,this._cacheAsBitmap=!1,this._cacheIsDirty=!1},i.DisplayObject.prototype.constructor=i.DisplayObject,Object.defineProperty(i.DisplayObject.prototype,"interactive",{get:function(){return this._interactive},set:function(e){this._interactive=e,this.stage&&(this.stage.dirty=!0)}}),Object.defineProperty(i.DisplayObject.prototype,"worldVisible",{get:function(){var e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}}),Object.defineProperty(i.DisplayObject.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask&&(this._mask.isMask=!1),this._mask=e,this._mask&&(this._mask.isMask=!0)}}),Object.defineProperty(i.DisplayObject.prototype,"filters",{get:function(){return this._filters},set:function(e){if(e){for(var t=[],r=0;r<e.length;r++)for(var i=e[r].passes,n=0;n<i.length;n++)t.push(i[n]);this._filterBlock={target:this,filterPasses:t}}this._filters=e}}),Object.defineProperty(i.DisplayObject.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(e){this._cacheAsBitmap!==e&&(e?this._generateCachedSprite():this._destroyCachedSprite(),this._cacheAsBitmap=e)}}),i.DisplayObject.prototype.updateTransform=function(){var e,t,r,n,a,s,o=this.parent.worldTransform,h=this.worldTransform;this.rotation%i.PI_2?(this.rotation!==this.rotationCache&&(this.rotationCache=this.rotation,this._sr=Math.sin(this.rotation),this._cr=Math.cos(this.rotation)),e=this._cr*this.scale.x,t=this._sr*this.scale.x,r=-this._sr*this.scale.y,n=this._cr*this.scale.y,a=this.position.x,s=this.position.y,(this.pivot.x||this.pivot.y)&&(a-=this.pivot.x*e+this.pivot.y*r,s-=this.pivot.x*t+this.pivot.y*n),h.a=e*o.a+t*o.c,h.b=e*o.b+t*o.d,h.c=r*o.a+n*o.c,h.d=r*o.b+n*o.d,h.tx=a*o.a+s*o.c+o.tx,h.ty=a*o.b+s*o.d+o.ty):(e=this.scale.x,n=this.scale.y,a=this.position.x-this.pivot.x*e,s=this.position.y-this.pivot.y*n,h.a=e*o.a,h.b=e*o.b,h.c=n*o.c,h.d=n*o.d,h.tx=a*o.a+s*o.c+o.tx,h.ty=a*o.b+s*o.d+o.ty),this.worldAlpha=this.alpha*this.parent.worldAlpha},i.DisplayObject.prototype.displayObjectUpdateTransform=i.DisplayObject.prototype.updateTransform,i.DisplayObject.prototype.getBounds=function(e){return e=e,i.EmptyRectangle},i.DisplayObject.prototype.getLocalBounds=function(){return this.getBounds(i.identityMatrix)},i.DisplayObject.prototype.setStageReference=function(e){this.stage=e,this._interactive&&(this.stage.dirty=!0)},i.DisplayObject.prototype.generateTexture=function(e,t,r){var n=this.getLocalBounds(),a=new i.RenderTexture(0|n.width,0|n.height,r,t,e);return i.DisplayObject._tempMatrix.tx=-n.x,i.DisplayObject._tempMatrix.ty=-n.y,a.render(this,i.DisplayObject._tempMatrix),a},i.DisplayObject.prototype.updateCache=function(){this._generateCachedSprite()},i.DisplayObject.prototype.toGlobal=function(e){return this.displayObjectUpdateTransform(),this.worldTransform.apply(e)},i.DisplayObject.prototype.toLocal=function(e,t){return t&&(e=t.toGlobal(e)),this.displayObjectUpdateTransform(),this.worldTransform.applyInverse(e)},i.DisplayObject.prototype._renderCachedSprite=function(e){this._cachedSprite.worldAlpha=this.worldAlpha,e.gl?i.Sprite.prototype._renderWebGL.call(this._cachedSprite,e):i.Sprite.prototype._renderCanvas.call(this._cachedSprite,e)},i.DisplayObject.prototype._generateCachedSprite=function(){this._cacheAsBitmap=!1;var e=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.texture.resize(0|e.width,0|e.height);else{var t=new i.RenderTexture(0|e.width,0|e.height);this._cachedSprite=new i.Sprite(t),this._cachedSprite.worldTransform=this.worldTransform}var r=this._filters;this._filters=null,this._cachedSprite.filters=r,i.DisplayObject._tempMatrix.tx=-e.x,i.DisplayObject._tempMatrix.ty=-e.y,this._cachedSprite.texture.render(this,i.DisplayObject._tempMatrix,!0),this._cachedSprite.anchor.x=-(e.x/e.width),this._cachedSprite.anchor.y=-(e.y/e.height),this._filters=r,this._cacheAsBitmap=!0},i.DisplayObject.prototype._destroyCachedSprite=function(){this._cachedSprite&&(this._cachedSprite.texture.destroy(!0),this._cachedSprite=null)},i.DisplayObject.prototype._renderWebGL=function(e){e=e},i.DisplayObject.prototype._renderCanvas=function(e){e=e},i.DisplayObject._tempMatrix=new i.Matrix,Object.defineProperty(i.DisplayObject.prototype,"x",{get:function(){return this.position.x},set:function(e){this.position.x=e}}),Object.defineProperty(i.DisplayObject.prototype,"y",{get:function(){return this.position.y},set:function(e){this.position.y=e}}),i.DisplayObjectContainer=function(){i.DisplayObject.call(this),this.children=[]},i.DisplayObjectContainer.prototype=Object.create(i.DisplayObject.prototype),i.DisplayObjectContainer.prototype.constructor=i.DisplayObjectContainer,Object.defineProperty(i.DisplayObjectContainer.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(e){var t=this.getLocalBounds().width;this.scale.x=0!==t?e/t:1,this._width=e}}),Object.defineProperty(i.DisplayObjectContainer.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(e){var t=this.getLocalBounds().height;this.scale.y=0!==t?e/t:1,this._height=e}}),i.DisplayObjectContainer.prototype.addChild=function(e){return this.addChildAt(e,this.children.length)},i.DisplayObjectContainer.prototype.addChildAt=function(e,t){if(t>=0&&t<=this.children.length)return e.parent&&e.parent.removeChild(e),e.parent=this,this.children.splice(t,0,e),this.stage&&e.setStageReference(this.stage),e;throw new Error(e+"addChildAt: The index "+t+" supplied is out of bounds "+this.children.length)},i.DisplayObjectContainer.prototype.swapChildren=function(e,t){if(e!==t){var r=this.getChildIndex(e),i=this.getChildIndex(t);if(0>r||0>i)throw new Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller.");this.children[r]=t,this.children[i]=e}},i.DisplayObjectContainer.prototype.getChildIndex=function(e){var t=this.children.indexOf(e);if(-1===t)throw new Error("The supplied DisplayObject must be a child of the caller");return t},i.DisplayObjectContainer.prototype.setChildIndex=function(e,t){if(0>t||t>=this.children.length)throw new Error("The supplied index is out of bounds");var r=this.getChildIndex(e);this.children.splice(r,1),this.children.splice(t,0,e)},i.DisplayObjectContainer.prototype.getChildAt=function(e){if(0>e||e>=this.children.length)throw new Error("getChildAt: Supplied index "+e+" does not exist in the child list, or the supplied DisplayObject must be a child of the caller");return this.children[e]},i.DisplayObjectContainer.prototype.removeChild=function(e){var t=this.children.indexOf(e);return-1!==t?this.removeChildAt(t):void 0},i.DisplayObjectContainer.prototype.removeChildAt=function(e){var t=this.getChildAt(e);return this.stage&&t.removeStageReference(),t.parent=void 0,this.children.splice(e,1),t},i.DisplayObjectContainer.prototype.removeChildren=function(e,t){var r=e||0,i="number"==typeof t?t:this.children.length,n=i-r;if(n>0&&i>=n){for(var a=this.children.splice(r,n),s=0;s<a.length;s++){var o=a[s];this.stage&&o.removeStageReference(),o.parent=void 0}return a}if(0===n&&0===this.children.length)return[];throw new Error("removeChildren: Range Error, numeric values are outside the acceptable range")},i.DisplayObjectContainer.prototype.updateTransform=function(){if(this.visible&&(this.displayObjectUpdateTransform(),!this._cacheAsBitmap))for(var e=0,t=this.children.length;t>e;e++)this.children[e].updateTransform()},i.DisplayObjectContainer.prototype.displayObjectContainerUpdateTransform=i.DisplayObjectContainer.prototype.updateTransform,i.DisplayObjectContainer.prototype.getBounds=function(){if(0===this.children.length)return i.EmptyRectangle;for(var e,t,r,n=1/0,a=1/0,s=-1/0,o=-1/0,h=!1,u=0,l=this.children.length;l>u;u++){var d=this.children[u];d.visible&&(h=!0,e=this.children[u].getBounds(),n=n<e.x?n:e.x,a=a<e.y?a:e.y,t=e.width+e.x,r=e.height+e.y,s=s>t?s:t,o=o>r?o:r)}if(!h)return i.EmptyRectangle;var c=this._bounds;return c.x=n,c.y=a,c.width=s-n,c.height=o-a,c},i.DisplayObjectContainer.prototype.getLocalBounds=function(){var e=this.worldTransform;this.worldTransform=i.identityMatrix;for(var t=0,r=this.children.length;r>t;t++)this.children[t].updateTransform();var n=this.getBounds();return this.worldTransform=e,n},i.DisplayObjectContainer.prototype.setStageReference=function(e){this.stage=e,this._interactive&&(this.stage.dirty=!0);for(var t=0,r=this.children.length;r>t;t++){var i=this.children[t];i.setStageReference(e)}},i.DisplayObjectContainer.prototype.removeStageReference=function(){for(var e=0,t=this.children.length;t>e;e++){var r=this.children[e];r.removeStageReference()}this._interactive&&(this.stage.dirty=!0),this.stage=null},i.DisplayObjectContainer.prototype._renderWebGL=function(e){if(this.visible&&!(this.alpha<=0)){if(this._cacheAsBitmap)return void this._renderCachedSprite(e);var t,r;if(this._mask||this._filters){for(this._filters&&(e.spriteBatch.flush(),e.filterManager.pushFilter(this._filterBlock)),this._mask&&(e.spriteBatch.stop(),e.maskManager.pushMask(this.mask,e),e.spriteBatch.start()),t=0,r=this.children.length;r>t;t++)this.children[t]._renderWebGL(e);e.spriteBatch.stop(),this._mask&&e.maskManager.popMask(this._mask,e),this._filters&&e.filterManager.popFilter(),e.spriteBatch.start()}else for(t=0,r=this.children.length;r>t;t++)this.children[t]._renderWebGL(e)}},i.DisplayObjectContainer.prototype._renderCanvas=function(e){if(this.visible!==!1&&0!==this.alpha){if(this._cacheAsBitmap)return void this._renderCachedSprite(e);this._mask&&e.maskManager.pushMask(this._mask,e);for(var t=0,r=this.children.length;r>t;t++){var i=this.children[t];i._renderCanvas(e)}this._mask&&e.maskManager.popMask(e)}},i.Sprite=function(e){i.DisplayObjectContainer.call(this),this.anchor=new i.Point,this.texture=e||i.Texture.emptyTexture,this._width=0,this._height=0,this.tint=16777215,this.blendMode=i.blendModes.NORMAL,this.shader=null,this.texture.baseTexture.hasLoaded?this.onTextureUpdate():this.texture.on("update",this.onTextureUpdate.bind(this)),this.renderable=!0},i.Sprite.prototype=Object.create(i.DisplayObjectContainer.prototype),i.Sprite.prototype.constructor=i.Sprite,Object.defineProperty(i.Sprite.prototype,"width",{get:function(){return this.scale.x*this.texture.frame.width},set:function(e){this.scale.x=e/this.texture.frame.width,this._width=e}}),Object.defineProperty(i.Sprite.prototype,"height",{get:function(){return this.scale.y*this.texture.frame.height},set:function(e){this.scale.y=e/this.texture.frame.height,this._height=e}}),i.Sprite.prototype.setTexture=function(e){this.texture=e,this.cachedTint=16777215},i.Sprite.prototype.onTextureUpdate=function(){this._width&&(this.scale.x=this._width/this.texture.frame.width),this._height&&(this.scale.y=this._height/this.texture.frame.height)},i.Sprite.prototype.getBounds=function(e){var t=this.texture.frame.width,r=this.texture.frame.height,i=t*(1-this.anchor.x),n=t*-this.anchor.x,a=r*(1-this.anchor.y),s=r*-this.anchor.y,o=e||this.worldTransform,h=o.a,u=o.b,l=o.c,d=o.d,c=o.tx,f=o.ty,_=-1/0,p=-1/0,m=1/0,g=1/0;if(0===u&&0===l)0>h&&(h*=-1),0>d&&(d*=-1),m=h*n+c,_=h*i+c,g=d*s+f,p=d*a+f;else{var y=h*n+l*s+c,v=d*s+u*n+f,M=h*i+l*s+c,L=d*s+u*i+f,T=h*i+l*a+c,b=d*a+u*i+f,x=h*n+l*a+c,w=d*a+u*n+f;m=m>y?y:m,m=m>M?M:m,m=m>T?T:m,m=m>x?x:m,g=g>v?v:g,g=g>L?L:g,g=g>b?b:g,g=g>w?w:g,_=y>_?y:_,_=M>_?M:_,_=T>_?T:_,_=x>_?x:_,p=v>p?v:p,p=L>p?L:p,p=b>p?b:p,p=w>p?w:p}var Y=this._bounds;return Y.x=m,Y.width=_-m,Y.y=g,Y.height=p-g,this._currentBounds=Y,Y},i.Sprite.prototype._renderWebGL=function(e){if(this.visible&&!(this.alpha<=0)){var t,r;if(this._mask||this._filters){var i=e.spriteBatch;for(this._filters&&(i.flush(),e.filterManager.pushFilter(this._filterBlock)),this._mask&&(i.stop(),e.maskManager.pushMask(this.mask,e),i.start()),i.render(this),t=0,r=this.children.length;r>t;t++)this.children[t]._renderWebGL(e);i.stop(),this._mask&&e.maskManager.popMask(this._mask,e),this._filters&&e.filterManager.popFilter(),i.start()}else for(e.spriteBatch.render(this),t=0,r=this.children.length;r>t;t++)this.children[t]._renderWebGL(e)}},i.Sprite.prototype._renderCanvas=function(e){if(!(this.visible===!1||0===this.alpha||this.texture.crop.width<=0||this.texture.crop.height<=0)){if(this.blendMode!==e.currentBlendMode&&(e.currentBlendMode=this.blendMode,e.context.globalCompositeOperation=i.blendModesCanvas[e.currentBlendMode]),this._mask&&e.maskManager.pushMask(this._mask,e),this.texture.valid){var t=this.texture.baseTexture.resolution/e.resolution;e.context.globalAlpha=this.worldAlpha,e.smoothProperty&&e.scaleMode!==this.texture.baseTexture.scaleMode&&(e.scaleMode=this.texture.baseTexture.scaleMode,e.context[e.smoothProperty]=e.scaleMode===i.scaleModes.LINEAR);var r=this.texture.trim?this.texture.trim.x-this.anchor.x*this.texture.trim.width:this.anchor.x*-this.texture.frame.width,n=this.texture.trim?this.texture.trim.y-this.anchor.y*this.texture.trim.height:this.anchor.y*-this.texture.frame.height;e.roundPixels?(e.context.setTransform(this.worldTransform.a,this.worldTransform.b,this.worldTransform.c,this.worldTransform.d,this.worldTransform.tx*e.resolution|0,this.worldTransform.ty*e.resolution|0),r=0|r,n=0|n):e.context.setTransform(this.worldTransform.a,this.worldTransform.b,this.worldTransform.c,this.worldTransform.d,this.worldTransform.tx*e.resolution,this.worldTransform.ty*e.resolution),16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=i.CanvasTinter.getTintedTexture(this,this.tint)),e.context.drawImage(this.tintedTexture,0,0,this.texture.crop.width,this.texture.crop.height,r/t,n/t,this.texture.crop.width/t,this.texture.crop.height/t)):e.context.drawImage(this.texture.baseTexture.source,this.texture.crop.x,this.texture.crop.y,this.texture.crop.width,this.texture.crop.height,r/t,n/t,this.texture.crop.width/t,this.texture.crop.height/t)}for(var a=0,s=this.children.length;s>a;a++)this.children[a]._renderCanvas(e);this._mask&&e.maskManager.popMask(e)}},i.Sprite.fromFrame=function(e){var t=i.TextureCache[e];if(!t)throw new Error('The frameId "'+e+'" does not exist in the texture cache'+this);return new i.Sprite(t)},i.Sprite.fromImage=function(e,t,r){var n=i.Texture.fromImage(e,t,r);return new i.Sprite(n)},i.SpriteBatch=function(e){i.DisplayObjectContainer.call(this),this.textureThing=e,this.ready=!1},i.SpriteBatch.prototype=Object.create(i.DisplayObjectContainer.prototype),i.SpriteBatch.prototype.constructor=i.SpriteBatch,i.SpriteBatch.prototype.initWebGL=function(e){this.fastSpriteBatch=new i.WebGLFastSpriteBatch(e),this.ready=!0},i.SpriteBatch.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},i.SpriteBatch.prototype._renderWebGL=function(e){!this.visible||this.alpha<=0||!this.children.length||(this.ready||this.initWebGL(e.gl),e.spriteBatch.stop(),e.shaderManager.setShader(e.shaderManager.fastShader),this.fastSpriteBatch.begin(this,e),this.fastSpriteBatch.render(this),e.spriteBatch.start())},i.SpriteBatch.prototype._renderCanvas=function(e){if(this.visible&&!(this.alpha<=0)&&this.children.length){var t=e.context;t.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var r=this.worldTransform,i=!0,n=0;n<this.children.length;n++){var a=this.children[n];if(a.visible){var s=a.texture,o=s.frame;if(t.globalAlpha=this.worldAlpha*a.alpha,a.rotation%(2*Math.PI)===0)i&&(t.setTransform(r.a,r.b,r.c,r.d,r.tx,r.ty),i=!1),t.drawImage(s.baseTexture.source,o.x,o.y,o.width,o.height,a.anchor.x*-o.width*a.scale.x+a.position.x+.5|0,a.anchor.y*-o.height*a.scale.y+a.position.y+.5|0,o.width*a.scale.x,o.height*a.scale.y);else{i||(i=!0),a.displayObjectUpdateTransform();var h=a.worldTransform;e.roundPixels?t.setTransform(h.a,h.b,h.c,h.d,0|h.tx,0|h.ty):t.setTransform(h.a,h.b,h.c,h.d,h.tx,h.ty),t.drawImage(s.baseTexture.source,o.x,o.y,o.width,o.height,a.anchor.x*-o.width+.5|0,a.anchor.y*-o.height+.5|0,o.width,o.height)}}}}},i.MovieClip=function(e){i.Sprite.call(this,e[0]),this.textures=e,this.animationSpeed=1,this.loop=!0,this.onComplete=null,this.currentFrame=0,this.playing=!1},i.MovieClip.prototype=Object.create(i.Sprite.prototype),i.MovieClip.prototype.constructor=i.MovieClip,Object.defineProperty(i.MovieClip.prototype,"totalFrames",{get:function(){return this.textures.length}}),i.MovieClip.prototype.stop=function(){this.playing=!1},i.MovieClip.prototype.play=function(){this.playing=!0},i.MovieClip.prototype.gotoAndStop=function(e){this.playing=!1,this.currentFrame=e;var t=this.currentFrame+.5|0;this.setTexture(this.textures[t%this.textures.length])},i.MovieClip.prototype.gotoAndPlay=function(e){this.currentFrame=e,this.playing=!0},i.MovieClip.prototype.updateTransform=function(){if(this.displayObjectContainerUpdateTransform(),this.playing){this.currentFrame+=this.animationSpeed;var e=this.currentFrame+.5|0;this.currentFrame=this.currentFrame%this.textures.length,this.loop||e<this.textures.length?this.setTexture(this.textures[e%this.textures.length]):e>=this.textures.length&&(this.gotoAndStop(this.textures.length-1),this.onComplete&&this.onComplete())}},i.MovieClip.fromFrames=function(e){for(var t=[],r=0;r<e.length;r++)t.push(new i.Texture.fromFrame(e[r]));return new i.MovieClip(t)},i.MovieClip.fromImages=function(e){for(var t=[],r=0;r<e.length;r++)t.push(new i.Texture.fromImage(e[r]));return new i.MovieClip(t)},i.FilterBlock=function(){this.visible=!0,this.renderable=!0
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     7
},i.FilterBlock.prototype.constructor=i.FilterBlock,i.Text=function(e,t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=1,i.Sprite.call(this,i.Texture.fromCanvas(this.canvas)),this.setText(e),this.setStyle(t)},i.Text.prototype=Object.create(i.Sprite.prototype),i.Text.prototype.constructor=i.Text,Object.defineProperty(i.Text.prototype,"width",{get:function(){return this.dirty&&(this.updateText(),this.dirty=!1),this.scale.x*this.texture.frame.width},set:function(e){this.scale.x=e/this.texture.frame.width,this._width=e}}),Object.defineProperty(i.Text.prototype,"height",{get:function(){return this.dirty&&(this.updateText(),this.dirty=!1),this.scale.y*this.texture.frame.height},set:function(e){this.scale.y=e/this.texture.frame.height,this._height=e}}),i.Text.prototype.setStyle=function(e){e=e||{},e.font=e.font||"bold 20pt Arial",e.fill=e.fill||"black",e.align=e.align||"left",e.stroke=e.stroke||"black",e.strokeThickness=e.strokeThickness||0,e.wordWrap=e.wordWrap||!1,e.wordWrapWidth=e.wordWrapWidth||100,e.dropShadow=e.dropShadow||!1,e.dropShadowAngle=e.dropShadowAngle||Math.PI/6,e.dropShadowDistance=e.dropShadowDistance||4,e.dropShadowColor=e.dropShadowColor||"black",this.style=e,this.dirty=!0},i.Text.prototype.setText=function(e){this.text=e.toString()||" ",this.dirty=!0},i.Text.prototype.updateText=function(){this.texture.baseTexture.resolution=this.resolution,this.context.font=this.style.font;var e=this.text;this.style.wordWrap&&(e=this.wordWrap(this.text));for(var t=e.split(/(?:\r\n|\r|\n)/),r=[],i=0,n=this.determineFontProperties(this.style.font),a=0;a<t.length;a++){var s=this.context.measureText(t[a]).width;r[a]=s,i=Math.max(i,s)}var o=i+this.style.strokeThickness;this.style.dropShadow&&(o+=this.style.dropShadowDistance),this.canvas.width=(o+this.context.lineWidth)*this.resolution;var h=n.fontSize+this.style.strokeThickness,u=h*t.length;this.style.dropShadow&&(u+=this.style.dropShadowDistance),this.canvas.height=u*this.resolution,this.context.scale(this.resolution,this.resolution),navigator.isCocoonJS&&this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.font=this.style.font,this.context.strokeStyle=this.style.stroke,this.context.lineWidth=this.style.strokeThickness,this.context.textBaseline="alphabetic";var l,d;if(this.style.dropShadow){this.context.fillStyle=this.style.dropShadowColor;var c=Math.sin(this.style.dropShadowAngle)*this.style.dropShadowDistance,f=Math.cos(this.style.dropShadowAngle)*this.style.dropShadowDistance;for(a=0;a<t.length;a++)l=this.style.strokeThickness/2,d=this.style.strokeThickness/2+a*h+n.ascent,"right"===this.style.align?l+=i-r[a]:"center"===this.style.align&&(l+=(i-r[a])/2),this.style.fill&&this.context.fillText(t[a],l+c,d+f)}for(this.context.fillStyle=this.style.fill,a=0;a<t.length;a++)l=this.style.strokeThickness/2,d=this.style.strokeThickness/2+a*h+n.ascent,"right"===this.style.align?l+=i-r[a]:"center"===this.style.align&&(l+=(i-r[a])/2),this.style.stroke&&this.style.strokeThickness&&this.context.strokeText(t[a],l,d),this.style.fill&&this.context.fillText(t[a],l,d);this.updateTexture()},i.Text.prototype.updateTexture=function(){this.texture.baseTexture.width=this.canvas.width,this.texture.baseTexture.height=this.canvas.height,this.texture.crop.width=this.texture.frame.width=this.canvas.width,this.texture.crop.height=this.texture.frame.height=this.canvas.height,this._width=this.canvas.width,this._height=this.canvas.height,this.texture.baseTexture.dirty()},i.Text.prototype._renderWebGL=function(e){this.dirty&&(this.resolution=e.resolution,this.updateText(),this.dirty=!1),i.Sprite.prototype._renderWebGL.call(this,e)},i.Text.prototype._renderCanvas=function(e){this.dirty&&(this.resolution=e.resolution,this.updateText(),this.dirty=!1),i.Sprite.prototype._renderCanvas.call(this,e)},i.Text.prototype.determineFontProperties=function(e){var t=i.Text.fontPropertiesCache[e];if(!t){t={};var r=i.Text.fontPropertiesCanvas,n=i.Text.fontPropertiesContext;n.font=e;var a=Math.ceil(n.measureText("|Mq").width),s=Math.ceil(n.measureText("M").width),o=2*s;s=1.4*s|0,r.width=a,r.height=o,n.fillStyle="#f00",n.fillRect(0,0,a,o),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText("|MÉq",0,s);var h,u,l=n.getImageData(0,0,a,o).data,d=l.length,c=4*a,f=0,_=!1;for(h=0;s>h;h++){for(u=0;c>u;u+=4)if(255!==l[f+u]){_=!0;break}if(_)break;f+=c}for(t.ascent=s-h,f=d-c,_=!1,h=o;h>s;h--){for(u=0;c>u;u+=4)if(255!==l[f+u]){_=!0;break}if(_)break;f-=c}t.descent=h-s,t.descent+=6,t.fontSize=t.ascent+t.descent,i.Text.fontPropertiesCache[e]=t}return t},i.Text.prototype.wordWrap=function(e){for(var t="",r=e.split("\n"),i=0;i<r.length;i++){for(var n=this.style.wordWrapWidth,a=r[i].split(" "),s=0;s<a.length;s++){var o=this.context.measureText(a[s]).width,h=o+this.context.measureText(" ").width;0===s||h>n?(s>0&&(t+="\n"),t+=a[s],n=this.style.wordWrapWidth-o):(n-=h,t+=" "+a[s])}i<r.length-1&&(t+="\n")}return t},i.Text.prototype.getBounds=function(e){return this.dirty&&(this.updateText(),this.dirty=!1),i.Sprite.prototype.getBounds.call(this,e)},i.Text.prototype.destroy=function(e){this.context=null,this.canvas=null,this.texture.destroy(void 0===e?!0:e)},i.Text.fontPropertiesCache={},i.Text.fontPropertiesCanvas=document.createElement("canvas"),i.Text.fontPropertiesContext=i.Text.fontPropertiesCanvas.getContext("2d"),i.BitmapText=function(e,t){i.DisplayObjectContainer.call(this),this.textWidth=0,this.textHeight=0,this._pool=[],this.setText(e),this.setStyle(t),this.updateText(),this.dirty=!1},i.BitmapText.prototype=Object.create(i.DisplayObjectContainer.prototype),i.BitmapText.prototype.constructor=i.BitmapText,i.BitmapText.prototype.setText=function(e){this.text=e||" ",this.dirty=!0},i.BitmapText.prototype.setStyle=function(e){e=e||{},e.align=e.align||"left",this.style=e;var t=e.font.split(" ");this.fontName=t[t.length-1],this.fontSize=t.length>=2?parseInt(t[t.length-2],10):i.BitmapText.fonts[this.fontName].size,this.dirty=!0,this.tint=e.tint},i.BitmapText.prototype.updateText=function(){for(var e=i.BitmapText.fonts[this.fontName],t=new i.Point,r=null,n=[],a=0,s=[],o=0,h=this.fontSize/e.size,u=0;u<this.text.length;u++){var l=this.text.charCodeAt(u);if(/(?:\r\n|\r|\n)/.test(this.text.charAt(u)))s.push(t.x),a=Math.max(a,t.x),o++,t.x=0,t.y+=e.lineHeight,r=null;else{var d=e.chars[l];d&&(r&&d.kerning[r]&&(t.x+=d.kerning[r]),n.push({texture:d.texture,line:o,charCode:l,position:new i.Point(t.x+d.xOffset,t.y+d.yOffset)}),t.x+=d.xAdvance,r=l)}}s.push(t.x),a=Math.max(a,t.x);var c=[];for(u=0;o>=u;u++){var f=0;"right"===this.style.align?f=a-s[u]:"center"===this.style.align&&(f=(a-s[u])/2),c.push(f)}var _=this.children.length,p=n.length,m=this.tint||16777215;for(u=0;p>u;u++){var g=_>u?this.children[u]:this._pool.pop();g?g.setTexture(n[u].texture):g=new i.Sprite(n[u].texture),g.position.x=(n[u].position.x+c[n[u].line])*h,g.position.y=n[u].position.y*h,g.scale.x=g.scale.y=h,g.tint=m,g.parent||this.addChild(g)}for(;this.children.length>p;){var y=this.getChildAt(this.children.length-1);this._pool.push(y),this.removeChild(y)}this.textWidth=a*h,this.textHeight=(t.y+e.lineHeight)*h},i.BitmapText.prototype.updateTransform=function(){this.dirty&&(this.updateText(),this.dirty=!1),i.DisplayObjectContainer.prototype.updateTransform.call(this)},i.BitmapText.fonts={},i.InteractionData=function(){this.global=new i.Point,this.target=null,this.originalEvent=null},i.InteractionData.prototype.getLocalPosition=function(e,t){var r=e.worldTransform,n=this.global,a=r.a,s=r.c,o=r.tx,h=r.b,u=r.d,l=r.ty,d=1/(a*u+s*-h);return t=t||new i.Point,t.x=u*d*n.x+-s*d*n.y+(l*s-o*u)*d,t.y=a*d*n.y+-h*d*n.x+(-l*a+o*h)*d,t},i.InteractionData.prototype.constructor=i.InteractionData,i.InteractionManager=function(e){this.stage=e,this.mouse=new i.InteractionData,this.touches={},this.tempPoint=new i.Point,this.mouseoverEnabled=!0,this.pool=[],this.interactiveItems=[],this.interactionDOMElement=null,this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.last=0,this.currentCursorStyle="inherit",this.mouseOut=!1,this.resolution=1,this._tempPoint=new i.Point},i.InteractionManager.prototype.constructor=i.InteractionManager,i.InteractionManager.prototype.collectInteractiveSprite=function(e,t){for(var r=e.children,i=r.length,n=i-1;n>=0;n--){var a=r[n];a._interactive?(t.interactiveChildren=!0,this.interactiveItems.push(a),a.children.length>0&&this.collectInteractiveSprite(a,a)):(a.__iParent=null,a.children.length>0&&this.collectInteractiveSprite(a,t))}},i.InteractionManager.prototype.setTarget=function(e){this.target=e,this.resolution=e.resolution,null===this.interactionDOMElement&&this.setTargetDomElement(e.view)},i.InteractionManager.prototype.setTargetDomElement=function(e){this.removeEvents(),window.navigator.msPointerEnabled&&(e.style["-ms-content-zooming"]="none",e.style["-ms-touch-action"]="none"),this.interactionDOMElement=e,e.addEventListener("mousemove",this.onMouseMove,!0),e.addEventListener("mousedown",this.onMouseDown,!0),e.addEventListener("mouseout",this.onMouseOut,!0),e.addEventListener("touchstart",this.onTouchStart,!0),e.addEventListener("touchend",this.onTouchEnd,!0),e.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0)},i.InteractionManager.prototype.removeEvents=function(){this.interactionDOMElement&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]="",this.interactionDOMElement.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0))},i.InteractionManager.prototype.update=function(){if(this.target){var e=Date.now(),t=e-this.last;if(t=t*i.INTERACTION_FREQUENCY/1e3,!(1>t)){this.last=e;var r=0;this.dirty&&this.rebuildInteractiveGraph();var n=this.interactiveItems.length,a="inherit",s=!1;for(r=0;n>r;r++){var o=this.interactiveItems[r];o.__hit=this.hitTest(o,this.mouse),this.mouse.target=o,o.__hit&&!s?(o.buttonMode&&(a=o.defaultCursor),o.interactiveChildren||(s=!0),o.__isOver||(o.mouseover&&o.mouseover(this.mouse),o.__isOver=!0)):o.__isOver&&(o.mouseout&&o.mouseout(this.mouse),o.__isOver=!1)}this.currentCursorStyle!==a&&(this.currentCursorStyle=a,this.interactionDOMElement.style.cursor=a)}}},i.InteractionManager.prototype.rebuildInteractiveGraph=function(){this.dirty=!1;for(var e=this.interactiveItems.length,t=0;e>t;t++)this.interactiveItems[t].interactiveChildren=!1;this.interactiveItems=[],this.stage.interactive&&this.interactiveItems.push(this.stage),this.collectInteractiveSprite(this.stage,this.stage)},i.InteractionManager.prototype.onMouseMove=function(e){this.dirty&&this.rebuildInteractiveGraph(),this.mouse.originalEvent=e;var t=this.interactionDOMElement.getBoundingClientRect();this.mouse.global.x=(e.clientX-t.left)*(this.target.width/t.width)/this.resolution,this.mouse.global.y=(e.clientY-t.top)*(this.target.height/t.height)/this.resolution;for(var r=this.interactiveItems.length,i=0;r>i;i++){var n=this.interactiveItems[i];n.mousemove&&n.mousemove(this.mouse)}},i.InteractionManager.prototype.onMouseDown=function(e){this.dirty&&this.rebuildInteractiveGraph(),this.mouse.originalEvent=e,i.AUTO_PREVENT_DEFAULT&&this.mouse.originalEvent.preventDefault();for(var t=this.interactiveItems.length,r=this.mouse.originalEvent,n=2===r.button||3===r.which,a=n?"rightdown":"mousedown",s=n?"rightclick":"click",o=n?"__rightIsDown":"__mouseIsDown",h=n?"__isRightDown":"__isDown",u=0;t>u;u++){var l=this.interactiveItems[u];if((l[a]||l[s])&&(l[o]=!0,l.__hit=this.hitTest(l,this.mouse),l.__hit&&(l[a]&&l[a](this.mouse),l[h]=!0,!l.interactiveChildren)))break}},i.InteractionManager.prototype.onMouseOut=function(e){this.dirty&&this.rebuildInteractiveGraph(),this.mouse.originalEvent=e;var t=this.interactiveItems.length;this.interactionDOMElement.style.cursor="inherit";for(var r=0;t>r;r++){var i=this.interactiveItems[r];i.__isOver&&(this.mouse.target=i,i.mouseout&&i.mouseout(this.mouse),i.__isOver=!1)}this.mouseOut=!0,this.mouse.global.x=-1e4,this.mouse.global.y=-1e4},i.InteractionManager.prototype.onMouseUp=function(e){this.dirty&&this.rebuildInteractiveGraph(),this.mouse.originalEvent=e;for(var t=this.interactiveItems.length,r=!1,i=this.mouse.originalEvent,n=2===i.button||3===i.which,a=n?"rightup":"mouseup",s=n?"rightclick":"click",o=n?"rightupoutside":"mouseupoutside",h=n?"__isRightDown":"__isDown",u=0;t>u;u++){var l=this.interactiveItems[u];(l[s]||l[a]||l[o])&&(l.__hit=this.hitTest(l,this.mouse),l.__hit&&!r?(l[a]&&l[a](this.mouse),l[h]&&l[s]&&l[s](this.mouse),l.interactiveChildren||(r=!0)):l[h]&&l[o]&&l[o](this.mouse),l[h]=!1)}},i.InteractionManager.prototype.hitTest=function(e,t){var r=t.global;if(!e.worldVisible)return!1;e.worldTransform.applyInverse(r,this._tempPoint);var n,a=this._tempPoint.x,s=this._tempPoint.y;if(t.target=e,e.hitArea&&e.hitArea.contains)return e.hitArea.contains(a,s);if(e instanceof i.Sprite){var o,h=e.texture.frame.width,u=e.texture.frame.height,l=-h*e.anchor.x;if(a>l&&l+h>a&&(o=-u*e.anchor.y,s>o&&o+u>s))return!0}else if(e instanceof i.Graphics){var d=e.graphicsData;for(n=0;n<d.length;n++){var c=d[n];if(c.fill&&c.shape&&c.shape.contains(a,s))return!0}}var f=e.children.length;for(n=0;f>n;n++){var _=e.children[n],p=this.hitTest(_,t);if(p)return t.target=e,!0}return!1},i.InteractionManager.prototype.onTouchMove=function(e){this.dirty&&this.rebuildInteractiveGraph();var t,r=this.interactionDOMElement.getBoundingClientRect(),i=e.changedTouches,n=0;for(n=0;n<i.length;n++){var a=i[n];t=this.touches[a.identifier],t.originalEvent=e,t.global.x=(a.clientX-r.left)*(this.target.width/r.width)/this.resolution,t.global.y=(a.clientY-r.top)*(this.target.height/r.height)/this.resolution,!navigator.isCocoonJS||r.left||r.top||e.target.style.width||e.target.style.height||(t.global.x=a.clientX,t.global.y=a.clientY);for(var s=0;s<this.interactiveItems.length;s++){var o=this.interactiveItems[s];o.touchmove&&o.__touchData&&o.__touchData[a.identifier]&&o.touchmove(t)}}},i.InteractionManager.prototype.onTouchStart=function(e){this.dirty&&this.rebuildInteractiveGraph();var t=this.interactionDOMElement.getBoundingClientRect();i.AUTO_PREVENT_DEFAULT&&e.preventDefault();for(var r=e.changedTouches,n=0;n<r.length;n++){var a=r[n],s=this.pool.pop();s||(s=new i.InteractionData),s.originalEvent=e,this.touches[a.identifier]=s,s.global.x=(a.clientX-t.left)*(this.target.width/t.width)/this.resolution,s.global.y=(a.clientY-t.top)*(this.target.height/t.height)/this.resolution,!navigator.isCocoonJS||t.left||t.top||e.target.style.width||e.target.style.height||(s.global.x=a.clientX,s.global.y=a.clientY);for(var o=this.interactiveItems.length,h=0;o>h;h++){var u=this.interactiveItems[h];if((u.touchstart||u.tap)&&(u.__hit=this.hitTest(u,s),u.__hit&&(u.touchstart&&u.touchstart(s),u.__isDown=!0,u.__touchData=u.__touchData||{},u.__touchData[a.identifier]=s,!u.interactiveChildren)))break}}},i.InteractionManager.prototype.onTouchEnd=function(e){this.dirty&&this.rebuildInteractiveGraph();for(var t=this.interactionDOMElement.getBoundingClientRect(),r=e.changedTouches,i=0;i<r.length;i++){var n=r[i],a=this.touches[n.identifier],s=!1;a.global.x=(n.clientX-t.left)*(this.target.width/t.width)/this.resolution,a.global.y=(n.clientY-t.top)*(this.target.height/t.height)/this.resolution,!navigator.isCocoonJS||t.left||t.top||e.target.style.width||e.target.style.height||(a.global.x=n.clientX,a.global.y=n.clientY);for(var o=this.interactiveItems.length,h=0;o>h;h++){var u=this.interactiveItems[h];u.__touchData&&u.__touchData[n.identifier]&&(u.__hit=this.hitTest(u,u.__touchData[n.identifier]),a.originalEvent=e,(u.touchend||u.tap)&&(u.__hit&&!s?(u.touchend&&u.touchend(a),u.__isDown&&u.tap&&u.tap(a),u.interactiveChildren||(s=!0)):u.__isDown&&u.touchendoutside&&u.touchendoutside(a),u.__isDown=!1),u.__touchData[n.identifier]=null)}this.pool.push(a),this.touches[n.identifier]=null}},i.Stage=function(e){i.DisplayObjectContainer.call(this),this.worldTransform=new i.Matrix,this.interactive=!0,this.interactionManager=new i.InteractionManager(this),this.dirty=!0,this.stage=this,this.stage.hitArea=new i.Rectangle(0,0,1e5,1e5),this.setBackgroundColor(e)},i.Stage.prototype=Object.create(i.DisplayObjectContainer.prototype),i.Stage.prototype.constructor=i.Stage,i.Stage.prototype.setInteractionDelegate=function(e){this.interactionManager.setTargetDomElement(e)},i.Stage.prototype.updateTransform=function(){this.worldAlpha=1;for(var e=0,t=this.children.length;t>e;e++)this.children[e].updateTransform();this.dirty&&(this.dirty=!1,this.interactionManager.dirty=!0),this.interactive&&this.interactionManager.update()},i.Stage.prototype.setBackgroundColor=function(e){this.backgroundColor=e||0,this.backgroundColorSplit=i.hex2rgb(this.backgroundColor);var t=this.backgroundColor.toString(16);t="000000".substr(0,6-t.length)+t,this.backgroundColorString="#"+t},i.Stage.prototype.getMousePosition=function(){return this.interactionManager.mouse.global},function(e){for(var t=0,r=["ms","moz","webkit","o"],i=0;i<r.length&&!e.requestAnimationFrame;++i)e.requestAnimationFrame=e[r[i]+"RequestAnimationFrame"],e.cancelAnimationFrame=e[r[i]+"CancelAnimationFrame"]||e[r[i]+"CancelRequestAnimationFrame"];e.requestAnimationFrame||(e.requestAnimationFrame=function(r){var i=(new Date).getTime(),n=Math.max(0,16-(i-t)),a=e.setTimeout(function(){r(i+n)},n);return t=i+n,a}),e.cancelAnimationFrame||(e.cancelAnimationFrame=function(e){clearTimeout(e)}),e.requestAnimFrame=e.requestAnimationFrame}(this),i.hex2rgb=function(e){return[(e>>16&255)/255,(e>>8&255)/255,(255&e)/255]},i.rgb2hex=function(e){return(255*e[0]<<16)+(255*e[1]<<8)+255*e[2]},"function"!=typeof Function.prototype.bind&&(Function.prototype.bind=function(){return function(e){function t(){for(var i=arguments.length,a=new Array(i);i--;)a[i]=arguments[i];return a=n.concat(a),r.apply(this instanceof t?this:e,a)}var r=this,i=arguments.length-1,n=[];if(i>0)for(n.length=i;i--;)n[i]=arguments[i+1];if("function"!=typeof r)throw new TypeError;return t.prototype=function a(e){return e&&(a.prototype=e),this instanceof a?void 0:new a}(r.prototype),t}}()),i.AjaxRequest=function(){var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"];if(!window.ActiveXObject)return window.XMLHttpRequest?new window.XMLHttpRequest:!1;for(var t=0;t<e.length;t++)try{return new window.ActiveXObject(e[t])}catch(r){}},i.canUseNewCanvasBlendModes=function(){if("undefined"==typeof document)return!1;var e=document.createElement("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="#000",t.fillRect(0,0,1,1),t.globalCompositeOperation="multiply",t.fillStyle="#fff",t.fillRect(0,0,1,1),0===t.getImageData(0,0,1,1).data[0]},i.getNextPowerOfTwo=function(e){if(e>0&&0===(e&e-1))return e;for(var t=1;e>t;)t<<=1;return t},i.isPowerOfTwo=function(e,t){return e>0&&0===(e&e-1)&&t>0&&0===(t&t-1)},i.EventTarget={call:function(e){e&&(e=e.prototype||e,i.EventTarget.mixin(e))},mixin:function(e){e.listeners=function(e){return this._listeners=this._listeners||{},this._listeners[e]?this._listeners[e].slice():[]},e.emit=e.dispatchEvent=function(e,t){if(this._listeners=this._listeners||{},"object"==typeof e&&(t=e,e=e.type),t&&t.__isEventObject===!0||(t=new i.Event(this,e,t)),this._listeners&&this._listeners[e]){var r,n=this._listeners[e].slice(0),a=n.length,s=n[0];for(r=0;a>r;s=n[++r])if(s.call(this,t),t.stoppedImmediate)return this;if(t.stopped)return this}return this.parent&&this.parent.emit&&this.parent.emit.call(this.parent,e,t),this},e.on=e.addEventListener=function(e,t){return this._listeners=this._listeners||{},(this._listeners[e]=this._listeners[e]||[]).push(t),this},e.once=function(e,t){function r(){t.apply(i.off(e,r),arguments)}this._listeners=this._listeners||{};var i=this;return r._originalHandler=t,this.on(e,r)},e.off=e.removeEventListener=function(e,t){if(this._listeners=this._listeners||{},!this._listeners[e])return this;for(var r=this._listeners[e],i=t?r.length:0;i-->0;)(r[i]===t||r[i]._originalHandler===t)&&r.splice(i,1);return 0===r.length&&delete this._listeners[e],this},e.removeAllListeners=function(e){return this._listeners=this._listeners||{},this._listeners[e]?(delete this._listeners[e],this):this}}},i.Event=function(e,t,r){this.__isEventObject=!0,this.stopped=!1,this.stoppedImmediate=!1,this.target=e,this.type=t,this.data=r,this.content=r,this.timeStamp=Date.now()},i.Event.prototype.stopPropagation=function(){this.stopped=!0},i.Event.prototype.stopImmediatePropagation=function(){this.stoppedImmediate=!0},i.autoDetectRenderer=function(e,t,r){e||(e=800),t||(t=600);var n=function(){try{var e=document.createElement("canvas");return!!window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl"))}catch(t){return!1}}();return n?new i.WebGLRenderer(e,t,r):new i.CanvasRenderer(e,t,r)},i.autoDetectRecommendedRenderer=function(e,t,r){e||(e=800),t||(t=600);var n=function(){try{var e=document.createElement("canvas");return!!window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl"))}catch(t){return!1}}(),a=/Android/i.test(navigator.userAgent);return n&&!a?new i.WebGLRenderer(e,t,r):new i.CanvasRenderer(e,t,r)},i.PolyK={},i.PolyK.Triangulate=function(e){var t=!0,r=e.length>>1;if(3>r)return[];for(var n=[],a=[],s=0;r>s;s++)a.push(s);s=0;for(var o=r;o>3;){var h=a[(s+0)%o],u=a[(s+1)%o],l=a[(s+2)%o],d=e[2*h],c=e[2*h+1],f=e[2*u],_=e[2*u+1],p=e[2*l],m=e[2*l+1],g=!1;if(i.PolyK._convex(d,c,f,_,p,m,t)){g=!0;for(var y=0;o>y;y++){var v=a[y];if(v!==h&&v!==u&&v!==l&&i.PolyK._PointInTriangle(e[2*v],e[2*v+1],d,c,f,_,p,m)){g=!1;break}}}if(g)n.push(h,u,l),a.splice((s+1)%o,1),o--,s=0;else if(s++>3*o){if(!t)return null;for(n=[],a=[],s=0;r>s;s++)a.push(s);s=0,o=r,t=!1}}return n.push(a[0],a[1],a[2]),n},i.PolyK._PointInTriangle=function(e,t,r,i,n,a,s,o){var h=s-r,u=o-i,l=n-r,d=a-i,c=e-r,f=t-i,_=h*h+u*u,p=h*l+u*d,m=h*c+u*f,g=l*l+d*d,y=l*c+d*f,v=1/(_*g-p*p),M=(g*m-p*y)*v,L=(_*y-p*m)*v;return M>=0&&L>=0&&1>M+L},i.PolyK._convex=function(e,t,r,i,n,a,s){return(t-i)*(n-r)+(r-e)*(a-i)>=0===s},i.initDefaultShaders=function(){},i.CompileVertexShader=function(e,t){return i._CompileShader(e,t,e.VERTEX_SHADER)},i.CompileFragmentShader=function(e,t){return i._CompileShader(e,t,e.FRAGMENT_SHADER)},i._CompileShader=function(e,t,r){var i=t.join("\n"),n=e.createShader(r);return e.shaderSource(n,i),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS)?n:(window.console.log(e.getShaderInfoLog(n)),null)},i.compileProgram=function(e,t,r){var n=i.CompileFragmentShader(e,r),a=i.CompileVertexShader(e,t),s=e.createProgram();return e.attachShader(s,a),e.attachShader(s,n),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS)||window.console.log("Could not initialise shaders"),s},i.PixiShader=function(e){this._UID=i._UID++,this.gl=e,this.program=null,this.fragmentSrc=["precision lowp float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;","}"],this.textureCount=0,this.firstRun=!0,this.dirty=!0,this.attributes=[],this.init()},i.PixiShader.prototype.constructor=i.PixiShader,i.PixiShader.prototype.init=function(){var e=this.gl,t=i.compileProgram(e,this.vertexSrc||i.PixiShader.defaultVertexSrc,this.fragmentSrc);e.useProgram(t),this.uSampler=e.getUniformLocation(t,"uSampler"),this.projectionVector=e.getUniformLocation(t,"projectionVector"),this.offsetVector=e.getUniformLocation(t,"offsetVector"),this.dimensions=e.getUniformLocation(t,"dimensions"),this.aVertexPosition=e.getAttribLocation(t,"aVertexPosition"),this.aTextureCoord=e.getAttribLocation(t,"aTextureCoord"),this.colorAttribute=e.getAttribLocation(t,"aColor"),-1===this.colorAttribute&&(this.colorAttribute=2),this.attributes=[this.aVertexPosition,this.aTextureCoord,this.colorAttribute];for(var r in this.uniforms)this.uniforms[r].uniformLocation=e.getUniformLocation(t,r);this.initUniforms(),this.program=t},i.PixiShader.prototype.initUniforms=function(){this.textureCount=1;var e,t=this.gl;for(var r in this.uniforms){e=this.uniforms[r];var i=e.type;"sampler2D"===i?(e._init=!1,null!==e.value&&this.initSampler2D(e)):"mat2"===i||"mat3"===i||"mat4"===i?(e.glMatrix=!0,e.glValueLength=1,"mat2"===i?e.glFunc=t.uniformMatrix2fv:"mat3"===i?e.glFunc=t.uniformMatrix3fv:"mat4"===i&&(e.glFunc=t.uniformMatrix4fv)):(e.glFunc=t["uniform"+i],e.glValueLength="2f"===i||"2i"===i?2:"3f"===i||"3i"===i?3:"4f"===i||"4i"===i?4:1)}},i.PixiShader.prototype.initSampler2D=function(e){if(e.value&&e.value.baseTexture&&e.value.baseTexture.hasLoaded){var t=this.gl;if(t.activeTexture(t["TEXTURE"+this.textureCount]),t.bindTexture(t.TEXTURE_2D,e.value.baseTexture._glTextures[t.id]),e.textureData){var r=e.textureData,i=r.magFilter?r.magFilter:t.LINEAR,n=r.minFilter?r.minFilter:t.LINEAR,a=r.wrapS?r.wrapS:t.CLAMP_TO_EDGE,s=r.wrapT?r.wrapT:t.CLAMP_TO_EDGE,o=r.luminance?t.LUMINANCE:t.RGBA;if(r.repeat&&(a=t.REPEAT,s=t.REPEAT),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!!r.flipY),r.width){var h=r.width?r.width:512,u=r.height?r.height:2,l=r.border?r.border:0;t.texImage2D(t.TEXTURE_2D,0,o,h,u,l,o,t.UNSIGNED_BYTE,null)}else t.texImage2D(t.TEXTURE_2D,0,o,t.RGBA,t.UNSIGNED_BYTE,e.value.baseTexture.source);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,s)}t.uniform1i(e.uniformLocation,this.textureCount),e._init=!0,this.textureCount++}},i.PixiShader.prototype.syncUniforms=function(){this.textureCount=1;var e,t=this.gl;for(var r in this.uniforms)e=this.uniforms[r],1===e.glValueLength?e.glMatrix===!0?e.glFunc.call(t,e.uniformLocation,e.transpose,e.value):e.glFunc.call(t,e.uniformLocation,e.value):2===e.glValueLength?e.glFunc.call(t,e.uniformLocation,e.value.x,e.value.y):3===e.glValueLength?e.glFunc.call(t,e.uniformLocation,e.value.x,e.value.y,e.value.z):4===e.glValueLength?e.glFunc.call(t,e.uniformLocation,e.value.x,e.value.y,e.value.z,e.value.w):"sampler2D"===e.type&&(e._init?(t.activeTexture(t["TEXTURE"+this.textureCount]),e.value.baseTexture._dirty[t.id]?i.instances[t.id].updateTexture(e.value.baseTexture):t.bindTexture(t.TEXTURE_2D,e.value.baseTexture._glTextures[t.id]),t.uniform1i(e.uniformLocation,this.textureCount),this.textureCount++):this.initSampler2D(e))},i.PixiShader.prototype.destroy=function(){this.gl.deleteProgram(this.program),this.uniforms=null,this.gl=null,this.attributes=null},i.PixiShader.defaultVertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","uniform vec2 projectionVector;","uniform vec2 offsetVector;","varying vec2 vTextureCoord;","varying vec4 vColor;","const vec2 center = vec2(-1.0, 1.0);","void main(void) {","   gl_Position = vec4( ((aVertexPosition + offsetVector) / projectionVector) + center , 0.0, 1.0);","   vTextureCoord = aTextureCoord;","   vColor = vec4(aColor.rgb * aColor.a, aColor.a);","}"],i.PixiFastShader=function(e){this._UID=i._UID++,this.gl=e,this.program=null,this.fragmentSrc=["precision lowp float;","varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;","}"],this.vertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","attribute vec2 aTextureCoord;","attribute float aColor;","uniform vec2 projectionVector;","uniform vec2 offsetVector;","uniform mat3 uMatrix;","varying vec2 vTextureCoord;","varying float vColor;","const vec2 center = vec2(-1.0, 1.0);","void main(void) {","   vec2 v;","   vec2 sv = aVertexPosition * aScale;","   v.x = (sv.x) * cos(aRotation) - (sv.y) * sin(aRotation);","   v.y = (sv.x) * sin(aRotation) + (sv.y) * cos(aRotation);","   v = ( uMatrix * vec3(v + aPositionCoord , 1.0) ).xy ;","   gl_Position = vec4( ( v / projectionVector) + center , 0.0, 1.0);","   vTextureCoord = aTextureCoord;","   vColor = aColor;","}"],this.textureCount=0,this.init()},i.PixiFastShader.prototype.constructor=i.PixiFastShader,i.PixiFastShader.prototype.init=function(){var e=this.gl,t=i.compileProgram(e,this.vertexSrc,this.fragmentSrc);e.useProgram(t),this.uSampler=e.getUniformLocation(t,"uSampler"),this.projectionVector=e.getUniformLocation(t,"projectionVector"),this.offsetVector=e.getUniformLocation(t,"offsetVector"),this.dimensions=e.getUniformLocation(t,"dimensions"),this.uMatrix=e.getUniformLocation(t,"uMatrix"),this.aVertexPosition=e.getAttribLocation(t,"aVertexPosition"),this.aPositionCoord=e.getAttribLocation(t,"aPositionCoord"),this.aScale=e.getAttribLocation(t,"aScale"),this.aRotation=e.getAttribLocation(t,"aRotation"),this.aTextureCoord=e.getAttribLocation(t,"aTextureCoord"),this.colorAttribute=e.getAttribLocation(t,"aColor"),-1===this.colorAttribute&&(this.colorAttribute=2),this.attributes=[this.aVertexPosition,this.aPositionCoord,this.aScale,this.aRotation,this.aTextureCoord,this.colorAttribute],this.program=t},i.PixiFastShader.prototype.destroy=function(){this.gl.deleteProgram(this.program),this.uniforms=null,this.gl=null,this.attributes=null},i.StripShader=function(e){this._UID=i._UID++,this.gl=e,this.program=null,this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * alpha;","}"],this.vertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform vec2 projectionVector;","uniform vec2 offsetVector;","varying vec2 vTextureCoord;","void main(void) {","   vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);","   v -= offsetVector.xyx;","   gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);","   vTextureCoord = aTextureCoord;","}"],this.init()},i.StripShader.prototype.constructor=i.StripShader,i.StripShader.prototype.init=function(){var e=this.gl,t=i.compileProgram(e,this.vertexSrc,this.fragmentSrc);e.useProgram(t),this.uSampler=e.getUniformLocation(t,"uSampler"),this.projectionVector=e.getUniformLocation(t,"projectionVector"),this.offsetVector=e.getUniformLocation(t,"offsetVector"),this.colorAttribute=e.getAttribLocation(t,"aColor"),this.aVertexPosition=e.getAttribLocation(t,"aVertexPosition"),this.aTextureCoord=e.getAttribLocation(t,"aTextureCoord"),this.attributes=[this.aVertexPosition,this.aTextureCoord],this.translationMatrix=e.getUniformLocation(t,"translationMatrix"),this.alpha=e.getUniformLocation(t,"alpha"),this.program=t},i.StripShader.prototype.destroy=function(){this.gl.deleteProgram(this.program),this.uniforms=null,this.gl=null,this.attribute=null},i.PrimitiveShader=function(e){this._UID=i._UID++,this.gl=e,this.program=null,this.fragmentSrc=["precision mediump float;","varying vec4 vColor;","void main(void) {","   gl_FragColor = vColor;","}"],this.vertexSrc=["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform vec2 projectionVector;","uniform vec2 offsetVector;","uniform float alpha;","uniform float flipY;","uniform vec3 tint;","varying vec4 vColor;","void main(void) {","   vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);","   v -= offsetVector.xyx;","   gl_Position = vec4( v.x / projectionVector.x -1.0, (v.y / projectionVector.y * -flipY) + flipY , 0.0, 1.0);","   vColor = aColor * vec4(tint * alpha, alpha);","}"],this.init()
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     8
},i.PrimitiveShader.prototype.constructor=i.PrimitiveShader,i.PrimitiveShader.prototype.init=function(){var e=this.gl,t=i.compileProgram(e,this.vertexSrc,this.fragmentSrc);e.useProgram(t),this.projectionVector=e.getUniformLocation(t,"projectionVector"),this.offsetVector=e.getUniformLocation(t,"offsetVector"),this.tintColor=e.getUniformLocation(t,"tint"),this.flipY=e.getUniformLocation(t,"flipY"),this.aVertexPosition=e.getAttribLocation(t,"aVertexPosition"),this.colorAttribute=e.getAttribLocation(t,"aColor"),this.attributes=[this.aVertexPosition,this.colorAttribute],this.translationMatrix=e.getUniformLocation(t,"translationMatrix"),this.alpha=e.getUniformLocation(t,"alpha"),this.program=t},i.PrimitiveShader.prototype.destroy=function(){this.gl.deleteProgram(this.program),this.uniforms=null,this.gl=null,this.attributes=null},i.ComplexPrimitiveShader=function(e){this._UID=i._UID++,this.gl=e,this.program=null,this.fragmentSrc=["precision mediump float;","varying vec4 vColor;","void main(void) {","   gl_FragColor = vColor;","}"],this.vertexSrc=["attribute vec2 aVertexPosition;","uniform mat3 translationMatrix;","uniform vec2 projectionVector;","uniform vec2 offsetVector;","uniform vec3 tint;","uniform float alpha;","uniform vec3 color;","uniform float flipY;","varying vec4 vColor;","void main(void) {","   vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);","   v -= offsetVector.xyx;","   gl_Position = vec4( v.x / projectionVector.x -1.0, (v.y / projectionVector.y * -flipY) + flipY , 0.0, 1.0);","   vColor = vec4(color * alpha * tint, alpha);","}"],this.init()},i.ComplexPrimitiveShader.prototype.constructor=i.ComplexPrimitiveShader,i.ComplexPrimitiveShader.prototype.init=function(){var e=this.gl,t=i.compileProgram(e,this.vertexSrc,this.fragmentSrc);e.useProgram(t),this.projectionVector=e.getUniformLocation(t,"projectionVector"),this.offsetVector=e.getUniformLocation(t,"offsetVector"),this.tintColor=e.getUniformLocation(t,"tint"),this.color=e.getUniformLocation(t,"color"),this.flipY=e.getUniformLocation(t,"flipY"),this.aVertexPosition=e.getAttribLocation(t,"aVertexPosition"),this.attributes=[this.aVertexPosition,this.colorAttribute],this.translationMatrix=e.getUniformLocation(t,"translationMatrix"),this.alpha=e.getUniformLocation(t,"alpha"),this.program=t},i.ComplexPrimitiveShader.prototype.destroy=function(){this.gl.deleteProgram(this.program),this.uniforms=null,this.gl=null,this.attribute=null},i.WebGLGraphics=function(){},i.WebGLGraphics.renderGraphics=function(e,t){var r,n=t.gl,a=t.projection,s=t.offset,o=t.shaderManager.primitiveShader;e.dirty&&i.WebGLGraphics.updateGraphics(e,n);for(var h=e._webGL[n.id],u=0;u<h.data.length;u++)1===h.data[u].mode?(r=h.data[u],t.stencilManager.pushStencil(e,r,t),n.drawElements(n.TRIANGLE_FAN,4,n.UNSIGNED_SHORT,2*(r.indices.length-4)),t.stencilManager.popStencil(e,r,t)):(r=h.data[u],t.shaderManager.setShader(o),o=t.shaderManager.primitiveShader,n.uniformMatrix3fv(o.translationMatrix,!1,e.worldTransform.toArray(!0)),n.uniform1f(o.flipY,1),n.uniform2f(o.projectionVector,a.x,-a.y),n.uniform2f(o.offsetVector,-s.x,-s.y),n.uniform3fv(o.tintColor,i.hex2rgb(e.tint)),n.uniform1f(o.alpha,e.worldAlpha),n.bindBuffer(n.ARRAY_BUFFER,r.buffer),n.vertexAttribPointer(o.aVertexPosition,2,n.FLOAT,!1,24,0),n.vertexAttribPointer(o.colorAttribute,4,n.FLOAT,!1,24,8),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r.indexBuffer),n.drawElements(n.TRIANGLE_STRIP,r.indices.length,n.UNSIGNED_SHORT,0))},i.WebGLGraphics.updateGraphics=function(e,t){var r=e._webGL[t.id];r||(r=e._webGL[t.id]={lastIndex:0,data:[],gl:t}),e.dirty=!1;var n;if(e.clearDirty){for(e.clearDirty=!1,n=0;n<r.data.length;n++){var a=r.data[n];a.reset(),i.WebGLGraphics.graphicsDataPool.push(a)}r.data=[],r.lastIndex=0}var s;for(n=r.lastIndex;n<e.graphicsData.length;n++){var o=e.graphicsData[n];if(o.type===i.Graphics.POLY){if(o.points=o.shape.points.slice(),o.shape.closed&&(o.points[0]!==o.points[o.points.length-2]||o.points[1]!==o.points[o.points.length-1])&&o.points.push(o.points[0],o.points[1]),o.fill&&o.points.length>=6)if(o.points.length<12){s=i.WebGLGraphics.switchMode(r,0);var h=i.WebGLGraphics.buildPoly(o,s);h||(s=i.WebGLGraphics.switchMode(r,1),i.WebGLGraphics.buildComplexPoly(o,s))}else s=i.WebGLGraphics.switchMode(r,1),i.WebGLGraphics.buildComplexPoly(o,s);o.lineWidth>0&&(s=i.WebGLGraphics.switchMode(r,0),i.WebGLGraphics.buildLine(o,s))}else s=i.WebGLGraphics.switchMode(r,0),o.type===i.Graphics.RECT?i.WebGLGraphics.buildRectangle(o,s):o.type===i.Graphics.CIRC||o.type===i.Graphics.ELIP?i.WebGLGraphics.buildCircle(o,s):o.type===i.Graphics.RREC&&i.WebGLGraphics.buildRoundedRectangle(o,s);r.lastIndex++}for(n=0;n<r.data.length;n++)s=r.data[n],s.dirty&&s.upload()},i.WebGLGraphics.switchMode=function(e,t){var r;return e.data.length?(r=e.data[e.data.length-1],(r.mode!==t||1===t)&&(r=i.WebGLGraphics.graphicsDataPool.pop()||new i.WebGLGraphicsData(e.gl),r.mode=t,e.data.push(r))):(r=i.WebGLGraphics.graphicsDataPool.pop()||new i.WebGLGraphicsData(e.gl),r.mode=t,e.data.push(r)),r.dirty=!0,r},i.WebGLGraphics.buildRectangle=function(e,t){var r=e.shape,n=r.x,a=r.y,s=r.width,o=r.height;if(e.fill){var h=i.hex2rgb(e.fillColor),u=e.fillAlpha,l=h[0]*u,d=h[1]*u,c=h[2]*u,f=t.points,_=t.indices,p=f.length/6;f.push(n,a),f.push(l,d,c,u),f.push(n+s,a),f.push(l,d,c,u),f.push(n,a+o),f.push(l,d,c,u),f.push(n+s,a+o),f.push(l,d,c,u),_.push(p,p,p+1,p+2,p+3,p+3)}if(e.lineWidth){var m=e.points;e.points=[n,a,n+s,a,n+s,a+o,n,a+o,n,a],i.WebGLGraphics.buildLine(e,t),e.points=m}},i.WebGLGraphics.buildRoundedRectangle=function(e,t){var r=e.shape,n=r.x,a=r.y,s=r.width,o=r.height,h=r.radius,u=[];if(u.push(n,a+h),u=u.concat(i.WebGLGraphics.quadraticBezierCurve(n,a+o-h,n,a+o,n+h,a+o)),u=u.concat(i.WebGLGraphics.quadraticBezierCurve(n+s-h,a+o,n+s,a+o,n+s,a+o-h)),u=u.concat(i.WebGLGraphics.quadraticBezierCurve(n+s,a+h,n+s,a,n+s-h,a)),u=u.concat(i.WebGLGraphics.quadraticBezierCurve(n+h,a,n,a,n,a+h)),e.fill){var l=i.hex2rgb(e.fillColor),d=e.fillAlpha,c=l[0]*d,f=l[1]*d,_=l[2]*d,p=t.points,m=t.indices,g=p.length/6,y=i.PolyK.Triangulate(u),v=0;for(v=0;v<y.length;v+=3)m.push(y[v]+g),m.push(y[v]+g),m.push(y[v+1]+g),m.push(y[v+2]+g),m.push(y[v+2]+g);for(v=0;v<u.length;v++)p.push(u[v],u[++v],c,f,_,d)}if(e.lineWidth){var M=e.points;e.points=u,i.WebGLGraphics.buildLine(e,t),e.points=M}},i.WebGLGraphics.quadraticBezierCurve=function(e,t,r,i,n,a){function s(e,t,r){var i=t-e;return e+i*r}for(var o,h,u,l,d,c,f=20,_=[],p=0,m=0;f>=m;m++)p=m/f,o=s(e,r,p),h=s(t,i,p),u=s(r,n,p),l=s(i,a,p),d=s(o,u,p),c=s(h,l,p),_.push(d,c);return _},i.WebGLGraphics.buildCircle=function(e,t){var r,n,a=e.shape,s=a.x,o=a.y;e.type===i.Graphics.CIRC?(r=a.radius,n=a.radius):(r=a.width,n=a.height);var h=40,u=2*Math.PI/h,l=0;if(e.fill){var d=i.hex2rgb(e.fillColor),c=e.fillAlpha,f=d[0]*c,_=d[1]*c,p=d[2]*c,m=t.points,g=t.indices,y=m.length/6;for(g.push(y),l=0;h+1>l;l++)m.push(s,o,f,_,p,c),m.push(s+Math.sin(u*l)*r,o+Math.cos(u*l)*n,f,_,p,c),g.push(y++,y++);g.push(y-1)}if(e.lineWidth){var v=e.points;for(e.points=[],l=0;h+1>l;l++)e.points.push(s+Math.sin(u*l)*r,o+Math.cos(u*l)*n);i.WebGLGraphics.buildLine(e,t),e.points=v}},i.WebGLGraphics.buildLine=function(e,t){var r=0,n=e.points;if(0!==n.length){if(e.lineWidth%2)for(r=0;r<n.length;r++)n[r]+=.5;var a=new i.Point(n[0],n[1]),s=new i.Point(n[n.length-2],n[n.length-1]);if(a.x===s.x&&a.y===s.y){n=n.slice(),n.pop(),n.pop(),s=new i.Point(n[n.length-2],n[n.length-1]);var o=s.x+.5*(a.x-s.x),h=s.y+.5*(a.y-s.y);n.unshift(o,h),n.push(o,h)}var u,l,d,c,f,_,p,m,g,y,v,M,L,T,b,x,w,Y,D,S,k,C,A,E=t.points,F=t.indices,R=n.length/2,P=n.length,B=E.length/6,O=e.lineWidth/2,j=i.hex2rgb(e.lineColor),I=e.lineAlpha,W=j[0]*I,G=j[1]*I,U=j[2]*I;for(d=n[0],c=n[1],f=n[2],_=n[3],g=-(c-_),y=d-f,A=Math.sqrt(g*g+y*y),g/=A,y/=A,g*=O,y*=O,E.push(d-g,c-y,W,G,U,I),E.push(d+g,c+y,W,G,U,I),r=1;R-1>r;r++)d=n[2*(r-1)],c=n[2*(r-1)+1],f=n[2*r],_=n[2*r+1],p=n[2*(r+1)],m=n[2*(r+1)+1],g=-(c-_),y=d-f,A=Math.sqrt(g*g+y*y),g/=A,y/=A,g*=O,y*=O,v=-(_-m),M=f-p,A=Math.sqrt(v*v+M*M),v/=A,M/=A,v*=O,M*=O,b=-y+c-(-y+_),x=-g+f-(-g+d),w=(-g+d)*(-y+_)-(-g+f)*(-y+c),Y=-M+m-(-M+_),D=-v+f-(-v+p),S=(-v+p)*(-M+_)-(-v+f)*(-M+m),k=b*D-Y*x,Math.abs(k)<.1?(k+=10.1,E.push(f-g,_-y,W,G,U,I),E.push(f+g,_+y,W,G,U,I)):(u=(x*S-D*w)/k,l=(Y*w-b*S)/k,C=(u-f)*(u-f)+(l-_)+(l-_),C>19600?(L=g-v,T=y-M,A=Math.sqrt(L*L+T*T),L/=A,T/=A,L*=O,T*=O,E.push(f-L,_-T),E.push(W,G,U,I),E.push(f+L,_+T),E.push(W,G,U,I),E.push(f-L,_-T),E.push(W,G,U,I),P++):(E.push(u,l),E.push(W,G,U,I),E.push(f-(u-f),_-(l-_)),E.push(W,G,U,I)));for(d=n[2*(R-2)],c=n[2*(R-2)+1],f=n[2*(R-1)],_=n[2*(R-1)+1],g=-(c-_),y=d-f,A=Math.sqrt(g*g+y*y),g/=A,y/=A,g*=O,y*=O,E.push(f-g,_-y),E.push(W,G,U,I),E.push(f+g,_+y),E.push(W,G,U,I),F.push(B),r=0;P>r;r++)F.push(B++);F.push(B-1)}},i.WebGLGraphics.buildComplexPoly=function(e,t){var r=e.points.slice();if(!(r.length<6)){var n=t.indices;t.points=r,t.alpha=e.fillAlpha,t.color=i.hex2rgb(e.fillColor);for(var a,s,o=1/0,h=-1/0,u=1/0,l=-1/0,d=0;d<r.length;d+=2)a=r[d],s=r[d+1],o=o>a?a:o,h=a>h?a:h,u=u>s?s:u,l=s>l?s:l;r.push(o,u,h,u,h,l,o,l);var c=r.length/2;for(d=0;c>d;d++)n.push(d)}},i.WebGLGraphics.buildPoly=function(e,t){var r=e.points;if(!(r.length<6)){var n=t.points,a=t.indices,s=r.length/2,o=i.hex2rgb(e.fillColor),h=e.fillAlpha,u=o[0]*h,l=o[1]*h,d=o[2]*h,c=i.PolyK.Triangulate(r);if(!c)return!1;var f=n.length/6,_=0;for(_=0;_<c.length;_+=3)a.push(c[_]+f),a.push(c[_]+f),a.push(c[_+1]+f),a.push(c[_+2]+f),a.push(c[_+2]+f);for(_=0;s>_;_++)n.push(r[2*_],r[2*_+1],u,l,d,h);return!0}},i.WebGLGraphics.graphicsDataPool=[],i.WebGLGraphicsData=function(e){this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.mode=1,this.alpha=1,this.dirty=!0},i.WebGLGraphicsData.prototype.reset=function(){this.points=[],this.indices=[]},i.WebGLGraphicsData.prototype.upload=function(){var e=this.gl;this.glPoints=new i.Float32Array(this.points),e.bindBuffer(e.ARRAY_BUFFER,this.buffer),e.bufferData(e.ARRAY_BUFFER,this.glPoints,e.STATIC_DRAW),this.glIndicies=new i.Uint16Array(this.indices),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.glIndicies,e.STATIC_DRAW),this.dirty=!1},i.glContexts=[],i.instances=[],i.WebGLRenderer=function(e,t,r){if(r)for(var n in i.defaultRenderOptions)"undefined"==typeof r[n]&&(r[n]=i.defaultRenderOptions[n]);else r=i.defaultRenderOptions;i.defaultRenderer||(i.sayHello("webGL"),i.defaultRenderer=this),this.type=i.WEBGL_RENDERER,this.resolution=r.resolution,this.transparent=r.transparent,this.autoResize=r.autoResize||!1,this.preserveDrawingBuffer=r.preserveDrawingBuffer,this.clearBeforeRender=r.clearBeforeRender,this.width=e||800,this.height=t||600,this.view=r.view||document.createElement("canvas"),this.contextLostBound=this.handleContextLost.bind(this),this.contextRestoredBound=this.handleContextRestored.bind(this),this.view.addEventListener("webglcontextlost",this.contextLostBound,!1),this.view.addEventListener("webglcontextrestored",this.contextRestoredBound,!1),this._contextOptions={alpha:this.transparent,antialias:r.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer},this.projection=new i.Point,this.offset=new i.Point(0,0),this.shaderManager=new i.WebGLShaderManager,this.spriteBatch=new i.WebGLSpriteBatch,this.maskManager=new i.WebGLMaskManager,this.filterManager=new i.WebGLFilterManager,this.stencilManager=new i.WebGLStencilManager,this.blendModeManager=new i.WebGLBlendModeManager,this.renderSession={},this.renderSession.gl=this.gl,this.renderSession.drawCount=0,this.renderSession.shaderManager=this.shaderManager,this.renderSession.maskManager=this.maskManager,this.renderSession.filterManager=this.filterManager,this.renderSession.blendModeManager=this.blendModeManager,this.renderSession.spriteBatch=this.spriteBatch,this.renderSession.stencilManager=this.stencilManager,this.renderSession.renderer=this,this.renderSession.resolution=this.resolution,this.initContext(),this.mapBlendModes()},i.WebGLRenderer.prototype.constructor=i.WebGLRenderer,i.WebGLRenderer.prototype.initContext=function(){var e=this.view.getContext("webgl",this._contextOptions)||this.view.getContext("experimental-webgl",this._contextOptions);if(this.gl=e,!e)throw new Error("This browser does not support webGL. Try using the canvas renderer");this.glContextId=e.id=i.WebGLRenderer.glContextId++,i.glContexts[this.glContextId]=e,i.instances[this.glContextId]=this,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),this.shaderManager.setContext(e),this.spriteBatch.setContext(e),this.maskManager.setContext(e),this.filterManager.setContext(e),this.blendModeManager.setContext(e),this.stencilManager.setContext(e),this.renderSession.gl=this.gl,this.resize(this.width,this.height)},i.WebGLRenderer.prototype.render=function(e){if(!this.contextLost){this.__stage!==e&&(e.interactive&&e.interactionManager.removeEvents(),this.__stage=e),e.updateTransform();var t=this.gl;e._interactive?e._interactiveEventsAdded||(e._interactiveEventsAdded=!0,e.interactionManager.setTarget(this)):e._interactiveEventsAdded&&(e._interactiveEventsAdded=!1,e.interactionManager.setTarget(this)),t.viewport(0,0,this.width,this.height),t.bindFramebuffer(t.FRAMEBUFFER,null),this.clearBeforeRender&&(this.transparent?t.clearColor(0,0,0,0):t.clearColor(e.backgroundColorSplit[0],e.backgroundColorSplit[1],e.backgroundColorSplit[2],1),t.clear(t.COLOR_BUFFER_BIT)),this.renderDisplayObject(e,this.projection)}},i.WebGLRenderer.prototype.renderDisplayObject=function(e,t,r){this.renderSession.blendModeManager.setBlendMode(i.blendModes.NORMAL),this.renderSession.drawCount=0,this.renderSession.flipY=r?-1:1,this.renderSession.projection=t,this.renderSession.offset=this.offset,this.spriteBatch.begin(this.renderSession),this.filterManager.begin(this.renderSession,r),e._renderWebGL(this.renderSession),this.spriteBatch.end()},i.WebGLRenderer.prototype.resize=function(e,t){this.width=e*this.resolution,this.height=t*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px"),this.gl.viewport(0,0,this.width,this.height),this.projection.x=this.width/2/this.resolution,this.projection.y=-this.height/2/this.resolution},i.WebGLRenderer.prototype.updateTexture=function(e){if(e.hasLoaded){var t=this.gl;return e._glTextures[t.id]||(e._glTextures[t.id]=t.createTexture()),t.bindTexture(t.TEXTURE_2D,e._glTextures[t.id]),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultipliedAlpha),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e.source),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e.scaleMode===i.scaleModes.LINEAR?t.LINEAR:t.NEAREST),e.mipmap&&i.isPowerOfTwo(e.width,e.height)?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e.scaleMode===i.scaleModes.LINEAR?t.LINEAR_MIPMAP_LINEAR:t.NEAREST_MIPMAP_NEAREST),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e.scaleMode===i.scaleModes.LINEAR?t.LINEAR:t.NEAREST),e._powerOf2?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)),e._dirty[t.id]=!1,e._glTextures[t.id]}},i.WebGLRenderer.prototype.handleContextLost=function(e){e.preventDefault(),this.contextLost=!0},i.WebGLRenderer.prototype.handleContextRestored=function(){this.initContext();for(var e in i.TextureCache){var t=i.TextureCache[e].baseTexture;t._glTextures=[]}this.contextLost=!1},i.WebGLRenderer.prototype.destroy=function(){this.view.removeEventListener("webglcontextlost",this.contextLostBound),this.view.removeEventListener("webglcontextrestored",this.contextRestoredBound),i.glContexts[this.glContextId]=null,this.projection=null,this.offset=null,this.shaderManager.destroy(),this.spriteBatch.destroy(),this.maskManager.destroy(),this.filterManager.destroy(),this.shaderManager=null,this.spriteBatch=null,this.maskManager=null,this.filterManager=null,this.gl=null,this.renderSession=null},i.WebGLRenderer.prototype.mapBlendModes=function(){var e=this.gl;i.blendModesWebGL||(i.blendModesWebGL=[],i.blendModesWebGL[i.blendModes.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.ADD]=[e.SRC_ALPHA,e.DST_ALPHA],i.blendModesWebGL[i.blendModes.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.SCREEN]=[e.SRC_ALPHA,e.ONE],i.blendModesWebGL[i.blendModes.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],i.blendModesWebGL[i.blendModes.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA])},i.WebGLRenderer.glContextId=0,i.WebGLBlendModeManager=function(){this.currentBlendMode=99999},i.WebGLBlendModeManager.prototype.constructor=i.WebGLBlendModeManager,i.WebGLBlendModeManager.prototype.setContext=function(e){this.gl=e},i.WebGLBlendModeManager.prototype.setBlendMode=function(e){if(this.currentBlendMode===e)return!1;this.currentBlendMode=e;var t=i.blendModesWebGL[this.currentBlendMode];return this.gl.blendFunc(t[0],t[1]),!0},i.WebGLBlendModeManager.prototype.destroy=function(){this.gl=null},i.WebGLMaskManager=function(){},i.WebGLMaskManager.prototype.constructor=i.WebGLMaskManager,i.WebGLMaskManager.prototype.setContext=function(e){this.gl=e},i.WebGLMaskManager.prototype.pushMask=function(e,t){var r=t.gl;e.dirty&&i.WebGLGraphics.updateGraphics(e,r),e._webGL[r.id].data.length&&t.stencilManager.pushStencil(e,e._webGL[r.id].data[0],t)},i.WebGLMaskManager.prototype.popMask=function(e,t){var r=this.gl;t.stencilManager.popStencil(e,e._webGL[r.id].data[0],t)},i.WebGLMaskManager.prototype.destroy=function(){this.gl=null},i.WebGLStencilManager=function(){this.stencilStack=[],this.reverse=!0,this.count=0},i.WebGLStencilManager.prototype.setContext=function(e){this.gl=e},i.WebGLStencilManager.prototype.pushStencil=function(e,t,r){var i=this.gl;this.bindGraphics(e,t,r),0===this.stencilStack.length&&(i.enable(i.STENCIL_TEST),i.clear(i.STENCIL_BUFFER_BIT),this.reverse=!0,this.count=0),this.stencilStack.push(t);var n=this.count;i.colorMask(!1,!1,!1,!1),i.stencilFunc(i.ALWAYS,0,255),i.stencilOp(i.KEEP,i.KEEP,i.INVERT),1===t.mode?(i.drawElements(i.TRIANGLE_FAN,t.indices.length-4,i.UNSIGNED_SHORT,0),this.reverse?(i.stencilFunc(i.EQUAL,255-n,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)):(i.stencilFunc(i.EQUAL,n,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)),i.drawElements(i.TRIANGLE_FAN,4,i.UNSIGNED_SHORT,2*(t.indices.length-4)),this.reverse?i.stencilFunc(i.EQUAL,255-(n+1),255):i.stencilFunc(i.EQUAL,n+1,255),this.reverse=!this.reverse):(this.reverse?(i.stencilFunc(i.EQUAL,n,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,255-n,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),i.drawElements(i.TRIANGLE_STRIP,t.indices.length,i.UNSIGNED_SHORT,0),this.reverse?i.stencilFunc(i.EQUAL,n+1,255):i.stencilFunc(i.EQUAL,255-(n+1),255)),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),this.count++},i.WebGLStencilManager.prototype.bindGraphics=function(e,t,r){this._currentGraphics=e;var n,a=this.gl,s=r.projection,o=r.offset;1===t.mode?(n=r.shaderManager.complexPrimitiveShader,r.shaderManager.setShader(n),a.uniform1f(n.flipY,r.flipY),a.uniformMatrix3fv(n.translationMatrix,!1,e.worldTransform.toArray(!0)),a.uniform2f(n.projectionVector,s.x,-s.y),a.uniform2f(n.offsetVector,-o.x,-o.y),a.uniform3fv(n.tintColor,i.hex2rgb(e.tint)),a.uniform3fv(n.color,t.color),a.uniform1f(n.alpha,e.worldAlpha*t.alpha),a.bindBuffer(a.ARRAY_BUFFER,t.buffer),a.vertexAttribPointer(n.aVertexPosition,2,a.FLOAT,!1,8,0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,t.indexBuffer)):(n=r.shaderManager.primitiveShader,r.shaderManager.setShader(n),a.uniformMatrix3fv(n.translationMatrix,!1,e.worldTransform.toArray(!0)),a.uniform1f(n.flipY,r.flipY),a.uniform2f(n.projectionVector,s.x,-s.y),a.uniform2f(n.offsetVector,-o.x,-o.y),a.uniform3fv(n.tintColor,i.hex2rgb(e.tint)),a.uniform1f(n.alpha,e.worldAlpha),a.bindBuffer(a.ARRAY_BUFFER,t.buffer),a.vertexAttribPointer(n.aVertexPosition,2,a.FLOAT,!1,24,0),a.vertexAttribPointer(n.colorAttribute,4,a.FLOAT,!1,24,8),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,t.indexBuffer))},i.WebGLStencilManager.prototype.popStencil=function(e,t,r){var i=this.gl;if(this.stencilStack.pop(),this.count--,0===this.stencilStack.length)i.disable(i.STENCIL_TEST);else{var n=this.count;this.bindGraphics(e,t,r),i.colorMask(!1,!1,!1,!1),1===t.mode?(this.reverse=!this.reverse,this.reverse?(i.stencilFunc(i.EQUAL,255-(n+1),255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,n+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),i.drawElements(i.TRIANGLE_FAN,4,i.UNSIGNED_SHORT,2*(t.indices.length-4)),i.stencilFunc(i.ALWAYS,0,255),i.stencilOp(i.KEEP,i.KEEP,i.INVERT),i.drawElements(i.TRIANGLE_FAN,t.indices.length-4,i.UNSIGNED_SHORT,0),this.reverse?i.stencilFunc(i.EQUAL,n,255):i.stencilFunc(i.EQUAL,255-n,255)):(this.reverse?(i.stencilFunc(i.EQUAL,n+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)):(i.stencilFunc(i.EQUAL,255-(n+1),255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)),i.drawElements(i.TRIANGLE_STRIP,t.indices.length,i.UNSIGNED_SHORT,0),this.reverse?i.stencilFunc(i.EQUAL,n,255):i.stencilFunc(i.EQUAL,255-n,255)),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP)}},i.WebGLStencilManager.prototype.destroy=function(){this.stencilStack=null,this.gl=null},i.WebGLShaderManager=function(){this.maxAttibs=10,this.attribState=[],this.tempAttribState=[];for(var e=0;e<this.maxAttibs;e++)this.attribState[e]=!1;this.stack=[]},i.WebGLShaderManager.prototype.constructor=i.WebGLShaderManager,i.WebGLShaderManager.prototype.setContext=function(e){this.gl=e,this.primitiveShader=new i.PrimitiveShader(e),this.complexPrimitiveShader=new i.ComplexPrimitiveShader(e),this.defaultShader=new i.PixiShader(e),this.fastShader=new i.PixiFastShader(e),this.stripShader=new i.StripShader(e),this.setShader(this.defaultShader)},i.WebGLShaderManager.prototype.setAttribs=function(e){var t;for(t=0;t<this.tempAttribState.length;t++)this.tempAttribState[t]=!1;for(t=0;t<e.length;t++){var r=e[t];this.tempAttribState[r]=!0}var i=this.gl;for(t=0;t<this.attribState.length;t++)this.attribState[t]!==this.tempAttribState[t]&&(this.attribState[t]=this.tempAttribState[t],this.tempAttribState[t]?i.enableVertexAttribArray(t):i.disableVertexAttribArray(t))},i.WebGLShaderManager.prototype.setShader=function(e){return this._currentId===e._UID?!1:(this._currentId=e._UID,this.currentShader=e,this.gl.useProgram(e.program),this.setAttribs(e.attributes),!0)},i.WebGLShaderManager.prototype.destroy=function(){this.attribState=null,this.tempAttribState=null,this.primitiveShader.destroy(),this.complexPrimitiveShader.destroy(),this.defaultShader.destroy(),this.fastShader.destroy(),this.stripShader.destroy(),this.gl=null},i.WebGLSpriteBatch=function(){this.vertSize=5,this.size=2e3;var e=4*this.size*4*this.vertSize,t=6*this.size;this.vertices=new i.ArrayBuffer(e),this.positions=new i.Float32Array(this.vertices),this.colors=new i.Uint32Array(this.vertices),this.indices=new i.Uint16Array(t),this.lastIndexCount=0;for(var r=0,n=0;t>r;r+=6,n+=4)this.indices[r+0]=n+0,this.indices[r+1]=n+1,this.indices[r+2]=n+2,this.indices[r+3]=n+0,this.indices[r+4]=n+2,this.indices[r+5]=n+3;this.drawing=!1,this.currentBatchSize=0,this.currentBaseTexture=null,this.dirty=!0,this.textures=[],this.blendModes=[],this.shaders=[],this.sprites=[],this.defaultShader=new i.AbstractFilter(["precision lowp float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;","}"])},i.WebGLSpriteBatch.prototype.setContext=function(e){this.gl=e,this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indices,e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,this.vertices,e.DYNAMIC_DRAW),this.currentBlendMode=99999;var t=new i.PixiShader(e);t.fragmentSrc=this.defaultShader.fragmentSrc,t.uniforms={},t.init(),this.defaultShader.shaders[e.id]=t},i.WebGLSpriteBatch.prototype.begin=function(e){this.renderSession=e,this.shader=this.renderSession.shaderManager.defaultShader,this.start()},i.WebGLSpriteBatch.prototype.end=function(){this.flush()},i.WebGLSpriteBatch.prototype.render=function(e){var t=e.texture;this.currentBatchSize>=this.size&&(this.flush(),this.currentBaseTexture=t.baseTexture);var r=t._uvs;if(r){var i,n,a,s,o=e.anchor.x,h=e.anchor.y;if(t.trim){var u=t.trim;n=u.x-o*u.width,i=n+t.crop.width,s=u.y-h*u.height,a=s+t.crop.height}else i=t.frame.width*(1-o),n=t.frame.width*-o,a=t.frame.height*(1-h),s=t.frame.height*-h;var l=4*this.currentBatchSize*this.vertSize,d=t.baseTexture.resolution,c=e.worldTransform,f=c.a/d,_=c.b/d,p=c.c/d,m=c.d/d,g=c.tx,y=c.ty,v=this.colors,M=this.positions;this.renderSession.roundPixels?(M[l]=f*n+p*s+g|0,M[l+1]=m*s+_*n+y|0,M[l+5]=f*i+p*s+g|0,M[l+6]=m*s+_*i+y|0,M[l+10]=f*i+p*a+g|0,M[l+11]=m*a+_*i+y|0,M[l+15]=f*n+p*a+g|0,M[l+16]=m*a+_*n+y|0):(M[l]=f*n+p*s+g,M[l+1]=m*s+_*n+y,M[l+5]=f*i+p*s+g,M[l+6]=m*s+_*i+y,M[l+10]=f*i+p*a+g,M[l+11]=m*a+_*i+y,M[l+15]=f*n+p*a+g,M[l+16]=m*a+_*n+y),M[l+2]=r.x0,M[l+3]=r.y0,M[l+7]=r.x1,M[l+8]=r.y1,M[l+12]=r.x2,M[l+13]=r.y2,M[l+17]=r.x3,M[l+18]=r.y3;var L=e.tint;v[l+4]=v[l+9]=v[l+14]=v[l+19]=(L>>16)+(65280&L)+((255&L)<<16)+(255*e.worldAlpha<<24),this.sprites[this.currentBatchSize++]=e}},i.WebGLSpriteBatch.prototype.renderTilingSprite=function(e){var t=e.tilingTexture;this.currentBatchSize>=this.size&&(this.flush(),this.currentBaseTexture=t.baseTexture),e._uvs||(e._uvs=new i.TextureUvs);var r=e._uvs;e.tilePosition.x%=t.baseTexture.width*e.tileScaleOffset.x,e.tilePosition.y%=t.baseTexture.height*e.tileScaleOffset.y;var n=e.tilePosition.x/(t.baseTexture.width*e.tileScaleOffset.x),a=e.tilePosition.y/(t.baseTexture.height*e.tileScaleOffset.y),s=e.width/t.baseTexture.width/(e.tileScale.x*e.tileScaleOffset.x),o=e.height/t.baseTexture.height/(e.tileScale.y*e.tileScaleOffset.y);r.x0=0-n,r.y0=0-a,r.x1=1*s-n,r.y1=0-a,r.x2=1*s-n,r.y2=1*o-a,r.x3=0-n,r.y3=1*o-a;var h=e.tint,u=(h>>16)+(65280&h)+((255&h)<<16)+(255*e.alpha<<24),l=this.positions,d=this.colors,c=e.width,f=e.height,_=e.anchor.x,p=e.anchor.y,m=c*(1-_),g=c*-_,y=f*(1-p),v=f*-p,M=4*this.currentBatchSize*this.vertSize,L=t.baseTexture.resolution,T=e.worldTransform,b=T.a/L,x=T.b/L,w=T.c/L,Y=T.d/L,D=T.tx,S=T.ty;l[M++]=b*g+w*v+D,l[M++]=Y*v+x*g+S,l[M++]=r.x0,l[M++]=r.y0,d[M++]=u,l[M++]=b*m+w*v+D,l[M++]=Y*v+x*m+S,l[M++]=r.x1,l[M++]=r.y1,d[M++]=u,l[M++]=b*m+w*y+D,l[M++]=Y*y+x*m+S,l[M++]=r.x2,l[M++]=r.y2,d[M++]=u,l[M++]=b*g+w*y+D,l[M++]=Y*y+x*g+S,l[M++]=r.x3,l[M++]=r.y3,d[M++]=u,this.sprites[this.currentBatchSize++]=e},i.WebGLSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var e,t=this.gl;if(this.dirty){this.dirty=!1,t.activeTexture(t.TEXTURE0),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),e=this.defaultShader.shaders[t.id];var r=4*this.vertSize;t.vertexAttribPointer(e.aVertexPosition,2,t.FLOAT,!1,r,0),t.vertexAttribPointer(e.aTextureCoord,2,t.FLOAT,!1,r,8),t.vertexAttribPointer(e.colorAttribute,4,t.UNSIGNED_BYTE,!0,r,16)}if(this.currentBatchSize>.5*this.size)t.bufferSubData(t.ARRAY_BUFFER,0,this.vertices);else{var n=this.positions.subarray(0,4*this.currentBatchSize*this.vertSize);t.bufferSubData(t.ARRAY_BUFFER,0,n)}for(var a,s,o,h,u=0,l=0,d=null,c=this.renderSession.blendModeManager.currentBlendMode,f=null,_=!1,p=!1,m=0,g=this.currentBatchSize;g>m;m++){if(h=this.sprites[m],a=h.texture.baseTexture,s=h.blendMode,o=h.shader||this.defaultShader,_=c!==s,p=f!==o,(d!==a||_||p)&&(this.renderBatch(d,u,l),l=m,u=0,d=a,_&&(c=s,this.renderSession.blendModeManager.setBlendMode(c)),p)){f=o,e=f.shaders[t.id],e||(e=new i.PixiShader(t),e.fragmentSrc=f.fragmentSrc,e.uniforms=f.uniforms,e.init(),f.shaders[t.id]=e),this.renderSession.shaderManager.setShader(e),e.dirty&&e.syncUniforms();var y=this.renderSession.projection;t.uniform2f(e.projectionVector,y.x,y.y);var v=this.renderSession.offset;t.uniform2f(e.offsetVector,v.x,v.y)}u++}this.renderBatch(d,u,l),this.currentBatchSize=0}},i.WebGLSpriteBatch.prototype.renderBatch=function(e,t,r){if(0!==t){var i=this.gl;e._dirty[i.id]?this.renderSession.renderer.updateTexture(e):i.bindTexture(i.TEXTURE_2D,e._glTextures[i.id]),i.drawElements(i.TRIANGLES,6*t,i.UNSIGNED_SHORT,6*r*2),this.renderSession.drawCount++}},i.WebGLSpriteBatch.prototype.stop=function(){this.flush(),this.dirty=!0},i.WebGLSpriteBatch.prototype.start=function(){this.dirty=!0},i.WebGLSpriteBatch.prototype.destroy=function(){this.vertices=null,this.indices=null,this.gl.deleteBuffer(this.vertexBuffer),this.gl.deleteBuffer(this.indexBuffer),this.currentBaseTexture=null,this.gl=null},i.WebGLFastSpriteBatch=function(e){this.vertSize=10,this.maxSize=6e3,this.size=this.maxSize;var t=4*this.size*this.vertSize,r=6*this.maxSize;this.vertices=new i.Float32Array(t),this.indices=new i.Uint16Array(r),this.vertexBuffer=null,this.indexBuffer=null,this.lastIndexCount=0;for(var n=0,a=0;r>n;n+=6,a+=4)this.indices[n+0]=a+0,this.indices[n+1]=a+1,this.indices[n+2]=a+2,this.indices[n+3]=a+0,this.indices[n+4]=a+2,this.indices[n+5]=a+3;this.drawing=!1,this.currentBatchSize=0,this.currentBaseTexture=null,this.currentBlendMode=0,this.renderSession=null,this.shader=null,this.matrix=null,this.setContext(e)},i.WebGLFastSpriteBatch.prototype.constructor=i.WebGLFastSpriteBatch,i.WebGLFastSpriteBatch.prototype.setContext=function(e){this.gl=e,this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indices,e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,this.vertices,e.DYNAMIC_DRAW)},i.WebGLFastSpriteBatch.prototype.begin=function(e,t){this.renderSession=t,this.shader=this.renderSession.shaderManager.fastShader,this.matrix=e.worldTransform.toArray(!0),this.start()},i.WebGLFastSpriteBatch.prototype.end=function(){this.flush()},i.WebGLFastSpriteBatch.prototype.render=function(e){var t=e.children,r=t[0];if(r.texture._uvs){this.currentBaseTexture=r.texture.baseTexture,r.blendMode!==this.renderSession.blendModeManager.currentBlendMode&&(this.flush(),this.renderSession.blendModeManager.setBlendMode(r.blendMode));for(var i=0,n=t.length;n>i;i++)this.renderSprite(t[i]);this.flush()}},i.WebGLFastSpriteBatch.prototype.renderSprite=function(e){if(e.visible&&(e.texture.baseTexture===this.currentBaseTexture||(this.flush(),this.currentBaseTexture=e.texture.baseTexture,e.texture._uvs))){var t,r,i,n,a,s,o,h,u=this.vertices;if(t=e.texture._uvs,r=e.texture.frame.width,i=e.texture.frame.height,e.texture.trim){var l=e.texture.trim;a=l.x-e.anchor.x*l.width,n=a+e.texture.crop.width,o=l.y-e.anchor.y*l.height,s=o+e.texture.crop.height}else n=e.texture.frame.width*(1-e.anchor.x),a=e.texture.frame.width*-e.anchor.x,s=e.texture.frame.height*(1-e.anchor.y),o=e.texture.frame.height*-e.anchor.y;h=4*this.currentBatchSize*this.vertSize,u[h++]=a,u[h++]=o,u[h++]=e.position.x,u[h++]=e.position.y,u[h++]=e.scale.x,u[h++]=e.scale.y,u[h++]=e.rotation,u[h++]=t.x0,u[h++]=t.y1,u[h++]=e.alpha,u[h++]=n,u[h++]=o,u[h++]=e.position.x,u[h++]=e.position.y,u[h++]=e.scale.x,u[h++]=e.scale.y,u[h++]=e.rotation,u[h++]=t.x1,u[h++]=t.y1,u[h++]=e.alpha,u[h++]=n,u[h++]=s,u[h++]=e.position.x,u[h++]=e.position.y,u[h++]=e.scale.x,u[h++]=e.scale.y,u[h++]=e.rotation,u[h++]=t.x2,u[h++]=t.y2,u[h++]=e.alpha,u[h++]=a,u[h++]=s,u[h++]=e.position.x,u[h++]=e.position.y,u[h++]=e.scale.x,u[h++]=e.scale.y,u[h++]=e.rotation,u[h++]=t.x3,u[h++]=t.y3,u[h++]=e.alpha,this.currentBatchSize++,this.currentBatchSize>=this.size&&this.flush()
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
     9
}},i.WebGLFastSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var e=this.gl;if(this.currentBaseTexture._glTextures[e.id]||this.renderSession.renderer.updateTexture(this.currentBaseTexture,e),e.bindTexture(e.TEXTURE_2D,this.currentBaseTexture._glTextures[e.id]),this.currentBatchSize>.5*this.size)e.bufferSubData(e.ARRAY_BUFFER,0,this.vertices);else{var t=this.vertices.subarray(0,4*this.currentBatchSize*this.vertSize);e.bufferSubData(e.ARRAY_BUFFER,0,t)}e.drawElements(e.TRIANGLES,6*this.currentBatchSize,e.UNSIGNED_SHORT,0),this.currentBatchSize=0,this.renderSession.drawCount++}},i.WebGLFastSpriteBatch.prototype.stop=function(){this.flush()},i.WebGLFastSpriteBatch.prototype.start=function(){var e=this.gl;e.activeTexture(e.TEXTURE0),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var t=this.renderSession.projection;e.uniform2f(this.shader.projectionVector,t.x,t.y),e.uniformMatrix3fv(this.shader.uMatrix,!1,this.matrix);var r=4*this.vertSize;e.vertexAttribPointer(this.shader.aVertexPosition,2,e.FLOAT,!1,r,0),e.vertexAttribPointer(this.shader.aPositionCoord,2,e.FLOAT,!1,r,8),e.vertexAttribPointer(this.shader.aScale,2,e.FLOAT,!1,r,16),e.vertexAttribPointer(this.shader.aRotation,1,e.FLOAT,!1,r,24),e.vertexAttribPointer(this.shader.aTextureCoord,2,e.FLOAT,!1,r,28),e.vertexAttribPointer(this.shader.colorAttribute,1,e.FLOAT,!1,r,36)},i.WebGLFilterManager=function(){this.filterStack=[],this.offsetX=0,this.offsetY=0},i.WebGLFilterManager.prototype.constructor=i.WebGLFilterManager,i.WebGLFilterManager.prototype.setContext=function(e){this.gl=e,this.texturePool=[],this.initShaderBuffers()},i.WebGLFilterManager.prototype.begin=function(e,t){this.renderSession=e,this.defaultShader=e.shaderManager.defaultShader;var r=this.renderSession.projection;this.width=2*r.x,this.height=2*-r.y,this.buffer=t},i.WebGLFilterManager.prototype.pushFilter=function(e){var t=this.gl,r=this.renderSession.projection,n=this.renderSession.offset;e._filterArea=e.target.filterArea||e.target.getBounds(),this.filterStack.push(e);var a=e.filterPasses[0];this.offsetX+=e._filterArea.x,this.offsetY+=e._filterArea.y;var s=this.texturePool.pop();s?s.resize(this.width,this.height):s=new i.FilterTexture(this.gl,this.width,this.height),t.bindTexture(t.TEXTURE_2D,s.texture);var o=e._filterArea,h=a.padding;o.x-=h,o.y-=h,o.width+=2*h,o.height+=2*h,o.x<0&&(o.x=0),o.width>this.width&&(o.width=this.width),o.y<0&&(o.y=0),o.height>this.height&&(o.height=this.height),t.bindFramebuffer(t.FRAMEBUFFER,s.frameBuffer),t.viewport(0,0,o.width,o.height),r.x=o.width/2,r.y=-o.height/2,n.x=-o.x,n.y=-o.y,t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e._glFilterTexture=s},i.WebGLFilterManager.prototype.popFilter=function(){var e=this.gl,t=this.filterStack.pop(),r=t._filterArea,n=t._glFilterTexture,a=this.renderSession.projection,s=this.renderSession.offset;if(t.filterPasses.length>1){e.viewport(0,0,r.width,r.height),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray[0]=0,this.vertexArray[1]=r.height,this.vertexArray[2]=r.width,this.vertexArray[3]=r.height,this.vertexArray[4]=0,this.vertexArray[5]=0,this.vertexArray[6]=r.width,this.vertexArray[7]=0,e.bufferSubData(e.ARRAY_BUFFER,0,this.vertexArray),e.bindBuffer(e.ARRAY_BUFFER,this.uvBuffer),this.uvArray[2]=r.width/this.width,this.uvArray[5]=r.height/this.height,this.uvArray[6]=r.width/this.width,this.uvArray[7]=r.height/this.height,e.bufferSubData(e.ARRAY_BUFFER,0,this.uvArray);var o=n,h=this.texturePool.pop();h||(h=new i.FilterTexture(this.gl,this.width,this.height)),h.resize(this.width,this.height),e.bindFramebuffer(e.FRAMEBUFFER,h.frameBuffer),e.clear(e.COLOR_BUFFER_BIT),e.disable(e.BLEND);for(var u=0;u<t.filterPasses.length-1;u++){var l=t.filterPasses[u];e.bindFramebuffer(e.FRAMEBUFFER,h.frameBuffer),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,o.texture),this.applyFilterPass(l,r,r.width,r.height);var d=o;o=h,h=d}e.enable(e.BLEND),n=o,this.texturePool.push(h)}var c=t.filterPasses[t.filterPasses.length-1];this.offsetX-=r.x,this.offsetY-=r.y;var f=this.width,_=this.height,p=0,m=0,g=this.buffer;if(0===this.filterStack.length)e.colorMask(!0,!0,!0,!0);else{var y=this.filterStack[this.filterStack.length-1];r=y._filterArea,f=r.width,_=r.height,p=r.x,m=r.y,g=y._glFilterTexture.frameBuffer}a.x=f/2,a.y=-_/2,s.x=p,s.y=m,r=t._filterArea;var v=r.x-p,M=r.y-m;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray[0]=v,this.vertexArray[1]=M+r.height,this.vertexArray[2]=v+r.width,this.vertexArray[3]=M+r.height,this.vertexArray[4]=v,this.vertexArray[5]=M,this.vertexArray[6]=v+r.width,this.vertexArray[7]=M,e.bufferSubData(e.ARRAY_BUFFER,0,this.vertexArray),e.bindBuffer(e.ARRAY_BUFFER,this.uvBuffer),this.uvArray[2]=r.width/this.width,this.uvArray[5]=r.height/this.height,this.uvArray[6]=r.width/this.width,this.uvArray[7]=r.height/this.height,e.bufferSubData(e.ARRAY_BUFFER,0,this.uvArray),e.viewport(0,0,f,_),e.bindFramebuffer(e.FRAMEBUFFER,g),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,n.texture),this.applyFilterPass(c,r,f,_),this.texturePool.push(n),t._glFilterTexture=null},i.WebGLFilterManager.prototype.applyFilterPass=function(e,t,r,n){var a=this.gl,s=e.shaders[a.id];s||(s=new i.PixiShader(a),s.fragmentSrc=e.fragmentSrc,s.uniforms=e.uniforms,s.init(),e.shaders[a.id]=s),this.renderSession.shaderManager.setShader(s),a.uniform2f(s.projectionVector,r/2,-n/2),a.uniform2f(s.offsetVector,0,0),e.uniforms.dimensions&&(e.uniforms.dimensions.value[0]=this.width,e.uniforms.dimensions.value[1]=this.height,e.uniforms.dimensions.value[2]=this.vertexArray[0],e.uniforms.dimensions.value[3]=this.vertexArray[5]),s.syncUniforms(),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.vertexAttribPointer(s.aVertexPosition,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.vertexAttribPointer(s.aTextureCoord,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.colorBuffer),a.vertexAttribPointer(s.colorAttribute,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0),this.renderSession.drawCount++},i.WebGLFilterManager.prototype.initShaderBuffers=function(){var e=this.gl;this.vertexBuffer=e.createBuffer(),this.uvBuffer=e.createBuffer(),this.colorBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.vertexArray=new i.Float32Array([0,0,1,0,0,1,1,1]),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,this.vertexArray,e.STATIC_DRAW),this.uvArray=new i.Float32Array([0,0,1,0,0,1,1,1]),e.bindBuffer(e.ARRAY_BUFFER,this.uvBuffer),e.bufferData(e.ARRAY_BUFFER,this.uvArray,e.STATIC_DRAW),this.colorArray=new i.Float32Array([1,16777215,1,16777215,1,16777215,1,16777215]),e.bindBuffer(e.ARRAY_BUFFER,this.colorBuffer),e.bufferData(e.ARRAY_BUFFER,this.colorArray,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,1,3,2]),e.STATIC_DRAW)},i.WebGLFilterManager.prototype.destroy=function(){var e=this.gl;this.filterStack=null,this.offsetX=0,this.offsetY=0;for(var t=0;t<this.texturePool.length;t++)this.texturePool[t].destroy();this.texturePool=null,e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.uvBuffer),e.deleteBuffer(this.colorBuffer),e.deleteBuffer(this.indexBuffer)},i.FilterTexture=function(e,t,r,n){this.gl=e,this.frameBuffer=e.createFramebuffer(),this.texture=e.createTexture(),n=n||i.scaleModes.DEFAULT,e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n===i.scaleModes.LINEAR?e.LINEAR:e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n===i.scaleModes.LINEAR?e.LINEAR:e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture,0),this.renderBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,this.renderBuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,this.renderBuffer),this.resize(t,r)},i.FilterTexture.prototype.constructor=i.FilterTexture,i.FilterTexture.prototype.clear=function(){var e=this.gl;e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},i.FilterTexture.prototype.resize=function(e,t){if(this.width!==e||this.height!==t){this.width=e,this.height=t;var r=this.gl;r.bindTexture(r.TEXTURE_2D,this.texture),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null),r.bindRenderbuffer(r.RENDERBUFFER,this.renderBuffer),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e,t)}},i.FilterTexture.prototype.destroy=function(){var e=this.gl;e.deleteFramebuffer(this.frameBuffer),e.deleteTexture(this.texture),this.frameBuffer=null,this.texture=null},i.CanvasBuffer=function(e,t){this.width=e,this.height=t,this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.canvas.width=e,this.canvas.height=t},i.CanvasBuffer.prototype.constructor=i.CanvasBuffer,i.CanvasBuffer.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.width,this.height)},i.CanvasBuffer.prototype.resize=function(e,t){this.width=this.canvas.width=e,this.height=this.canvas.height=t},i.CanvasMaskManager=function(){},i.CanvasMaskManager.prototype.constructor=i.CanvasMaskManager,i.CanvasMaskManager.prototype.pushMask=function(e,t){var r=t.context;r.save();var n=e.alpha,a=e.worldTransform,s=t.resolution;r.setTransform(a.a*s,a.b*s,a.c*s,a.d*s,a.tx*s,a.ty*s),i.CanvasGraphics.renderGraphicsMask(e,r),r.clip(),e.worldAlpha=n},i.CanvasMaskManager.prototype.popMask=function(e){e.context.restore()},i.CanvasTinter=function(){},i.CanvasTinter.getTintedTexture=function(e,t){var r=e.texture;t=i.CanvasTinter.roundColor(t);var n="#"+("00000"+(0|t).toString(16)).substr(-6);if(r.tintCache=r.tintCache||{},r.tintCache[n])return r.tintCache[n];var a=i.CanvasTinter.canvas||document.createElement("canvas");if(i.CanvasTinter.tintMethod(r,t,a),i.CanvasTinter.convertTintToImage){var s=new Image;s.src=a.toDataURL(),r.tintCache[n]=s}else r.tintCache[n]=a,i.CanvasTinter.canvas=null;return a},i.CanvasTinter.tintWithMultiply=function(e,t,r){var i=r.getContext("2d"),n=e.crop;r.width=n.width,r.height=n.height,i.fillStyle="#"+("00000"+(0|t).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},i.CanvasTinter.tintWithOverlay=function(e,t,r){var i=r.getContext("2d"),n=e.crop;r.width=n.width,r.height=n.height,i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|t).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(e.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},i.CanvasTinter.tintWithPerPixel=function(e,t,r){var n=r.getContext("2d"),a=e.crop;r.width=a.width,r.height=a.height,n.globalCompositeOperation="copy",n.drawImage(e.baseTexture.source,a.x,a.y,a.width,a.height,0,0,a.width,a.height);for(var s=i.hex2rgb(t),o=s[0],h=s[1],u=s[2],l=n.getImageData(0,0,a.width,a.height),d=l.data,c=0;c<d.length;c+=4)d[c+0]*=o,d[c+1]*=h,d[c+2]*=u;n.putImageData(l,0,0)},i.CanvasTinter.roundColor=function(e){var t=i.CanvasTinter.cacheStepsPerColorChannel,r=i.hex2rgb(e);return r[0]=Math.min(255,r[0]/t*t),r[1]=Math.min(255,r[1]/t*t),r[2]=Math.min(255,r[2]/t*t),i.rgb2hex(r)},i.CanvasTinter.cacheStepsPerColorChannel=8,i.CanvasTinter.convertTintToImage=!1,i.CanvasTinter.canUseMultiply=i.canUseNewCanvasBlendModes(),i.CanvasTinter.tintMethod=i.CanvasTinter.canUseMultiply?i.CanvasTinter.tintWithMultiply:i.CanvasTinter.tintWithPerPixel,i.CanvasRenderer=function(e,t,r){if(r)for(var n in i.defaultRenderOptions)"undefined"==typeof r[n]&&(r[n]=i.defaultRenderOptions[n]);else r=i.defaultRenderOptions;i.defaultRenderer||(i.sayHello("Canvas"),i.defaultRenderer=this),this.type=i.CANVAS_RENDERER,this.resolution=r.resolution,this.clearBeforeRender=r.clearBeforeRender,this.transparent=r.transparent,this.autoResize=r.autoResize||!1,this.width=e||800,this.height=t||600,this.width*=this.resolution,this.height*=this.resolution,this.view=r.view||document.createElement("canvas"),this.context=this.view.getContext("2d",{alpha:this.transparent}),this.refresh=!0,this.view.width=this.width*this.resolution,this.view.height=this.height*this.resolution,this.count=0,this.maskManager=new i.CanvasMaskManager,this.renderSession={context:this.context,maskManager:this.maskManager,scaleMode:null,smoothProperty:null,roundPixels:!1},this.mapBlendModes(),this.resize(e,t),"imageSmoothingEnabled"in this.context?this.renderSession.smoothProperty="imageSmoothingEnabled":"webkitImageSmoothingEnabled"in this.context?this.renderSession.smoothProperty="webkitImageSmoothingEnabled":"mozImageSmoothingEnabled"in this.context?this.renderSession.smoothProperty="mozImageSmoothingEnabled":"oImageSmoothingEnabled"in this.context?this.renderSession.smoothProperty="oImageSmoothingEnabled":"msImageSmoothingEnabled"in this.context&&(this.renderSession.smoothProperty="msImageSmoothingEnabled")},i.CanvasRenderer.prototype.constructor=i.CanvasRenderer,i.CanvasRenderer.prototype.render=function(e){e.updateTransform(),this.context.setTransform(1,0,0,1,0,0),this.context.globalAlpha=1,this.renderSession.currentBlendMode=i.blendModes.NORMAL,this.context.globalCompositeOperation=i.blendModesCanvas[i.blendModes.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(this.context.fillStyle="black",this.context.clear()),this.clearBeforeRender&&(this.transparent?this.context.clearRect(0,0,this.width,this.height):(this.context.fillStyle=e.backgroundColorString,this.context.fillRect(0,0,this.width,this.height))),this.renderDisplayObject(e),e.interactive&&(e._interactiveEventsAdded||(e._interactiveEventsAdded=!0,e.interactionManager.setTarget(this)))},i.CanvasRenderer.prototype.destroy=function(e){"undefined"==typeof e&&(e=!0),e&&this.view.parent&&this.view.parent.removeChild(this.view),this.view=null,this.context=null,this.maskManager=null,this.renderSession=null},i.CanvasRenderer.prototype.resize=function(e,t){this.width=e*this.resolution,this.height=t*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px")},i.CanvasRenderer.prototype.renderDisplayObject=function(e,t){this.renderSession.context=t||this.context,this.renderSession.resolution=this.resolution,e._renderCanvas(this.renderSession)},i.CanvasRenderer.prototype.mapBlendModes=function(){i.blendModesCanvas||(i.blendModesCanvas=[],i.canUseNewCanvasBlendModes()?(i.blendModesCanvas[i.blendModes.NORMAL]="source-over",i.blendModesCanvas[i.blendModes.ADD]="lighter",i.blendModesCanvas[i.blendModes.MULTIPLY]="multiply",i.blendModesCanvas[i.blendModes.SCREEN]="screen",i.blendModesCanvas[i.blendModes.OVERLAY]="overlay",i.blendModesCanvas[i.blendModes.DARKEN]="darken",i.blendModesCanvas[i.blendModes.LIGHTEN]="lighten",i.blendModesCanvas[i.blendModes.COLOR_DODGE]="color-dodge",i.blendModesCanvas[i.blendModes.COLOR_BURN]="color-burn",i.blendModesCanvas[i.blendModes.HARD_LIGHT]="hard-light",i.blendModesCanvas[i.blendModes.SOFT_LIGHT]="soft-light",i.blendModesCanvas[i.blendModes.DIFFERENCE]="difference",i.blendModesCanvas[i.blendModes.EXCLUSION]="exclusion",i.blendModesCanvas[i.blendModes.HUE]="hue",i.blendModesCanvas[i.blendModes.SATURATION]="saturation",i.blendModesCanvas[i.blendModes.COLOR]="color",i.blendModesCanvas[i.blendModes.LUMINOSITY]="luminosity"):(i.blendModesCanvas[i.blendModes.NORMAL]="source-over",i.blendModesCanvas[i.blendModes.ADD]="lighter",i.blendModesCanvas[i.blendModes.MULTIPLY]="source-over",i.blendModesCanvas[i.blendModes.SCREEN]="source-over",i.blendModesCanvas[i.blendModes.OVERLAY]="source-over",i.blendModesCanvas[i.blendModes.DARKEN]="source-over",i.blendModesCanvas[i.blendModes.LIGHTEN]="source-over",i.blendModesCanvas[i.blendModes.COLOR_DODGE]="source-over",i.blendModesCanvas[i.blendModes.COLOR_BURN]="source-over",i.blendModesCanvas[i.blendModes.HARD_LIGHT]="source-over",i.blendModesCanvas[i.blendModes.SOFT_LIGHT]="source-over",i.blendModesCanvas[i.blendModes.DIFFERENCE]="source-over",i.blendModesCanvas[i.blendModes.EXCLUSION]="source-over",i.blendModesCanvas[i.blendModes.HUE]="source-over",i.blendModesCanvas[i.blendModes.SATURATION]="source-over",i.blendModesCanvas[i.blendModes.COLOR]="source-over",i.blendModesCanvas[i.blendModes.LUMINOSITY]="source-over"))},i.CanvasGraphics=function(){},i.CanvasGraphics.renderGraphics=function(e,t){var r=e.worldAlpha;e.dirty&&(this.updateGraphicsTint(e),e.dirty=!1);for(var n=0;n<e.graphicsData.length;n++){var a=e.graphicsData[n],s=a.shape,o=a._fillTint,h=a._lineTint;if(t.lineWidth=a.lineWidth,a.type===i.Graphics.POLY){t.beginPath();var u=s.points;t.moveTo(u[0],u[1]);for(var l=1;l<u.length/2;l++)t.lineTo(u[2*l],u[2*l+1]);s.closed&&t.lineTo(u[0],u[1]),u[0]===u[u.length-2]&&u[1]===u[u.length-1]&&t.closePath(),a.fill&&(t.globalAlpha=a.fillAlpha*r,t.fillStyle="#"+("00000"+(0|o).toString(16)).substr(-6),t.fill()),a.lineWidth&&(t.globalAlpha=a.lineAlpha*r,t.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),t.stroke())}else if(a.type===i.Graphics.RECT)(a.fillColor||0===a.fillColor)&&(t.globalAlpha=a.fillAlpha*r,t.fillStyle="#"+("00000"+(0|o).toString(16)).substr(-6),t.fillRect(s.x,s.y,s.width,s.height)),a.lineWidth&&(t.globalAlpha=a.lineAlpha*r,t.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),t.strokeRect(s.x,s.y,s.width,s.height));else if(a.type===i.Graphics.CIRC)t.beginPath(),t.arc(s.x,s.y,s.radius,0,2*Math.PI),t.closePath(),a.fill&&(t.globalAlpha=a.fillAlpha*r,t.fillStyle="#"+("00000"+(0|o).toString(16)).substr(-6),t.fill()),a.lineWidth&&(t.globalAlpha=a.lineAlpha*r,t.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),t.stroke());else if(a.type===i.Graphics.ELIP){var d=2*s.width,c=2*s.height,f=s.x-d/2,_=s.y-c/2;t.beginPath();var p=.5522848,m=d/2*p,g=c/2*p,y=f+d,v=_+c,M=f+d/2,L=_+c/2;t.moveTo(f,L),t.bezierCurveTo(f,L-g,M-m,_,M,_),t.bezierCurveTo(M+m,_,y,L-g,y,L),t.bezierCurveTo(y,L+g,M+m,v,M,v),t.bezierCurveTo(M-m,v,f,L+g,f,L),t.closePath(),a.fill&&(t.globalAlpha=a.fillAlpha*r,t.fillStyle="#"+("00000"+(0|o).toString(16)).substr(-6),t.fill()),a.lineWidth&&(t.globalAlpha=a.lineAlpha*r,t.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),t.stroke())}else if(a.type===i.Graphics.RREC){var T=s.x,b=s.y,x=s.width,w=s.height,Y=s.radius,D=Math.min(x,w)/2|0;Y=Y>D?D:Y,t.beginPath(),t.moveTo(T,b+Y),t.lineTo(T,b+w-Y),t.quadraticCurveTo(T,b+w,T+Y,b+w),t.lineTo(T+x-Y,b+w),t.quadraticCurveTo(T+x,b+w,T+x,b+w-Y),t.lineTo(T+x,b+Y),t.quadraticCurveTo(T+x,b,T+x-Y,b),t.lineTo(T+Y,b),t.quadraticCurveTo(T,b,T,b+Y),t.closePath(),(a.fillColor||0===a.fillColor)&&(t.globalAlpha=a.fillAlpha*r,t.fillStyle="#"+("00000"+(0|o).toString(16)).substr(-6),t.fill()),a.lineWidth&&(t.globalAlpha=a.lineAlpha*r,t.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),t.stroke())}}},i.CanvasGraphics.renderGraphicsMask=function(e,t){var r=e.graphicsData.length;if(0!==r){r>1&&(r=1,window.console.log("Pixi.js warning: masks in canvas can only mask using the first path in the graphics object"));for(var n=0;1>n;n++){var a=e.graphicsData[n],s=a.shape;if(a.type===i.Graphics.POLY){t.beginPath();var o=s.points;t.moveTo(o[0],o[1]);for(var h=1;h<o.length/2;h++)t.lineTo(o[2*h],o[2*h+1]);o[0]===o[o.length-2]&&o[1]===o[o.length-1]&&t.closePath()}else if(a.type===i.Graphics.RECT)t.beginPath(),t.rect(s.x,s.y,s.width,s.height),t.closePath();else if(a.type===i.Graphics.CIRC)t.beginPath(),t.arc(s.x,s.y,s.radius,0,2*Math.PI),t.closePath();else if(a.type===i.Graphics.ELIP){var u=2*s.width,l=2*s.height,d=s.x-u/2,c=s.y-l/2;t.beginPath();var f=.5522848,_=u/2*f,p=l/2*f,m=d+u,g=c+l,y=d+u/2,v=c+l/2;t.moveTo(d,v),t.bezierCurveTo(d,v-p,y-_,c,y,c),t.bezierCurveTo(y+_,c,m,v-p,m,v),t.bezierCurveTo(m,v+p,y+_,g,y,g),t.bezierCurveTo(y-_,g,d,v+p,d,v),t.closePath()}else if(a.type===i.Graphics.RREC){var M=s.points,L=M[0],T=M[1],b=M[2],x=M[3],w=M[4],Y=Math.min(b,x)/2|0;w=w>Y?Y:w,t.beginPath(),t.moveTo(L,T+w),t.lineTo(L,T+x-w),t.quadraticCurveTo(L,T+x,L+w,T+x),t.lineTo(L+b-w,T+x),t.quadraticCurveTo(L+b,T+x,L+b,T+x-w),t.lineTo(L+b,T+w),t.quadraticCurveTo(L+b,T,L+b-w,T),t.lineTo(L+w,T),t.quadraticCurveTo(L,T,L,T+w),t.closePath()}}}},i.CanvasGraphics.updateGraphicsTint=function(e){if(16777215!==e.tint)for(var t=(e.tint>>16&255)/255,r=(e.tint>>8&255)/255,i=(255&e.tint)/255,n=0;n<e.graphicsData.length;n++){var a=e.graphicsData[n],s=0|a.fillColor,o=0|a.lineColor;a._fillTint=((s>>16&255)/255*t*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*i*255,a._lineTint=((o>>16&255)/255*t*255<<16)+((o>>8&255)/255*r*255<<8)+(255&o)/255*i*255}},i.Graphics=function(){i.DisplayObjectContainer.call(this),this.renderable=!0,this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this.blendMode=i.blendModes.NORMAL,this.currentPath=null,this._webGL=[],this.isMask=!1,this.boundsPadding=0,this._localBounds=new i.Rectangle(0,0,1,1),this.dirty=!0,this.webGLDirty=!1,this.cachedSpriteDirty=!1},i.Graphics.prototype=Object.create(i.DisplayObjectContainer.prototype),i.Graphics.prototype.constructor=i.Graphics,Object.defineProperty(i.Graphics.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(e){this._cacheAsBitmap=e,this._cacheAsBitmap?this._generateCachedSprite():(this.destroyCachedSprite(),this.dirty=!0)}}),i.Graphics.prototype.lineStyle=function(e,t,r){if(this.lineWidth=e||0,this.lineColor=t||0,this.lineAlpha=arguments.length<3?1:r,this.currentPath){if(this.currentPath.shape.points.length)return this.drawShape(new i.Polygon(this.currentPath.shape.points.slice(-2))),this;this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha}return this},i.Graphics.prototype.moveTo=function(e,t){return this.drawShape(new i.Polygon([e,t])),this},i.Graphics.prototype.lineTo=function(e,t){return this.currentPath.shape.points.push(e,t),this.dirty=!0,this},i.Graphics.prototype.quadraticCurveTo=function(e,t,r,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n,a,s=20,o=this.currentPath.shape.points;0===o.length&&this.moveTo(0,0);for(var h=o[o.length-2],u=o[o.length-1],l=0,d=1;s>=d;d++)l=d/s,n=h+(e-h)*l,a=u+(t-u)*l,o.push(n+(e+(r-e)*l-n)*l,a+(t+(i-t)*l-a)*l);return this.dirty=!0,this},i.Graphics.prototype.bezierCurveTo=function(e,t,r,i,n,a){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);for(var s,o,h,u,l,d=20,c=this.currentPath.shape.points,f=c[c.length-2],_=c[c.length-1],p=0,m=1;d>=m;m++)p=m/d,s=1-p,o=s*s,h=o*s,u=p*p,l=u*p,c.push(h*f+3*o*p*e+3*s*u*r+l*n,h*_+3*o*p*t+3*s*u*i+l*a);return this.dirty=!0,this},i.Graphics.prototype.arcTo=function(e,t,r,i,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(e,t):this.moveTo(e,t);var a=this.currentPath.shape.points,s=a[a.length-2],o=a[a.length-1],h=o-t,u=s-e,l=i-t,d=r-e,c=Math.abs(h*d-u*l);if(1e-8>c||0===n)(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t);else{var f=h*h+u*u,_=l*l+d*d,p=h*l+u*d,m=n*Math.sqrt(f)/c,g=n*Math.sqrt(_)/c,y=m*p/f,v=g*p/_,M=m*d+g*u,L=m*l+g*h,T=u*(g+y),b=h*(g+y),x=d*(m+v),w=l*(m+v),Y=Math.atan2(b-L,T-M),D=Math.atan2(w-L,x-M);this.arc(M+e,L+t,n,Y,D,u*l>d*h)}return this.dirty=!0,this},i.Graphics.prototype.arc=function(e,t,r,i,n,a){var s,o=e+Math.cos(i)*r,h=t+Math.sin(i)*r;if(this.currentPath?(s=this.currentPath.shape.points,0===s.length?s.push(o,h):(s[s.length-2]!==o||s[s.length-1]!==h)&&s.push(o,h)):(this.moveTo(o,h),s=this.currentPath.shape.points),i===n)return this;!a&&i>=n?n+=2*Math.PI:a&&n>=i&&(i+=2*Math.PI);var u=a?-1*(i-n):n-i,l=Math.abs(u)/(2*Math.PI)*40;if(0===u)return this;for(var d=u/(2*l),c=2*d,f=Math.cos(d),_=Math.sin(d),p=l-1,m=p%1/p,g=0;p>=g;g++){var y=g+m*g,v=d+i+c*y,M=Math.cos(v),L=-Math.sin(v);s.push((f*M+_*L)*r+e,(f*-L+_*M)*r+t)}return this.dirty=!0,this},i.Graphics.prototype.beginFill=function(e,t){return this.filling=!0,this.fillColor=e||0,this.fillAlpha=void 0===t?1:t,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},i.Graphics.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},i.Graphics.prototype.drawRect=function(e,t,r,n){return this.drawShape(new i.Rectangle(e,t,r,n)),this},i.Graphics.prototype.drawRoundedRect=function(e,t,r,n,a){return this.drawShape(new i.RoundedRectangle(e,t,r,n,a)),this},i.Graphics.prototype.drawCircle=function(e,t,r){return this.drawShape(new i.Circle(e,t,r)),this},i.Graphics.prototype.drawEllipse=function(e,t,r,n){return this.drawShape(new i.Ellipse(e,t,r,n)),this},i.Graphics.prototype.drawPolygon=function(e){return e instanceof Array||(e=Array.prototype.slice.call(arguments)),this.drawShape(new i.Polygon(e)),this},i.Graphics.prototype.clear=function(){return this.lineWidth=0,this.filling=!1,this.dirty=!0,this.clearDirty=!0,this.graphicsData=[],this},i.Graphics.prototype.generateTexture=function(e,t){e=e||1;var r=this.getBounds(),n=new i.CanvasBuffer(r.width*e,r.height*e),a=i.Texture.fromCanvas(n.canvas,t);return a.baseTexture.resolution=e,n.context.scale(e,e),n.context.translate(-r.x,-r.y),i.CanvasGraphics.renderGraphics(this,n.context),a},i.Graphics.prototype._renderWebGL=function(e){if(this.visible!==!1&&0!==this.alpha&&this.isMask!==!0){if(this._cacheAsBitmap)return(this.dirty||this.cachedSpriteDirty)&&(this._generateCachedSprite(),this.updateCachedSpriteTexture(),this.cachedSpriteDirty=!1,this.dirty=!1),this._cachedSprite.worldAlpha=this.worldAlpha,void i.Sprite.prototype._renderWebGL.call(this._cachedSprite,e);if(e.spriteBatch.stop(),e.blendModeManager.setBlendMode(this.blendMode),this._mask&&e.maskManager.pushMask(this._mask,e),this._filters&&e.filterManager.pushFilter(this._filterBlock),this.blendMode!==e.spriteBatch.currentBlendMode){e.spriteBatch.currentBlendMode=this.blendMode;var t=i.blendModesWebGL[e.spriteBatch.currentBlendMode];e.spriteBatch.gl.blendFunc(t[0],t[1])}if(this.webGLDirty&&(this.dirty=!0,this.webGLDirty=!1),i.WebGLGraphics.renderGraphics(this,e),this.children.length){e.spriteBatch.start();for(var r=0,n=this.children.length;n>r;r++)this.children[r]._renderWebGL(e);e.spriteBatch.stop()}this._filters&&e.filterManager.popFilter(),this._mask&&e.maskManager.popMask(this.mask,e),e.drawCount++,e.spriteBatch.start()}},i.Graphics.prototype._renderCanvas=function(e){if(this.visible!==!1&&0!==this.alpha&&this.isMask!==!0){if(this._cacheAsBitmap)return(this.dirty||this.cachedSpriteDirty)&&(this._generateCachedSprite(),this.updateCachedSpriteTexture(),this.cachedSpriteDirty=!1,this.dirty=!1),this._cachedSprite.alpha=this.alpha,void i.Sprite.prototype._renderCanvas.call(this._cachedSprite,e);var t=e.context,r=this.worldTransform;this.blendMode!==e.currentBlendMode&&(e.currentBlendMode=this.blendMode,t.globalCompositeOperation=i.blendModesCanvas[e.currentBlendMode]),this._mask&&e.maskManager.pushMask(this._mask,e);var n=e.resolution;t.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n),i.CanvasGraphics.renderGraphics(this,t);for(var a=0,s=this.children.length;s>a;a++)this.children[a]._renderCanvas(e);this._mask&&e.maskManager.popMask(e)}},i.Graphics.prototype.getBounds=function(e){if(this.isMask)return i.EmptyRectangle;this.dirty&&(this.updateLocalBounds(),this.webGLDirty=!0,this.cachedSpriteDirty=!0,this.dirty=!1);var t=this._localBounds,r=t.x,n=t.width+t.x,a=t.y,s=t.height+t.y,o=e||this.worldTransform,h=o.a,u=o.b,l=o.c,d=o.d,c=o.tx,f=o.ty,_=h*n+l*s+c,p=d*s+u*n+f,m=h*r+l*s+c,g=d*s+u*r+f,y=h*r+l*a+c,v=d*a+u*r+f,M=h*n+l*a+c,L=d*a+u*n+f,T=_,b=p,x=_,w=p;return x=x>m?m:x,x=x>y?y:x,x=x>M?M:x,w=w>g?g:w,w=w>v?v:w,w=w>L?L:w,T=m>T?m:T,T=y>T?y:T,T=M>T?M:T,b=g>b?g:b,b=v>b?v:b,b=L>b?L:b,this._bounds.x=x,this._bounds.width=T-x,this._bounds.y=w,this._bounds.height=b-w,this._bounds},i.Graphics.prototype.updateLocalBounds=function(){var e=1/0,t=-1/0,r=1/0,n=-1/0;if(this.graphicsData.length)for(var a,s,o,h,u,l,d=0;d<this.graphicsData.length;d++){var c=this.graphicsData[d],f=c.type,_=c.lineWidth;if(a=c.shape,f===i.Graphics.RECT||f===i.Graphics.RREC)o=a.x-_/2,h=a.y-_/2,u=a.width+_,l=a.height+_,e=e>o?o:e,t=o+u>t?o+u:t,r=r>h?h:r,n=h+l>n?h+l:n;else if(f===i.Graphics.CIRC)o=a.x,h=a.y,u=a.radius+_/2,l=a.radius+_/2,e=e>o-u?o-u:e,t=o+u>t?o+u:t,r=r>h-l?h-l:r,n=h+l>n?h+l:n;else if(f===i.Graphics.ELIP)o=a.x,h=a.y,u=a.width+_/2,l=a.height+_/2,e=e>o-u?o-u:e,t=o+u>t?o+u:t,r=r>h-l?h-l:r,n=h+l>n?h+l:n;else{s=a.points;for(var p=0;p<s.length;p+=2)o=s[p],h=s[p+1],e=e>o-_?o-_:e,t=o+_>t?o+_:t,r=r>h-_?h-_:r,n=h+_>n?h+_:n}}else e=0,t=0,r=0,n=0;var m=this.boundsPadding;this._localBounds.x=e-m,this._localBounds.width=t-e+2*m,this._localBounds.y=r-m,this._localBounds.height=n-r+2*m},i.Graphics.prototype._generateCachedSprite=function(){var e=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.buffer.resize(e.width,e.height);else{var t=new i.CanvasBuffer(e.width,e.height),r=i.Texture.fromCanvas(t.canvas);this._cachedSprite=new i.Sprite(r),this._cachedSprite.buffer=t,this._cachedSprite.worldTransform=this.worldTransform}this._cachedSprite.anchor.x=-(e.x/e.width),this._cachedSprite.anchor.y=-(e.y/e.height),this._cachedSprite.buffer.context.translate(-e.x,-e.y),this.worldAlpha=1,i.CanvasGraphics.renderGraphics(this,this._cachedSprite.buffer.context),this._cachedSprite.alpha=this.alpha},i.Graphics.prototype.updateCachedSpriteTexture=function(){var e=this._cachedSprite,t=e.texture,r=e.buffer.canvas;t.baseTexture.width=r.width,t.baseTexture.height=r.height,t.crop.width=t.frame.width=r.width,t.crop.height=t.frame.height=r.height,e._width=r.width,e._height=r.height,t.baseTexture.dirty()},i.Graphics.prototype.destroyCachedSprite=function(){this._cachedSprite.texture.destroy(!0),this._cachedSprite=null},i.Graphics.prototype.drawShape=function(e){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var t=new i.GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,e);return this.graphicsData.push(t),t.type===i.Graphics.POLY&&(t.shape.closed=this.filling,this.currentPath=t),this.dirty=!0,t},i.GraphicsData=function(e,t,r,i,n,a,s){this.lineWidth=e,this.lineColor=t,this.lineAlpha=r,this._lineTint=t,this.fillColor=i,this.fillAlpha=n,this._fillTint=i,this.fill=a,this.shape=s,this.type=s.type},i.Graphics.POLY=0,i.Graphics.RECT=1,i.Graphics.CIRC=2,i.Graphics.ELIP=3,i.Graphics.RREC=4,i.Polygon.prototype.type=i.Graphics.POLY,i.Rectangle.prototype.type=i.Graphics.RECT,i.Circle.prototype.type=i.Graphics.CIRC,i.Ellipse.prototype.type=i.Graphics.ELIP,i.RoundedRectangle.prototype.type=i.Graphics.RREC,i.Strip=function(e){i.DisplayObjectContainer.call(this),this.texture=e,this.uvs=new i.Float32Array([0,1,1,1,1,0,0,1]),this.vertices=new i.Float32Array([0,0,100,0,100,100,0,100]),this.colors=new i.Float32Array([1,1,1,1]),this.indices=new i.Uint16Array([0,1,2,3]),this.dirty=!0,this.blendMode=i.blendModes.NORMAL,this.canvasPadding=0,this.drawMode=i.Strip.DrawModes.TRIANGLE_STRIP},i.Strip.prototype=Object.create(i.DisplayObjectContainer.prototype),i.Strip.prototype.constructor=i.Strip,i.Strip.prototype._renderWebGL=function(e){!this.visible||this.alpha<=0||(e.spriteBatch.stop(),this._vertexBuffer||this._initWebGL(e),e.shaderManager.setShader(e.shaderManager.stripShader),this._renderStrip(e),e.spriteBatch.start())},i.Strip.prototype._initWebGL=function(e){var t=e.gl;this._vertexBuffer=t.createBuffer(),this._indexBuffer=t.createBuffer(),this._uvBuffer=t.createBuffer(),this._colorBuffer=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this._vertexBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices,t.DYNAMIC_DRAW),t.bindBuffer(t.ARRAY_BUFFER,this._uvBuffer),t.bufferData(t.ARRAY_BUFFER,this.uvs,t.STATIC_DRAW),t.bindBuffer(t.ARRAY_BUFFER,this._colorBuffer),t.bufferData(t.ARRAY_BUFFER,this.colors,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices,t.STATIC_DRAW)
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
    10
},i.Strip.prototype._renderStrip=function(e){var t=e.gl,r=e.projection,n=e.offset,a=e.shaderManager.stripShader,s=this.drawMode===i.Strip.DrawModes.TRIANGLE_STRIP?t.TRIANGLE_STRIP:t.TRIANGLES;e.blendModeManager.setBlendMode(this.blendMode),t.uniformMatrix3fv(a.translationMatrix,!1,this.worldTransform.toArray(!0)),t.uniform2f(a.projectionVector,r.x,-r.y),t.uniform2f(a.offsetVector,-n.x,-n.y),t.uniform1f(a.alpha,this.worldAlpha),this.dirty?(this.dirty=!1,t.bindBuffer(t.ARRAY_BUFFER,this._vertexBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices,t.STATIC_DRAW),t.vertexAttribPointer(a.aVertexPosition,2,t.FLOAT,!1,0,0),t.bindBuffer(t.ARRAY_BUFFER,this._uvBuffer),t.bufferData(t.ARRAY_BUFFER,this.uvs,t.STATIC_DRAW),t.vertexAttribPointer(a.aTextureCoord,2,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE0),this.texture.baseTexture._dirty[t.id]?e.renderer.updateTexture(this.texture.baseTexture):t.bindTexture(t.TEXTURE_2D,this.texture.baseTexture._glTextures[t.id]),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices,t.STATIC_DRAW)):(t.bindBuffer(t.ARRAY_BUFFER,this._vertexBuffer),t.bufferSubData(t.ARRAY_BUFFER,0,this.vertices),t.vertexAttribPointer(a.aVertexPosition,2,t.FLOAT,!1,0,0),t.bindBuffer(t.ARRAY_BUFFER,this._uvBuffer),t.vertexAttribPointer(a.aTextureCoord,2,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE0),this.texture.baseTexture._dirty[t.id]?e.renderer.updateTexture(this.texture.baseTexture):t.bindTexture(t.TEXTURE_2D,this.texture.baseTexture._glTextures[t.id]),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this._indexBuffer)),t.drawElements(s,this.indices.length,t.UNSIGNED_SHORT,0)},i.Strip.prototype._renderCanvas=function(e){var t=e.context,r=this.worldTransform;e.roundPixels?t.setTransform(r.a,r.b,r.c,r.d,0|r.tx,0|r.ty):t.setTransform(r.a,r.b,r.c,r.d,r.tx,r.ty),this.drawMode===i.Strip.DrawModes.TRIANGLE_STRIP?this._renderCanvasTriangleStrip(t):this._renderCanvasTriangles(t)},i.Strip.prototype._renderCanvasTriangleStrip=function(e){var t=this.vertices,r=this.uvs,i=t.length/2;this.count++;for(var n=0;i-2>n;n++){var a=2*n;this._renderCanvasDrawTriangle(e,t,r,a,a+2,a+4)}},i.Strip.prototype._renderCanvasTriangles=function(e){var t=this.vertices,r=this.uvs,i=this.indices,n=i.length;this.count++;for(var a=0;n>a;a+=3){var s=2*i[a],o=2*i[a+1],h=2*i[a+2];this._renderCanvasDrawTriangle(e,t,r,s,o,h)}},i.Strip.prototype._renderCanvasDrawTriangle=function(e,t,r,i,n,a){var s=this.texture.baseTexture.source,o=this.texture.width,h=this.texture.height,u=t[i],l=t[n],d=t[a],c=t[i+1],f=t[n+1],_=t[a+1],p=r[i]*o,m=r[n]*o,g=r[a]*o,y=r[i+1]*h,v=r[n+1]*h,M=r[a+1]*h;if(this.canvasPadding>0){var L=this.canvasPadding/this.worldTransform.a,T=this.canvasPadding/this.worldTransform.d,b=(u+l+d)/3,x=(c+f+_)/3,w=u-b,Y=c-x,D=Math.sqrt(w*w+Y*Y);u=b+w/D*(D+L),c=x+Y/D*(D+T),w=l-b,Y=f-x,D=Math.sqrt(w*w+Y*Y),l=b+w/D*(D+L),f=x+Y/D*(D+T),w=d-b,Y=_-x,D=Math.sqrt(w*w+Y*Y),d=b+w/D*(D+L),_=x+Y/D*(D+T)}e.save(),e.beginPath(),e.moveTo(u,c),e.lineTo(l,f),e.lineTo(d,_),e.closePath(),e.clip();var S=p*v+y*g+m*M-v*g-y*m-p*M,k=u*v+y*d+l*M-v*d-y*l-u*M,C=p*l+u*g+m*d-l*g-u*m-p*d,A=p*v*d+y*l*g+u*m*M-u*v*g-y*m*d-p*l*M,E=c*v+y*_+f*M-v*_-y*f-c*M,F=p*f+c*g+m*_-f*g-c*m-p*_,R=p*v*_+y*f*g+c*m*M-c*v*g-y*m*_-p*f*M;e.transform(k/S,E/S,C/S,F/S,A/S,R/S),e.drawImage(s,0,0),e.restore()},i.Strip.prototype.renderStripFlat=function(e){var t=this.context,r=e.vertices,i=r.length/2;this.count++,t.beginPath();for(var n=1;i-2>n;n++){var a=2*n,s=r[a],o=r[a+2],h=r[a+4],u=r[a+1],l=r[a+3],d=r[a+5];t.moveTo(s,u),t.lineTo(o,l),t.lineTo(h,d)}t.fillStyle="#FF0000",t.fill(),t.closePath()},i.Strip.prototype.onTextureUpdate=function(){this.updateFrame=!0},i.Strip.prototype.getBounds=function(e){for(var t=e||this.worldTransform,r=t.a,n=t.b,a=t.c,s=t.d,o=t.tx,h=t.ty,u=-1/0,l=-1/0,d=1/0,c=1/0,f=this.vertices,_=0,p=f.length;p>_;_+=2){var m=f[_],g=f[_+1],y=r*m+a*g+o,v=s*g+n*m+h;d=d>y?y:d,c=c>v?v:c,u=y>u?y:u,l=v>l?v:l}if(d===-1/0||1/0===l)return i.EmptyRectangle;var M=this._bounds;return M.x=d,M.width=u-d,M.y=c,M.height=l-c,this._currentBounds=M,M},i.Strip.DrawModes={TRIANGLE_STRIP:0,TRIANGLES:1},i.Rope=function(e,t){i.Strip.call(this,e),this.points=t,this.vertices=new i.Float32Array(4*t.length),this.uvs=new i.Float32Array(4*t.length),this.colors=new i.Float32Array(2*t.length),this.indices=new i.Uint16Array(2*t.length),this.refresh()},i.Rope.prototype=Object.create(i.Strip.prototype),i.Rope.prototype.constructor=i.Rope,i.Rope.prototype.refresh=function(){var e=this.points;if(!(e.length<1)){var t=this.uvs,r=e[0],i=this.indices,n=this.colors;this.count-=.2,t[0]=0,t[1]=0,t[2]=0,t[3]=1,n[0]=1,n[1]=1,i[0]=0,i[1]=1;for(var a,s,o,h=e.length,u=1;h>u;u++)a=e[u],s=4*u,o=u/(h-1),u%2?(t[s]=o,t[s+1]=0,t[s+2]=o,t[s+3]=1):(t[s]=o,t[s+1]=0,t[s+2]=o,t[s+3]=1),s=2*u,n[s]=1,n[s+1]=1,s=2*u,i[s]=s,i[s+1]=s+1,r=a}},i.Rope.prototype.updateTransform=function(){var e=this.points;if(!(e.length<1)){var t,r=e[0],n={x:0,y:0};this.count-=.2;for(var a,s,o,h,u,l=this.vertices,d=e.length,c=0;d>c;c++)a=e[c],s=4*c,t=c<e.length-1?e[c+1]:a,n.y=-(t.x-r.x),n.x=t.y-r.y,o=10*(1-c/(d-1)),o>1&&(o=1),h=Math.sqrt(n.x*n.x+n.y*n.y),u=this.texture.height/2,n.x/=h,n.y/=h,n.x*=u,n.y*=u,l[s]=a.x+n.x,l[s+1]=a.y+n.y,l[s+2]=a.x-n.x,l[s+3]=a.y-n.y,r=a;i.DisplayObjectContainer.prototype.updateTransform.call(this)}},i.Rope.prototype.setTexture=function(e){this.texture=e},i.TilingSprite=function(e,t,r){i.Sprite.call(this,e),this._width=t||100,this._height=r||100,this.tileScale=new i.Point(1,1),this.tileScaleOffset=new i.Point(1,1),this.tilePosition=new i.Point(0,0),this.renderable=!0,this.tint=16777215,this.blendMode=i.blendModes.NORMAL},i.TilingSprite.prototype=Object.create(i.Sprite.prototype),i.TilingSprite.prototype.constructor=i.TilingSprite,Object.defineProperty(i.TilingSprite.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e}}),Object.defineProperty(i.TilingSprite.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e}}),i.TilingSprite.prototype.setTexture=function(e){this.texture!==e&&(this.texture=e,this.refreshTexture=!0,this.cachedTint=16777215)},i.TilingSprite.prototype._renderWebGL=function(e){if(this.visible!==!1&&0!==this.alpha){var t,r;for(this._mask&&(e.spriteBatch.stop(),e.maskManager.pushMask(this.mask,e),e.spriteBatch.start()),this._filters&&(e.spriteBatch.flush(),e.filterManager.pushFilter(this._filterBlock)),!this.tilingTexture||this.refreshTexture?(this.generateTilingTexture(!0),this.tilingTexture&&this.tilingTexture.needsUpdate&&(e.renderer.updateTexture(this.tilingTexture.baseTexture),this.tilingTexture.needsUpdate=!1)):e.spriteBatch.renderTilingSprite(this),t=0,r=this.children.length;r>t;t++)this.children[t]._renderWebGL(e);e.spriteBatch.stop(),this._filters&&e.filterManager.popFilter(),this._mask&&e.maskManager.popMask(this._mask,e),e.spriteBatch.start()}},i.TilingSprite.prototype._renderCanvas=function(e){if(this.visible!==!1&&0!==this.alpha){var t=e.context;this._mask&&e.maskManager.pushMask(this._mask,t),t.globalAlpha=this.worldAlpha;var r,n,a=this.worldTransform,s=e.resolution;if(t.setTransform(a.a*s,a.b*s,a.c*s,a.d*s,a.tx*s,a.ty*s),!this.__tilePattern||this.refreshTexture){if(this.generateTilingTexture(!1),!this.tilingTexture)return;this.__tilePattern=t.createPattern(this.tilingTexture.baseTexture.source,"repeat")}this.blendMode!==e.currentBlendMode&&(e.currentBlendMode=this.blendMode,t.globalCompositeOperation=i.blendModesCanvas[e.currentBlendMode]);var o=this.tilePosition,h=this.tileScale;for(o.x%=this.tilingTexture.baseTexture.width,o.y%=this.tilingTexture.baseTexture.height,t.scale(h.x,h.y),t.translate(o.x+this.anchor.x*-this._width,o.y+this.anchor.y*-this._height),t.fillStyle=this.__tilePattern,t.fillRect(-o.x,-o.y,this._width/h.x,this._height/h.y),t.scale(1/h.x,1/h.y),t.translate(-o.x+this.anchor.x*this._width,-o.y+this.anchor.y*this._height),this._mask&&e.maskManager.popMask(e.context),r=0,n=this.children.length;n>r;r++)this.children[r]._renderCanvas(e)}},i.TilingSprite.prototype.getBounds=function(){var e=this._width,t=this._height,r=e*(1-this.anchor.x),i=e*-this.anchor.x,n=t*(1-this.anchor.y),a=t*-this.anchor.y,s=this.worldTransform,o=s.a,h=s.b,u=s.c,l=s.d,d=s.tx,c=s.ty,f=o*i+u*a+d,_=l*a+h*i+c,p=o*r+u*a+d,m=l*a+h*r+c,g=o*r+u*n+d,y=l*n+h*r+c,v=o*i+u*n+d,M=l*n+h*i+c,L=-1/0,T=-1/0,b=1/0,x=1/0;b=b>f?f:b,b=b>p?p:b,b=b>g?g:b,b=b>v?v:b,x=x>_?_:x,x=x>m?m:x,x=x>y?y:x,x=x>M?M:x,L=f>L?f:L,L=p>L?p:L,L=g>L?g:L,L=v>L?v:L,T=_>T?_:T,T=m>T?m:T,T=y>T?y:T,T=M>T?M:T;var w=this._bounds;return w.x=b,w.width=L-b,w.y=x,w.height=T-x,this._currentBounds=w,w},i.TilingSprite.prototype.onTextureUpdate=function(){},i.TilingSprite.prototype.generateTilingTexture=function(e){if(this.texture.baseTexture.hasLoaded){var t,r,n=this.originalTexture||this.texture,a=n.frame,s=a.width!==n.baseTexture.width||a.height!==n.baseTexture.height,o=!1;if(e?(t=i.getNextPowerOfTwo(a.width),r=i.getNextPowerOfTwo(a.height),(a.width!==t||a.height!==r||n.baseTexture.width!==t||n.baseTexture.height||r)&&(o=!0)):s&&(t=a.width,r=a.height,o=!0),o){var h;this.tilingTexture&&this.tilingTexture.isTiling?(h=this.tilingTexture.canvasBuffer,h.resize(t,r),this.tilingTexture.baseTexture.width=t,this.tilingTexture.baseTexture.height=r,this.tilingTexture.needsUpdate=!0):(h=new i.CanvasBuffer(t,r),this.tilingTexture=i.Texture.fromCanvas(h.canvas),this.tilingTexture.canvasBuffer=h,this.tilingTexture.isTiling=!0),h.context.drawImage(n.baseTexture.source,n.crop.x,n.crop.y,n.crop.width,n.crop.height,0,0,t,r),this.tileScaleOffset.x=a.width/t,this.tileScaleOffset.y=a.height/r}else this.tilingTexture&&this.tilingTexture.isTiling&&this.tilingTexture.destroy(!0),this.tileScaleOffset.x=1,this.tileScaleOffset.y=1,this.tilingTexture=n;this.refreshTexture=!1,this.originalTexture=this.texture,this.texture=this.tilingTexture,this.tilingTexture.baseTexture._powerOf2=!0}};var n={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"==typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"==typeof Uint16Array?Array:Uint16Array};n.BoneData=function(e,t){this.name=e,this.parent=t},n.BoneData.prototype={length:0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,inheritScale:!0,inheritRotation:!0,flipX:!1,flipY:!1},n.SlotData=function(e,t){this.name=e,this.boneData=t},n.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,additiveBlending:!1},n.IkConstraintData=function(e){this.name=e,this.bones=[]},n.IkConstraintData.prototype={target:null,bendDirection:1,mix:1},n.Bone=function(e,t,r){this.data=e,this.skeleton=t,this.parent=r,this.setToSetupPose()},n.Bone.yDown=!1,n.Bone.prototype={x:0,y:0,rotation:0,rotationIK:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,m00:0,m01:0,worldX:0,m10:0,m11:0,worldY:0,worldRotation:0,worldScaleX:1,worldScaleY:1,worldFlipX:!1,worldFlipY:!1,updateWorldTransform:function(){var e=this.parent;if(e)this.worldX=this.x*e.m00+this.y*e.m01+e.worldX,this.worldY=this.x*e.m10+this.y*e.m11+e.worldY,this.data.inheritScale?(this.worldScaleX=e.worldScaleX*this.scaleX,this.worldScaleY=e.worldScaleY*this.scaleY):(this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY),this.worldRotation=this.data.inheritRotation?e.worldRotation+this.rotationIK:this.rotationIK,this.worldFlipX=e.worldFlipX!=this.flipX,this.worldFlipY=e.worldFlipY!=this.flipY;else{var t=this.skeleton.flipX,r=this.skeleton.flipY;this.worldX=t?-this.x:this.x,this.worldY=r!=n.Bone.yDown?-this.y:this.y,this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY,this.worldRotation=this.rotationIK,this.worldFlipX=t!=this.flipX,this.worldFlipY=r!=this.flipY}var i=this.worldRotation*n.degRad,a=Math.cos(i),s=Math.sin(i);this.worldFlipX?(this.m00=-a*this.worldScaleX,this.m01=s*this.worldScaleY):(this.m00=a*this.worldScaleX,this.m01=-s*this.worldScaleY),this.worldFlipY!=n.Bone.yDown?(this.m10=-s*this.worldScaleX,this.m11=-a*this.worldScaleY):(this.m10=s*this.worldScaleX,this.m11=a*this.worldScaleY)},setToSetupPose:function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.rotationIK=this.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.flipX=e.flipX,this.flipY=e.flipY},worldToLocal:function(e){var t=e[0]-this.worldX,r=e[1]-this.worldY,i=this.m00,a=this.m10,s=this.m01,o=this.m11;this.worldFlipX!=(this.worldFlipY!=n.Bone.yDown)&&(i=-i,o=-o);var h=1/(i*o-s*a);e[0]=t*i*h-r*s*h,e[1]=r*o*h-t*a*h},localToWorld:function(e){var t=e[0],r=e[1];e[0]=t*this.m00+r*this.m01+this.worldX,e[1]=t*this.m10+r*this.m11+this.worldY}},n.Slot=function(e,t){this.data=e,this.bone=t,this.setToSetupPose()},n.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(e){this.attachment=e,this._attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0},setAttachmentTime:function(e){this._attachmentTime=this.bone.skeleton.time-e},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var e=this.data;this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a;for(var t=this.bone.skeleton.data.slots,r=0,i=t.length;i>r;r++)if(t[r]==e){this.setAttachment(e.attachmentName?this.bone.skeleton.getAttachmentBySlotIndex(r,e.attachmentName):null);break}}},n.IkConstraint=function(e,t){this.data=e,this.mix=e.mix,this.bendDirection=e.bendDirection,this.bones=[];for(var r=0,i=e.bones.length;i>r;r++)this.bones.push(t.findBone(e.bones[r].name));this.target=t.findBone(e.target.name)},n.IkConstraint.prototype={apply:function(){var e=this.target,t=this.bones;switch(t.length){case 1:n.IkConstraint.apply1(t[0],e.worldX,e.worldY,this.mix);break;case 2:n.IkConstraint.apply2(t[0],t[1],e.worldX,e.worldY,this.bendDirection,this.mix)}}},n.IkConstraint.apply1=function(e,t,r,i){var a=e.data.inheritRotation&&e.parent?e.parent.worldRotation:0,s=e.rotation,o=Math.atan2(r-e.worldY,t-e.worldX)*n.radDeg-a;e.rotationIK=s+(o-s)*i},n.IkConstraint.apply2=function(e,t,r,i,a,s){var o=t.rotation,h=e.rotation;if(!s)return t.rotationIK=o,void(e.rotationIK=h);var u,l,d=n.temp,c=e.parent;c?(d[0]=r,d[1]=i,c.worldToLocal(d),r=(d[0]-e.x)*c.worldScaleX,i=(d[1]-e.y)*c.worldScaleY):(r-=e.x,i-=e.y),t.parent==e?(u=t.x,l=t.y):(d[0]=t.x,d[1]=t.y,t.parent.localToWorld(d),e.worldToLocal(d),u=d[0],l=d[1]);var f=u*e.worldScaleX,_=l*e.worldScaleY,p=Math.atan2(_,f),m=Math.sqrt(f*f+_*_),g=t.data.length*t.worldScaleX,y=2*m*g;if(1e-4>y)return void(t.rotationIK=o+(Math.atan2(i,r)*n.radDeg-h-o)*s);var v=(r*r+i*i-m*m-g*g)/y;-1>v?v=-1:v>1&&(v=1);var M=Math.acos(v)*a,L=m+g*v,T=g*Math.sin(M),b=Math.atan2(i*L-r*T,r*L+i*T),x=(b-p)*n.radDeg-h;x>180?x-=360:-180>x&&(x+=360),e.rotationIK=h+x*s,x=(M+p)*n.radDeg-o,x>180?x-=360:-180>x&&(x+=360),t.rotationIK=o+(x+e.worldRotation-t.parent.worldRotation)*s},n.Skin=function(e){this.name=e,this.attachments={}},n.Skin.prototype={addAttachment:function(e,t,r){this.attachments[e+":"+t]=r},getAttachment:function(e,t){return this.attachments[e+":"+t]},_attachAll:function(e,t){for(var r in t.attachments){var i=r.indexOf(":"),n=parseInt(r.substring(0,i)),a=r.substring(i+1),s=e.slots[n];if(s.attachment&&s.attachment.name==a){var o=this.getAttachment(n,a);o&&s.setAttachment(o)}}}},n.Animation=function(e,t,r){this.name=e,this.timelines=t,this.duration=r},n.Animation.prototype={apply:function(e,t,r,i,n){i&&0!=this.duration&&(r%=this.duration,t%=this.duration);for(var a=this.timelines,s=0,o=a.length;o>s;s++)a[s].apply(e,t,r,n,1)},mix:function(e,t,r,i,n,a){i&&0!=this.duration&&(r%=this.duration,t%=this.duration);for(var s=this.timelines,o=0,h=s.length;h>o;o++)s[o].apply(e,t,r,n,a)}},n.Animation.binarySearch=function(e,t,r){var i=0,n=Math.floor(e.length/r)-2;if(!n)return r;for(var a=n>>>1;;){if(e[(a+1)*r]<=t?i=a+1:n=a,i==n)return(i+1)*r;a=i+n>>>1}},n.Animation.binarySearch1=function(e,t){var r=0,i=e.length-2;if(!i)return 1;for(var n=i>>>1;;){if(e[n+1]<=t?r=n+1:i=n,r==i)return r+1;n=r+i>>>1}},n.Animation.linearSearch=function(e,t,r){for(var i=0,n=e.length-r;n>=i;i+=r)if(e[i]>t)return i;return-1},n.Curves=function(){this.curves=[]},n.Curves.prototype={setLinear:function(e){this.curves[19*e]=0},setStepped:function(e){this.curves[19*e]=1},setCurve:function(e,t,r,i,n){var a=.1,s=a*a,o=s*a,h=3*a,u=3*s,l=6*s,d=6*o,c=2*-t+i,f=2*-r+n,_=3*(t-i)+1,p=3*(r-n)+1,m=t*h+c*u+_*o,g=r*h+f*u+p*o,y=c*l+_*d,v=f*l+p*d,M=_*d,L=p*d,T=19*e,b=this.curves;b[T++]=2;for(var x=m,w=g,Y=T+19-1;Y>T;T+=2)b[T]=x,b[T+1]=w,m+=y,g+=v,y+=M,v+=L,x+=m,w+=g},getCurvePercent:function(e,t){t=0>t?0:t>1?1:t;var r=this.curves,i=19*e,n=r[i];if(0===n)return t;if(1==n)return 0;i++;for(var a=0,s=i,o=i+19-1;o>i;i+=2)if(a=r[i],a>=t){var h,u;return i==s?(h=0,u=0):(h=r[i-2],u=r[i-1]),u+(r[i+1]-u)*(t-h)/(a-h)}var l=r[i-1];return l+(1-l)*(t-a)/(1-a)}},n.RotateTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=2*e},n.RotateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(e,t,r){e*=2,this.frames[e]=t,this.frames[e+1]=r},apply:function(e,t,r,i,a){var s=this.frames;if(!(r<s[0])){var o=e.bones[this.boneIndex];if(r>=s[s.length-2]){for(var h=o.data.rotation+s[s.length-1]-o.rotation;h>180;)h-=360;for(;-180>h;)h+=360;return void(o.rotation+=h*a)}var u=n.Animation.binarySearch(s,r,2),l=s[u-1],d=s[u],c=1-(r-d)/(s[u-2]-d);c=this.curves.getCurvePercent(u/2-1,c);for(var h=s[u+1]-l;h>180;)h-=360;for(;-180>h;)h+=360;for(h=o.data.rotation+(l+h*c)-o.rotation;h>180;)h-=360;for(;-180>h;)h+=360;o.rotation+=h*a}}},n.TranslateTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=3*e},n.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(e,t,r,i){e*=3,this.frames[e]=t,this.frames[e+1]=r,this.frames[e+2]=i},apply:function(e,t,r,i,a){var s=this.frames;if(!(r<s[0])){var o=e.bones[this.boneIndex];if(r>=s[s.length-3])return o.x+=(o.data.x+s[s.length-2]-o.x)*a,void(o.y+=(o.data.y+s[s.length-1]-o.y)*a);var h=n.Animation.binarySearch(s,r,3),u=s[h-2],l=s[h-1],d=s[h],c=1-(r-d)/(s[h+-3]-d);c=this.curves.getCurvePercent(h/3-1,c),o.x+=(o.data.x+u+(s[h+1]-u)*c-o.x)*a,o.y+=(o.data.y+l+(s[h+2]-l)*c-o.y)*a}}},n.ScaleTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=3*e},n.ScaleTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(e,t,r,i){e*=3,this.frames[e]=t,this.frames[e+1]=r,this.frames[e+2]=i},apply:function(e,t,r,i,a){var s=this.frames;if(!(r<s[0])){var o=e.bones[this.boneIndex];if(r>=s[s.length-3])return o.scaleX+=(o.data.scaleX*s[s.length-2]-o.scaleX)*a,void(o.scaleY+=(o.data.scaleY*s[s.length-1]-o.scaleY)*a);var h=n.Animation.binarySearch(s,r,3),u=s[h-2],l=s[h-1],d=s[h],c=1-(r-d)/(s[h+-3]-d);c=this.curves.getCurvePercent(h/3-1,c),o.scaleX+=(o.data.scaleX*(u+(s[h+1]-u)*c)-o.scaleX)*a,o.scaleY+=(o.data.scaleY*(l+(s[h+2]-l)*c)-o.scaleY)*a}}},n.ColorTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=5*e},n.ColorTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length/5},setFrame:function(e,t,r,i,n,a){e*=5,this.frames[e]=t,this.frames[e+1]=r,this.frames[e+2]=i,this.frames[e+3]=n,this.frames[e+4]=a},apply:function(e,t,r,i,a){var s=this.frames;if(!(r<s[0])){var o,h,u,l;if(r>=s[s.length-5]){var d=s.length-1;o=s[d-3],h=s[d-2],u=s[d-1],l=s[d]}else{var c=n.Animation.binarySearch(s,r,5),f=s[c-4],_=s[c-3],p=s[c-2],m=s[c-1],g=s[c],y=1-(r-g)/(s[c-5]-g);y=this.curves.getCurvePercent(c/5-1,y),o=f+(s[c+1]-f)*y,h=_+(s[c+2]-_)*y,u=p+(s[c+3]-p)*y,l=m+(s[c+4]-m)*y}var v=e.slots[this.slotIndex];1>a?(v.r+=(o-v.r)*a,v.g+=(h-v.g)*a,v.b+=(u-v.b)*a,v.a+=(l-v.a)*a):(v.r=o,v.g=h,v.b=u,v.a=l)}}},n.AttachmentTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=e,this.attachmentNames=[],this.attachmentNames.length=e},n.AttachmentTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length},setFrame:function(e,t,r){this.frames[e]=t,this.attachmentNames[e]=r},apply:function(e,t,r){var i=this.frames;if(r<i[0])return void(t>r&&this.apply(e,t,Number.MAX_VALUE,null,0));t>r&&(t=-1);var a=r>=i[i.length-1]?i.length-1:n.Animation.binarySearch1(i,r)-1;if(!(i[a]<t)){var s=this.attachmentNames[a];e.slots[this.slotIndex].setAttachment(s?e.getAttachmentBySlotIndex(this.slotIndex,s):null)}}},n.EventTimeline=function(e){this.frames=[],this.frames.length=e,this.events=[],this.events.length=e},n.EventTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(e,t,r){this.frames[e]=t,this.events[e]=r},apply:function(e,t,r,i,a){if(i){var s=this.frames,o=s.length;if(t>r)this.apply(e,t,Number.MAX_VALUE,i,a),t=-1;else if(t>=s[o-1])return;if(!(r<s[0])){var h;if(t<s[0])h=0;else{h=n.Animation.binarySearch1(s,t);for(var u=s[h];h>0&&s[h-1]==u;)h--}for(var l=this.events;o>h&&r>=s[h];h++)i.push(l[h])}}}},n.DrawOrderTimeline=function(e){this.frames=[],this.frames.length=e,this.drawOrders=[],this.drawOrders.length=e},n.DrawOrderTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(e,t,r){this.frames[e]=t,this.drawOrders[e]=r},apply:function(e,t,r){var i=this.frames;if(!(r<i[0])){var a;a=r>=i[i.length-1]?i.length-1:n.Animation.binarySearch1(i,r)-1;var s=e.drawOrder,o=e.slots,h=this.drawOrders[a];if(h)for(var u=0,l=h.length;l>u;u++)s[u]=e.slots[h[u]];else for(var u=0,l=o.length;l>u;u++)s[u]=o[u]}}},n.FfdTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=e,this.frameVertices=[],this.frameVertices.length=e},n.FfdTimeline.prototype={slotIndex:0,attachment:0,getFrameCount:function(){return this.frames.length},setFrame:function(e,t,r){this.frames[e]=t,this.frameVertices[e]=r},apply:function(e,t,r,i,a){var s=e.slots[this.slotIndex];if(s.attachment==this.attachment){var o=this.frames;if(!(r<o[0])){var h=this.frameVertices,u=h[0].length,l=s.attachmentVertices;if(l.length!=u&&(a=1),l.length=u,r>=o[o.length-1]){var d=h[o.length-1];if(1>a)for(var c=0;u>c;c++)l[c]+=(d[c]-l[c])*a;else for(var c=0;u>c;c++)l[c]=d[c]}else{var f=n.Animation.binarySearch1(o,r),_=o[f],p=1-(r-_)/(o[f-1]-_);p=this.curves.getCurvePercent(f-1,0>p?0:p>1?1:p);var m=h[f-1],g=h[f];if(1>a)for(var c=0;u>c;c++){var y=m[c];l[c]+=(y+(g[c]-y)*p-l[c])*a}else for(var c=0;u>c;c++){var y=m[c];l[c]=y+(g[c]-y)*p}}}}}},n.IkConstraintTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=3*e},n.IkConstraintTimeline.prototype={ikConstraintIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(e,t,r,i){e*=3,this.frames[e]=t,this.frames[e+1]=r,this.frames[e+2]=i},apply:function(e,t,r,i,a){var s=this.frames;if(!(r<s[0])){var o=e.ikConstraints[this.ikConstraintIndex];if(r>=s[s.length-3])return o.mix+=(s[s.length-2]-o.mix)*a,void(o.bendDirection=s[s.length-1]);var h=n.Animation.binarySearch(s,r,3),u=s[h+-2],l=s[h],d=1-(r-l)/(s[h+-3]-l);d=this.curves.getCurvePercent(h/3-1,d);var c=u+(s[h+1]-u)*d;o.mix+=(c-o.mix)*a,o.bendDirection=s[h+-1]}}},n.FlipXTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=2*e},n.FlipXTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(e,t,r){e*=2,this.frames[e]=t,this.frames[e+1]=r?1:0},apply:function(e,t,r){var i=this.frames;if(r<i[0])return void(t>r&&this.apply(e,t,Number.MAX_VALUE,null,0));t>r&&(t=-1);var a=(r>=i[i.length-2]?i.length:n.Animation.binarySearch(i,r,2))-2;i[a]<t||(e.bones[boneIndex].flipX=0!=i[a+1])}},n.FlipYTimeline=function(e){this.curves=new n.Curves(e),this.frames=[],this.frames.length=2*e},n.FlipYTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(e,t,r){e*=2,this.frames[e]=t,this.frames[e+1]=r?1:0},apply:function(e,t,r){var i=this.frames;if(r<i[0])return void(t>r&&this.apply(e,t,Number.MAX_VALUE,null,0));t>r&&(t=-1);var a=(r>=i[i.length-2]?i.length:n.Animation.binarySearch(i,r,2))-2;i[a]<t||(e.bones[boneIndex].flipY=0!=i[a+1])}},n.SkeletonData=function(){this.bones=[],this.slots=[],this.skins=[],this.events=[],this.animations=[],this.ikConstraints=[]},n.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(e){for(var t=this.bones,r=0,i=t.length;i>r;r++)if(t[r].name==e)return t[r];return null},findBoneIndex:function(e){for(var t=this.bones,r=0,i=t.length;i>r;r++)if(t[r].name==e)return r;return-1},findSlot:function(e){for(var t=this.slots,r=0,i=t.length;i>r;r++)if(t[r].name==e)return slot[r];return null},findSlotIndex:function(e){for(var t=this.slots,r=0,i=t.length;i>r;r++)if(t[r].name==e)return r;return-1},findSkin:function(e){for(var t=this.skins,r=0,i=t.length;i>r;r++)if(t[r].name==e)return t[r];return null},findEvent:function(e){for(var t=this.events,r=0,i=t.length;i>r;r++)if(t[r].name==e)return t[r];return null},findAnimation:function(e){for(var t=this.animations,r=0,i=t.length;i>r;r++)if(t[r].name==e)return t[r];return null},findIkConstraint:function(e){for(var t=this.ikConstraints,r=0,i=t.length;i>r;r++)if(t[r].name==e)return t[r];return null}},n.Skeleton=function(e){this.data=e,this.bones=[];for(var t=0,r=e.bones.length;r>t;t++){var i=e.bones[t],a=i.parent?this.bones[e.bones.indexOf(i.parent)]:null;this.bones.push(new n.Bone(i,this,a))}this.slots=[],this.drawOrder=[];for(var t=0,r=e.slots.length;r>t;t++){var s=e.slots[t],o=this.bones[e.bones.indexOf(s.boneData)],h=new n.Slot(s,o);this.slots.push(h),this.drawOrder.push(h)}this.ikConstraints=[];for(var t=0,r=e.ikConstraints.length;r>t;t++)this.ikConstraints.push(new n.IkConstraint(e.ikConstraints[t],this));this.boneCache=[],this.updateCache()},n.Skeleton.prototype={x:0,y:0,skin:null,r:1,g:1,b:1,a:1,time:0,flipX:!1,flipY:!1,updateCache:function(){var e=this.ikConstraints,t=e.length,r=t+1,i=this.boneCache;i.length>r&&(i.length=r);for(var n=0,a=i.length;a>n;n++)i[n].length=0;for(;i.length<r;)i[i.length]=[];var s=i[0],o=this.bones;e:for(var n=0,a=o.length;a>n;n++){var h=o[n],u=h;do{for(var l=0;t>l;l++)for(var d=e[l],c=d.bones[0],f=d.bones[d.bones.length-1];;){if(u==f){i[l].push(h),i[l+1].push(h);continue e}if(f==c)break;f=f.parent}u=u.parent}while(u);s[s.length]=h}},updateWorldTransform:function(){for(var e=this.bones,t=0,r=e.length;r>t;t++){var i=e[t];i.rotationIK=i.rotation}for(var t=0,n=this.boneCache.length-1;;){for(var a=this.boneCache[t],s=0,o=a.length;o>s;s++)a[s].updateWorldTransform();if(t==n)break;this.ikConstraints[t].apply(),t++}},setToSetupPose:function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},setBonesToSetupPose:function(){for(var e=this.bones,t=0,r=e.length;r>t;t++)e[t].setToSetupPose();for(var i=this.ikConstraints,t=0,r=i.length;r>t;t++){var n=i[t];n.bendDirection=n.data.bendDirection,n.mix=n.data.mix}},setSlotsToSetupPose:function(){for(var e=this.slots,t=this.drawOrder,r=0,i=e.length;i>r;r++)t[r]=e[r],e[r].setToSetupPose(r)},getRootBone:function(){return this.bones.length?this.bones[0]:null},findBone:function(e){for(var t=this.bones,r=0,i=t.length;i>r;r++)if(t[r].data.name==e)return t[r];return null},findBoneIndex:function(e){for(var t=this.bones,r=0,i=t.length;i>r;r++)if(t[r].data.name==e)return r;return-1},findSlot:function(e){for(var t=this.slots,r=0,i=t.length;i>r;r++)if(t[r].data.name==e)return t[r];return null},findSlotIndex:function(e){for(var t=this.slots,r=0,i=t.length;i>r;r++)if(t[r].data.name==e)return r;return-1},setSkinByName:function(e){var t=this.data.findSkin(e);if(!t)throw"Skin not found: "+e;this.setSkin(t)},setSkin:function(e){if(e)if(this.skin)e._attachAll(this,this.skin);else for(var t=this.slots,r=0,i=t.length;i>r;r++){var n=t[r],a=n.data.attachmentName;if(a){var s=e.getAttachment(r,a);s&&n.setAttachment(s)}}this.skin=e},getAttachmentBySlotName:function(e,t){return this.getAttachmentBySlotIndex(this.data.findSlotIndex(e),t)},getAttachmentBySlotIndex:function(e,t){if(this.skin){var r=this.skin.getAttachment(e,t);if(r)return r}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(e,t):null},setAttachment:function(e,t){for(var r=this.slots,i=0,n=r.length;n>i;i++){var a=r[i];if(a.data.name==e){var s=null;if(t&&(s=this.getAttachmentBySlotIndex(i,t),!s))throw"Attachment not found: "+t+", for slot: "+e;return void a.setAttachment(s)}}throw"Slot not found: "+e},findIkConstraint:function(e){for(var t=this.ikConstraints,r=0,i=t.length;i>r;r++)if(t[r].data.name==e)return t[r];return null},update:function(e){this.time+=e}},n.EventData=function(e){this.name=e},n.EventData.prototype={intValue:0,floatValue:0,stringValue:null},n.Event=function(e){this.data=e},n.Event.prototype={intValue:0,floatValue:0,stringValue:null},n.AttachmentType={region:0,boundingbox:1,mesh:2,skinnedmesh:3},n.RegionAttachment=function(e){this.name=e,this.offset=[],this.offset.length=8,this.uvs=[],this.uvs.length=8},n.RegionAttachment.prototype={type:n.AttachmentType.region,x:0,y:0,rotation:0,scaleX:1,scaleY:1,width:0,height:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,setUVs:function(e,t,r,i,n){var a=this.uvs;n?(a[2]=e,a[3]=i,a[4]=e,a[5]=t,a[6]=r,a[7]=t,a[0]=r,a[1]=i):(a[0]=e,a[1]=i,a[2]=e,a[3]=t,a[4]=r,a[5]=t,a[6]=r,a[7]=i)},updateOffset:function(){var e=this.width/this.regionOriginalWidth*this.scaleX,t=this.height/this.regionOriginalHeight*this.scaleY,r=-this.width/2*this.scaleX+this.regionOffsetX*e,i=-this.height/2*this.scaleY+this.regionOffsetY*t,a=r+this.regionWidth*e,s=i+this.regionHeight*t,o=this.rotation*n.degRad,h=Math.cos(o),u=Math.sin(o),l=r*h+this.x,d=r*u,c=i*h+this.y,f=i*u,_=a*h+this.x,p=a*u,m=s*h+this.y,g=s*u,y=this.offset;y[0]=l-f,y[1]=c+d,y[2]=l-g,y[3]=m+d,y[4]=_-g,y[5]=m+p,y[6]=_-f,y[7]=c+p},computeVertices:function(e,t,r,i){e+=r.worldX,t+=r.worldY;var n=r.m00,a=r.m01,s=r.m10,o=r.m11,h=this.offset;i[0]=h[0]*n+h[1]*a+e,i[1]=h[0]*s+h[1]*o+t,i[2]=h[2]*n+h[3]*a+e,i[3]=h[2]*s+h[3]*o+t,i[4]=h[4]*n+h[5]*a+e,i[5]=h[4]*s+h[5]*o+t,i[6]=h[6]*n+h[7]*a+e,i[7]=h[6]*s+h[7]*o+t}},n.MeshAttachment=function(e){this.name=e},n.MeshAttachment.prototype={type:n.AttachmentType.mesh,vertices:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var e=this.regionU2-this.regionU,t=this.regionV2-this.regionV,r=this.regionUVs.length;if(this.uvs&&this.uvs.length==r||(this.uvs=new n.Float32Array(r)),this.regionRotate)for(var i=0;r>i;i+=2)this.uvs[i]=this.regionU+this.regionUVs[i+1]*e,this.uvs[i+1]=this.regionV+t-this.regionUVs[i]*t;else for(var i=0;r>i;i+=2)this.uvs[i]=this.regionU+this.regionUVs[i]*e,this.uvs[i+1]=this.regionV+this.regionUVs[i+1]*t},computeWorldVertices:function(e,t,r,i){var n=r.bone;e+=n.worldX,t+=n.worldY;var a=n.m00,s=n.m01,o=n.m10,h=n.m11,u=this.vertices,l=u.length;r.attachmentVertices.length==l&&(u=r.attachmentVertices);for(var d=0;l>d;d+=2){var c=u[d],f=u[d+1];i[d]=c*a+f*s+e,i[d+1]=c*o+f*h+t}}},n.SkinnedMeshAttachment=function(e){this.name=e},n.SkinnedMeshAttachment.prototype={type:n.AttachmentType.skinnedmesh,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var e=this.regionU2-this.regionU,t=this.regionV2-this.regionV,r=this.regionUVs.length;if(this.uvs&&this.uvs.length==r||(this.uvs=new n.Float32Array(r)),this.regionRotate)for(var i=0;r>i;i+=2)this.uvs[i]=this.regionU+this.regionUVs[i+1]*e,this.uvs[i+1]=this.regionV+t-this.regionUVs[i]*t;else for(var i=0;r>i;i+=2)this.uvs[i]=this.regionU+this.regionUVs[i]*e,this.uvs[i+1]=this.regionV+this.regionUVs[i+1]*t},computeWorldVertices:function(e,t,r,i){var n,a,s,o,h,u,l,d=r.bone.skeleton.bones,c=this.weights,f=this.bones,_=0,p=0,m=0,g=0,y=f.length;if(r.attachmentVertices.length)for(var v=r.attachmentVertices;y>p;_+=2){for(a=0,s=0,n=f[p++]+p;n>p;p++,m+=3,g+=2)o=d[f[p]],h=c[m]+v[g],u=c[m+1]+v[g+1],l=c[m+2],a+=(h*o.m00+u*o.m01+o.worldX)*l,s+=(h*o.m10+u*o.m11+o.worldY)*l;
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
    11
i[_]=a+e,i[_+1]=s+t}else for(;y>p;_+=2){for(a=0,s=0,n=f[p++]+p;n>p;p++,m+=3)o=d[f[p]],h=c[m],u=c[m+1],l=c[m+2],a+=(h*o.m00+u*o.m01+o.worldX)*l,s+=(h*o.m10+u*o.m11+o.worldY)*l;i[_]=a+e,i[_+1]=s+t}}},n.BoundingBoxAttachment=function(e){this.name=e,this.vertices=[]},n.BoundingBoxAttachment.prototype={type:n.AttachmentType.boundingbox,computeWorldVertices:function(e,t,r,i){e+=r.worldX,t+=r.worldY;for(var n=r.m00,a=r.m01,s=r.m10,o=r.m11,h=this.vertices,u=0,l=h.length;l>u;u+=2){var d=h[u],c=h[u+1];i[u]=d*n+c*a+e,i[u+1]=d*s+c*o+t}}},n.AnimationStateData=function(e){this.skeletonData=e,this.animationToMixTime={}},n.AnimationStateData.prototype={defaultMix:0,setMixByName:function(e,t,r){var i=this.skeletonData.findAnimation(e);if(!i)throw"Animation not found: "+e;var n=this.skeletonData.findAnimation(t);if(!n)throw"Animation not found: "+t;this.setMix(i,n,r)},setMix:function(e,t,r){this.animationToMixTime[e.name+":"+t.name]=r},getMix:function(e,t){var r=e.name+":"+t.name;return this.animationToMixTime.hasOwnProperty(r)?this.animationToMixTime[r]:this.defaultMix}},n.TrackEntry=function(){},n.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null},n.AnimationState=function(e){this.data=e,this.tracks=[],this.events=[]},n.AnimationState.prototype={onStart:null,onEnd:null,onComplete:null,onEvent:null,timeScale:1,update:function(e){e*=this.timeScale;for(var t=0;t<this.tracks.length;t++){var r=this.tracks[t];if(r){if(r.time+=e*r.timeScale,r.previous){var i=e*r.previous.timeScale;r.previous.time+=i,r.mixTime+=i}var n=r.next;n?(n.time=r.lastTime-n.delay,n.time>=0&&this.setCurrent(t,n)):!r.loop&&r.lastTime>=r.endTime&&this.clearTrack(t)}}},apply:function(e){for(var t=0;t<this.tracks.length;t++){var r=this.tracks[t];if(r){this.events.length=0;var i=r.time,n=r.lastTime,a=r.endTime,s=r.loop;!s&&i>a&&(i=a);var o=r.previous;if(o){var h=o.time;!o.loop&&h>o.endTime&&(h=o.endTime),o.animation.apply(e,h,h,o.loop,null);var u=r.mixTime/r.mixDuration*r.mix;u>=1&&(u=1,r.previous=null),r.animation.mix(e,r.lastTime,i,s,this.events,u)}else 1==r.mix?r.animation.apply(e,r.lastTime,i,s,this.events):r.animation.mix(e,r.lastTime,i,s,this.events,r.mix);for(var l=0,d=this.events.length;d>l;l++){var c=this.events[l];r.onEvent&&r.onEvent(t,c),this.onEvent&&this.onEvent(t,c)}if(s?n%a>i%a:a>n&&i>=a){var f=Math.floor(i/a);r.onComplete&&r.onComplete(t,f),this.onComplete&&this.onComplete(t,f)}r.lastTime=r.time}}},clearTracks:function(){for(var e=0,t=this.tracks.length;t>e;e++)this.clearTrack(e);this.tracks.length=0},clearTrack:function(e){if(!(e>=this.tracks.length)){var t=this.tracks[e];t&&(t.onEnd&&t.onEnd(e),this.onEnd&&this.onEnd(e),this.tracks[e]=null)}},_expandToIndex:function(e){if(e<this.tracks.length)return this.tracks[e];for(;e>=this.tracks.length;)this.tracks.push(null);return null},setCurrent:function(e,t){var r=this._expandToIndex(e);if(r){var i=r.previous;r.previous=null,r.onEnd&&r.onEnd(e),this.onEnd&&this.onEnd(e),t.mixDuration=this.data.getMix(r.animation,t.animation),t.mixDuration>0&&(t.mixTime=0,t.previous=i&&r.mixTime/r.mixDuration<.5?i:r)}this.tracks[e]=t,t.onStart&&t.onStart(e),this.onStart&&this.onStart(e)},setAnimationByName:function(e,t,r){var i=this.data.skeletonData.findAnimation(t);if(!i)throw"Animation not found: "+t;return this.setAnimation(e,i,r)},setAnimation:function(e,t,r){var i=new n.TrackEntry;return i.animation=t,i.loop=r,i.endTime=t.duration,this.setCurrent(e,i),i},addAnimationByName:function(e,t,r,i){var n=this.data.skeletonData.findAnimation(t);if(!n)throw"Animation not found: "+t;return this.addAnimation(e,n,r,i)},addAnimation:function(e,t,r,i){var a=new n.TrackEntry;a.animation=t,a.loop=r,a.endTime=t.duration;var s=this._expandToIndex(e);if(s){for(;s.next;)s=s.next;s.next=a}else this.tracks[e]=a;return 0>=i&&(s?i+=s.endTime-this.data.getMix(s.animation,t):i=0),a.delay=i,a},getCurrent:function(e){return e>=this.tracks.length?null:this.tracks[e]}},n.SkeletonJson=function(e){this.attachmentLoader=e},n.SkeletonJson.prototype={scale:1,readSkeletonData:function(e,t){var r=new n.SkeletonData;r.name=t;var i=e.skeleton;i&&(r.hash=i.hash,r.version=i.spine,r.width=i.width||0,r.height=i.height||0);for(var a=e.bones,s=0,o=a.length;o>s;s++){var h=a[s],u=null;if(h.parent&&(u=r.findBone(h.parent),!u))throw"Parent bone not found: "+h.parent;var l=new n.BoneData(h.name,u);l.length=(h.length||0)*this.scale,l.x=(h.x||0)*this.scale,l.y=(h.y||0)*this.scale,l.rotation=h.rotation||0,l.scaleX=h.hasOwnProperty("scaleX")?h.scaleX:1,l.scaleY=h.hasOwnProperty("scaleY")?h.scaleY:1,l.inheritScale=h.hasOwnProperty("inheritScale")?h.inheritScale:!0,l.inheritRotation=h.hasOwnProperty("inheritRotation")?h.inheritRotation:!0,r.bones.push(l)}var d=e.ik;if(d)for(var s=0,o=d.length;o>s;s++){for(var c=d[s],f=new n.IkConstraintData(c.name),a=c.bones,_=0,p=a.length;p>_;_++){var m=r.findBone(a[_]);if(!m)throw"IK bone not found: "+a[_];f.bones.push(m)}if(f.target=r.findBone(c.target),!f.target)throw"Target bone not found: "+c.target;f.bendDirection=!c.hasOwnProperty("bendPositive")||c.bendPositive?1:-1,f.mix=c.hasOwnProperty("mix")?c.mix:1,r.ikConstraints.push(f)}for(var g=e.slots,s=0,o=g.length;o>s;s++){var y=g[s],l=r.findBone(y.bone);if(!l)throw"Slot bone not found: "+y.bone;var v=new n.SlotData(y.name,l),M=y.color;M&&(v.r=this.toColor(M,0),v.g=this.toColor(M,1),v.b=this.toColor(M,2),v.a=this.toColor(M,3)),v.attachmentName=y.attachment,v.additiveBlending=y.additive&&"true"==y.additive,r.slots.push(v)}var L=e.skins;for(var T in L)if(L.hasOwnProperty(T)){var b=L[T],x=new n.Skin(T);for(var w in b)if(b.hasOwnProperty(w)){var Y=r.findSlotIndex(w),D=b[w];for(var S in D)if(D.hasOwnProperty(S)){var k=this.readAttachment(x,S,D[S]);k&&x.addAttachment(Y,S,k)}}r.skins.push(x),"default"==x.name&&(r.defaultSkin=x)}var C=e.events;for(var A in C)if(C.hasOwnProperty(A)){var E=C[A],F=new n.EventData(A);F.intValue=E["int"]||0,F.floatValue=E["float"]||0,F.stringValue=E.string||null,r.events.push(F)}var R=e.animations;for(var P in R)R.hasOwnProperty(P)&&this.readAnimation(P,R[P],r);return r},readAttachment:function(e,t,r){t=r.name||t;var i=n.AttachmentType[r.type||"region"],a=r.path||t,s=this.scale;if(i==n.AttachmentType.region){var o=this.attachmentLoader.newRegionAttachment(e,t,a);if(!o)return null;o.path=a,o.x=(r.x||0)*s,o.y=(r.y||0)*s,o.scaleX=r.hasOwnProperty("scaleX")?r.scaleX:1,o.scaleY=r.hasOwnProperty("scaleY")?r.scaleY:1,o.rotation=r.rotation||0,o.width=(r.width||0)*s,o.height=(r.height||0)*s;var h=r.color;return h&&(o.r=this.toColor(h,0),o.g=this.toColor(h,1),o.b=this.toColor(h,2),o.a=this.toColor(h,3)),o.updateOffset(),o}if(i==n.AttachmentType.mesh){var u=this.attachmentLoader.newMeshAttachment(e,t,a);return u?(u.path=a,u.vertices=this.getFloatArray(r,"vertices",s),u.triangles=this.getIntArray(r,"triangles"),u.regionUVs=this.getFloatArray(r,"uvs",1),u.updateUVs(),h=r.color,h&&(u.r=this.toColor(h,0),u.g=this.toColor(h,1),u.b=this.toColor(h,2),u.a=this.toColor(h,3)),u.hullLength=2*(r.hull||0),r.edges&&(u.edges=this.getIntArray(r,"edges")),u.width=(r.width||0)*s,u.height=(r.height||0)*s,u):null}if(i==n.AttachmentType.skinnedmesh){var u=this.attachmentLoader.newSkinnedMeshAttachment(e,t,a);if(!u)return null;u.path=a;for(var l=this.getFloatArray(r,"uvs",1),d=this.getFloatArray(r,"vertices",1),c=[],f=[],_=0,p=d.length;p>_;){var m=0|d[_++];f[f.length]=m;for(var g=_+4*m;g>_;)f[f.length]=d[_],c[c.length]=d[_+1]*s,c[c.length]=d[_+2]*s,c[c.length]=d[_+3],_+=4}return u.bones=f,u.weights=c,u.triangles=this.getIntArray(r,"triangles"),u.regionUVs=l,u.updateUVs(),h=r.color,h&&(u.r=this.toColor(h,0),u.g=this.toColor(h,1),u.b=this.toColor(h,2),u.a=this.toColor(h,3)),u.hullLength=2*(r.hull||0),r.edges&&(u.edges=this.getIntArray(r,"edges")),u.width=(r.width||0)*s,u.height=(r.height||0)*s,u}if(i==n.AttachmentType.boundingbox){for(var y=this.attachmentLoader.newBoundingBoxAttachment(e,t),d=r.vertices,_=0,p=d.length;p>_;_++)y.vertices.push(d[_]*s);return y}throw"Unknown attachment type: "+i},readAnimation:function(e,t,r){var i=[],a=0,s=t.slots;for(var o in s)if(s.hasOwnProperty(o)){var h=s[o],u=r.findSlotIndex(o);for(var l in h)if(h.hasOwnProperty(l)){var d=h[l];if("color"==l){var c=new n.ColorTimeline(d.length);c.slotIndex=u;for(var f=0,_=0,p=d.length;p>_;_++){var m=d[_],g=m.color,y=this.toColor(g,0),v=this.toColor(g,1),M=this.toColor(g,2),L=this.toColor(g,3);c.setFrame(f,m.time,y,v,M,L),this.readCurve(c,f,m),f++}i.push(c),a=Math.max(a,c.frames[5*c.getFrameCount()-5])}else{if("attachment"!=l)throw"Invalid timeline type for a slot: "+l+" ("+o+")";var c=new n.AttachmentTimeline(d.length);c.slotIndex=u;for(var f=0,_=0,p=d.length;p>_;_++){var m=d[_];c.setFrame(f++,m.time,m.name)}i.push(c),a=Math.max(a,c.frames[c.getFrameCount()-1])}}}var T=t.bones;for(var b in T)if(T.hasOwnProperty(b)){var x=r.findBoneIndex(b);if(-1==x)throw"Bone not found: "+b;var w=T[b];for(var l in w)if(w.hasOwnProperty(l)){var d=w[l];if("rotate"==l){var c=new n.RotateTimeline(d.length);c.boneIndex=x;for(var f=0,_=0,p=d.length;p>_;_++){var m=d[_];c.setFrame(f,m.time,m.angle),this.readCurve(c,f,m),f++}i.push(c),a=Math.max(a,c.frames[2*c.getFrameCount()-2])}else if("translate"==l||"scale"==l){var c,Y=1;"scale"==l?c=new n.ScaleTimeline(d.length):(c=new n.TranslateTimeline(d.length),Y=this.scale),c.boneIndex=x;for(var f=0,_=0,p=d.length;p>_;_++){var m=d[_],D=(m.x||0)*Y,S=(m.y||0)*Y;c.setFrame(f,m.time,D,S),this.readCurve(c,f,m),f++}i.push(c),a=Math.max(a,c.frames[3*c.getFrameCount()-3])}else{if("flipX"!=l&&"flipY"!=l)throw"Invalid timeline type for a bone: "+l+" ("+b+")";var D="flipX"==l,c=D?new n.FlipXTimeline(d.length):new n.FlipYTimeline(d.length);c.boneIndex=x;for(var k=D?"x":"y",f=0,_=0,p=d.length;p>_;_++){var m=d[_];c.setFrame(f,m.time,m[k]||!1),f++}i.push(c),a=Math.max(a,c.frames[2*c.getFrameCount()-2])}}}var C=t.ik;for(var A in C)if(C.hasOwnProperty(A)){var E=r.findIkConstraint(A),d=C[A],c=new n.IkConstraintTimeline(d.length);c.ikConstraintIndex=r.ikConstraints.indexOf(E);for(var f=0,_=0,p=d.length;p>_;_++){var m=d[_],F=m.hasOwnProperty("mix")?m.mix:1,R=!m.hasOwnProperty("bendPositive")||m.bendPositive?1:-1;c.setFrame(f,m.time,F,R),this.readCurve(c,f,m),f++}i.push(c),a=Math.max(a,c.frames[3*c.frameCount-3])}var P=t.ffd;for(var B in P){var O=r.findSkin(B),h=P[B];for(o in h){var u=r.findSlotIndex(o),j=h[o];for(var I in j){var d=j[I],c=new n.FfdTimeline(d.length),W=O.getAttachment(u,I);if(!W)throw"FFD attachment not found: "+I;c.slotIndex=u,c.attachment=W;var G,U=W.type==n.AttachmentType.mesh;G=U?W.vertices.length:W.weights.length/3*2;for(var f=0,_=0,p=d.length;p>_;_++){var N,m=d[_];if(m.vertices){var H=m.vertices,N=[];N.length=G;var z=m.offset||0,V=H.length;if(1==this.scale)for(var X=0;V>X;X++)N[X+z]=H[X];else for(var X=0;V>X;X++)N[X+z]=H[X]*this.scale;if(U)for(var q=W.vertices,X=0,V=N.length;V>X;X++)N[X]+=q[X]}else U?N=W.vertices:(N=[],N.length=G);c.setFrame(f,m.time,N),this.readCurve(c,f,m),f++}i[i.length]=c,a=Math.max(a,c.frames[c.frameCount-1])}}}var J=t.drawOrder;if(J||(J=t.draworder),J){for(var c=new n.DrawOrderTimeline(J.length),K=r.slots.length,f=0,_=0,p=J.length;p>_;_++){var $=J[_],Q=null;if($.offsets){Q=[],Q.length=K;for(var X=K-1;X>=0;X--)Q[X]=-1;var Z=$.offsets,et=[];et.length=K-Z.length;for(var tt=0,rt=0,X=0,V=Z.length;V>X;X++){var it=Z[X],u=r.findSlotIndex(it.slot);if(-1==u)throw"Slot not found: "+it.slot;for(;tt!=u;)et[rt++]=tt++;Q[tt+it.offset]=tt++}for(;K>tt;)et[rt++]=tt++;for(var X=K-1;X>=0;X--)-1==Q[X]&&(Q[X]=et[--rt])}c.setFrame(f++,$.time,Q)}i.push(c),a=Math.max(a,c.frames[c.getFrameCount()-1])}var nt=t.events;if(nt){for(var c=new n.EventTimeline(nt.length),f=0,_=0,p=nt.length;p>_;_++){var at=nt[_],st=r.findEvent(at.name);if(!st)throw"Event not found: "+at.name;var ot=new n.Event(st);ot.intValue=at.hasOwnProperty("int")?at["int"]:st.intValue,ot.floatValue=at.hasOwnProperty("float")?at["float"]:st.floatValue,ot.stringValue=at.hasOwnProperty("string")?at.string:st.stringValue,c.setFrame(f++,at.time,ot)}i.push(c),a=Math.max(a,c.frames[c.getFrameCount()-1])}r.animations.push(new n.Animation(e,i,a))},readCurve:function(e,t,r){var i=r.curve;i?"stepped"==i?e.curves.setStepped(t):i instanceof Array&&e.curves.setCurve(t,i[0],i[1],i[2],i[3]):e.curves.setLinear(t)},toColor:function(e,t){if(8!=e.length)throw"Color hexidecimal length must be 8, recieved: "+e;return parseInt(e.substring(2*t,2*t+2),16)/255},getFloatArray:function(e,t,r){var i=e[t],a=new n.Float32Array(i.length),s=0,o=i.length;if(1==r)for(;o>s;s++)a[s]=i[s];else for(;o>s;s++)a[s]=i[s]*r;return a},getIntArray:function(e,t){for(var r=e[t],i=new n.Uint16Array(r.length),a=0,s=r.length;s>a;a++)i[a]=0|r[a];return i}},n.Atlas=function(e,t){this.textureLoader=t,this.pages=[],this.regions=[];var r=new n.AtlasReader(e),i=[];i.length=4;for(var a=null;;){var s=r.readLine();if(null===s)break;if(s=r.trim(s),s.length)if(a){var o=new n.AtlasRegion;o.name=s,o.page=a,o.rotate="true"==r.readValue(),r.readTuple(i);var h=parseInt(i[0]),u=parseInt(i[1]);r.readTuple(i);var l=parseInt(i[0]),d=parseInt(i[1]);o.u=h/a.width,o.v=u/a.height,o.rotate?(o.u2=(h+d)/a.width,o.v2=(u+l)/a.height):(o.u2=(h+l)/a.width,o.v2=(u+d)/a.height),o.x=h,o.y=u,o.width=Math.abs(l),o.height=Math.abs(d),4==r.readTuple(i)&&(o.splits=[parseInt(i[0]),parseInt(i[1]),parseInt(i[2]),parseInt(i[3])],4==r.readTuple(i)&&(o.pads=[parseInt(i[0]),parseInt(i[1]),parseInt(i[2]),parseInt(i[3])],r.readTuple(i))),o.originalWidth=parseInt(i[0]),o.originalHeight=parseInt(i[1]),r.readTuple(i),o.offsetX=parseInt(i[0]),o.offsetY=parseInt(i[1]),o.index=parseInt(r.readValue()),this.regions.push(o)}else{a=new n.AtlasPage,a.name=s,2==r.readTuple(i)&&(a.width=parseInt(i[0]),a.height=parseInt(i[1]),r.readTuple(i)),a.format=n.Atlas.Format[i[0]],r.readTuple(i),a.minFilter=n.Atlas.TextureFilter[i[0]],a.magFilter=n.Atlas.TextureFilter[i[1]];var c=r.readValue();a.uWrap=n.Atlas.TextureWrap.clampToEdge,a.vWrap=n.Atlas.TextureWrap.clampToEdge,"x"==c?a.uWrap=n.Atlas.TextureWrap.repeat:"y"==c?a.vWrap=n.Atlas.TextureWrap.repeat:"xy"==c&&(a.uWrap=a.vWrap=n.Atlas.TextureWrap.repeat),t.load(a,s,this),this.pages.push(a)}else a=null}},n.Atlas.prototype={findRegion:function(e){for(var t=this.regions,r=0,i=t.length;i>r;r++)if(t[r].name==e)return t[r];return null},dispose:function(){for(var e=this.pages,t=0,r=e.length;r>t;t++)this.textureLoader.unload(e[t].rendererObject)},updateUVs:function(e){for(var t=this.regions,r=0,i=t.length;i>r;r++){var n=t[r];n.page==e&&(n.u=n.x/e.width,n.v=n.y/e.height,n.rotate?(n.u2=(n.x+n.height)/e.width,n.v2=(n.y+n.width)/e.height):(n.u2=(n.x+n.width)/e.width,n.v2=(n.y+n.height)/e.height))}}},n.Atlas.Format={alpha:0,intensity:1,luminanceAlpha:2,rgb565:3,rgba4444:4,rgb888:5,rgba8888:6},n.Atlas.TextureFilter={nearest:0,linear:1,mipMap:2,mipMapNearestNearest:3,mipMapLinearNearest:4,mipMapNearestLinear:5,mipMapLinearLinear:6},n.Atlas.TextureWrap={mirroredRepeat:0,clampToEdge:1,repeat:2},n.AtlasPage=function(){},n.AtlasPage.prototype={name:null,format:null,minFilter:null,magFilter:null,uWrap:null,vWrap:null,rendererObject:null,width:0,height:0},n.AtlasRegion=function(){},n.AtlasRegion.prototype={page:null,name:null,x:0,y:0,width:0,height:0,u:0,v:0,u2:0,v2:0,offsetX:0,offsetY:0,originalWidth:0,originalHeight:0,index:0,rotate:!1,splits:null,pads:null},n.AtlasReader=function(e){this.lines=e.split(/\r\n|\r|\n/)},n.AtlasReader.prototype={index:0,trim:function(e){return e.replace(/^\s+|\s+$/g,"")},readLine:function(){return this.index>=this.lines.length?null:this.lines[this.index++]},readValue:function(){var e=this.readLine(),t=e.indexOf(":");if(-1==t)throw"Invalid line: "+e;return this.trim(e.substring(t+1))},readTuple:function(e){var t=this.readLine(),r=t.indexOf(":");if(-1==r)throw"Invalid line: "+t;for(var i=0,n=r+1;3>i;i++){var a=t.indexOf(",",n);if(-1==a)break;e[i]=this.trim(t.substr(n,a-n)),n=a+1}return e[i]=this.trim(t.substring(n)),i+1}},n.AtlasAttachmentLoader=function(e){this.atlas=e},n.AtlasAttachmentLoader.prototype={newRegionAttachment:function(e,t,r){var i=this.atlas.findRegion(r);if(!i)throw"Region not found in atlas: "+r+" (region attachment: "+t+")";var a=new n.RegionAttachment(t);return a.rendererObject=i,a.setUVs(i.u,i.v,i.u2,i.v2,i.rotate),a.regionOffsetX=i.offsetX,a.regionOffsetY=i.offsetY,a.regionWidth=i.width,a.regionHeight=i.height,a.regionOriginalWidth=i.originalWidth,a.regionOriginalHeight=i.originalHeight,a},newMeshAttachment:function(e,t,r){var i=this.atlas.findRegion(r);if(!i)throw"Region not found in atlas: "+r+" (mesh attachment: "+t+")";var a=new n.MeshAttachment(t);return a.rendererObject=i,a.regionU=i.u,a.regionV=i.v,a.regionU2=i.u2,a.regionV2=i.v2,a.regionRotate=i.rotate,a.regionOffsetX=i.offsetX,a.regionOffsetY=i.offsetY,a.regionWidth=i.width,a.regionHeight=i.height,a.regionOriginalWidth=i.originalWidth,a.regionOriginalHeight=i.originalHeight,a},newSkinnedMeshAttachment:function(e,t,r){var i=this.atlas.findRegion(r);if(!i)throw"Region not found in atlas: "+r+" (skinned mesh attachment: "+t+")";var a=new n.SkinnedMeshAttachment(t);return a.rendererObject=i,a.regionU=i.u,a.regionV=i.v,a.regionU2=i.u2,a.regionV2=i.v2,a.regionRotate=i.rotate,a.regionOffsetX=i.offsetX,a.regionOffsetY=i.offsetY,a.regionWidth=i.width,a.regionHeight=i.height,a.regionOriginalWidth=i.originalWidth,a.regionOriginalHeight=i.originalHeight,a},newBoundingBoxAttachment:function(e,t){return new n.BoundingBoxAttachment(t)}},n.SkeletonBounds=function(){this.polygonPool=[],this.polygons=[],this.boundingBoxes=[]},n.SkeletonBounds.prototype={minX:0,minY:0,maxX:0,maxY:0,update:function(e,t){var r=e.slots,i=r.length,a=e.x,s=e.y,o=this.boundingBoxes,h=this.polygonPool,u=this.polygons;o.length=0;for(var l=0,d=u.length;d>l;l++)h.push(u[l]);u.length=0;for(var l=0;i>l;l++){var c=r[l],f=c.attachment;if(f.type==n.AttachmentType.boundingbox){o.push(f);var _,p=h.length;p>0?(_=h[p-1],h.splice(p-1,1)):_=[],u.push(_),_.length=f.vertices.length,f.computeWorldVertices(a,s,c.bone,_)}}t&&this.aabbCompute()},aabbCompute:function(){for(var e=this.polygons,t=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,n=Number.MIN_VALUE,a=0,s=e.length;s>a;a++)for(var o=e[a],h=0,u=o.length;u>h;h+=2){var l=o[h],d=o[h+1];t=Math.min(t,l),r=Math.min(r,d),i=Math.max(i,l),n=Math.max(n,d)}this.minX=t,this.minY=r,this.maxX=i,this.maxY=n},aabbContainsPoint:function(e,t){return e>=this.minX&&e<=this.maxX&&t>=this.minY&&t<=this.maxY},aabbIntersectsSegment:function(e,t,r,i){var n=this.minX,a=this.minY,s=this.maxX,o=this.maxY;if(n>=e&&n>=r||a>=t&&a>=i||e>=s&&r>=s||t>=o&&i>=o)return!1;var h=(i-t)/(r-e),u=h*(n-e)+t;if(u>a&&o>u)return!0;if(u=h*(s-e)+t,u>a&&o>u)return!0;var l=(a-t)/h+e;return l>n&&s>l?!0:(l=(o-t)/h+e,l>n&&s>l?!0:!1)},aabbIntersectsSkeleton:function(e){return this.minX<e.maxX&&this.maxX>e.minX&&this.minY<e.maxY&&this.maxY>e.minY},containsPoint:function(e,t){for(var r=this.polygons,i=0,n=r.length;n>i;i++)if(this.polygonContainsPoint(r[i],e,t))return this.boundingBoxes[i];return null},intersectsSegment:function(e,t,r,i){for(var n=this.polygons,a=0,s=n.length;s>a;a++)if(n[a].intersectsSegment(e,t,r,i))return this.boundingBoxes[a];return null},polygonContainsPoint:function(e,t,r){for(var i=e.length,n=i-2,a=!1,s=0;i>s;s+=2){var o=e[s+1],h=e[n+1];if(r>o&&h>=r||r>h&&o>=r){var u=e[s];u+(r-o)/(h-o)*(e[n]-u)<t&&(a=!a)}n=s}return a},polygonIntersectsSegment:function(e,t,r,i,n){for(var a=e.length,s=t-i,o=r-n,h=t*n-r*i,u=e[a-2],l=e[a-1],d=0;a>d;d+=2){var c=e[d],f=e[d+1],_=u*f-l*c,p=u-c,m=l-f,g=s*m-o*p,y=(h*p-s*_)/g;if((y>=u&&c>=y||y>=c&&u>=y)&&(y>=t&&i>=y||y>=i&&t>=y)){var v=(h*m-o*_)/g;if((v>=l&&f>=v||v>=f&&l>=v)&&(v>=r&&n>=v||v>=n&&r>=v))return!0}u=c,l=f}return!1},getPolygon:function(e){var t=this.boundingBoxes.indexOf(e);return-1==t?null:this.polygons[t]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}},n.Bone.yDown=!0,i.AnimCache={},i.SpineTextureLoader=function(e,t){i.EventTarget.call(this),this.basePath=e,this.crossorigin=t,this.loadingCount=0},i.SpineTextureLoader.prototype=i.SpineTextureLoader,i.SpineTextureLoader.prototype.load=function(e,t){if(e.rendererObject=i.BaseTexture.fromImage(this.basePath+"/"+t,this.crossorigin),!e.rendererObject.hasLoaded){var r=this;++r.loadingCount,e.rendererObject.addEventListener("loaded",function(){--r.loadingCount,r.dispatchEvent({type:"loadedBaseTexture",content:r})})}},i.SpineTextureLoader.prototype.unload=function(e){e.destroy(!0)},i.Spine=function(e){if(i.DisplayObjectContainer.call(this),this.spineData=i.AnimCache[e],!this.spineData)throw new Error("Spine data must be preloaded using PIXI.SpineLoader or PIXI.AssetLoader: "+e);this.skeleton=new n.Skeleton(this.spineData),this.skeleton.updateWorldTransform(),this.stateData=new n.AnimationStateData(this.spineData),this.state=new n.AnimationState(this.stateData),this.slotContainers=[];for(var t=0,r=this.skeleton.drawOrder.length;r>t;t++){var a=this.skeleton.drawOrder[t],s=a.attachment,o=new i.DisplayObjectContainer;if(this.slotContainers.push(o),this.addChild(o),s instanceof n.RegionAttachment){var h=s.rendererObject.name,u=this.createSprite(a,s);a.currentSprite=u,a.currentSpriteName=h,o.addChild(u)}else{if(!(s instanceof n.MeshAttachment))continue;var l=this.createMesh(a,s);a.currentMesh=l,a.currentMeshName=s.name,o.addChild(l)}}this.autoUpdate=!0},i.Spine.prototype=Object.create(i.DisplayObjectContainer.prototype),i.Spine.prototype.constructor=i.Spine,Object.defineProperty(i.Spine.prototype,"autoUpdate",{get:function(){return this.updateTransform===i.Spine.prototype.autoUpdateTransform},set:function(e){this.updateTransform=e?i.Spine.prototype.autoUpdateTransform:i.DisplayObjectContainer.prototype.updateTransform}}),i.Spine.prototype.update=function(e){this.state.update(e),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();for(var t=this.skeleton.drawOrder,r=0,a=t.length;a>r;r++){var s=t[r],o=s.attachment,h=this.slotContainers[r];if(o){var u=o.type;if(u===n.AttachmentType.region){if(o.rendererObject&&(!s.currentSpriteName||s.currentSpriteName!==o.name)){var l=o.rendererObject.name;if(void 0!==s.currentSprite&&(s.currentSprite.visible=!1),s.sprites=s.sprites||{},void 0!==s.sprites[l])s.sprites[l].visible=!0;else{var d=this.createSprite(s,o);h.addChild(d)}s.currentSprite=s.sprites[l],s.currentSpriteName=l}var c=s.bone;h.position.x=c.worldX+o.x*c.m00+o.y*c.m01,h.position.y=c.worldY+o.x*c.m10+o.y*c.m11,h.scale.x=c.worldScaleX,h.scale.y=c.worldScaleY,h.rotation=-(s.bone.worldRotation*n.degRad),s.currentSprite.tint=i.rgb2hex([s.r,s.g,s.b])}else{if(u!==n.AttachmentType.skinnedmesh){h.visible=!1;continue}if(!s.currentMeshName||s.currentMeshName!==o.name){var f=o.name;if(void 0!==s.currentMesh&&(s.currentMesh.visible=!1),s.meshes=s.meshes||{},void 0!==s.meshes[f])s.meshes[f].visible=!0;else{var _=this.createMesh(s,o);h.addChild(_)}s.currentMesh=s.meshes[f],s.currentMeshName=f}o.computeWorldVertices(s.bone.skeleton.x,s.bone.skeleton.y,s,s.currentMesh.vertices)}h.visible=!0,h.alpha=s.a}else h.visible=!1}},i.Spine.prototype.autoUpdateTransform=function(){this.lastTime=this.lastTime||Date.now();var e=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(e),i.DisplayObjectContainer.prototype.updateTransform.call(this)},i.Spine.prototype.createSprite=function(e,t){var r=t.rendererObject,a=r.page.rendererObject,s=new i.Rectangle(r.x,r.y,r.rotate?r.height:r.width,r.rotate?r.width:r.height),o=new i.Texture(a,s),h=new i.Sprite(o),u=r.rotate?.5*Math.PI:0;return h.scale.set(r.width/r.originalWidth,r.height/r.originalHeight),h.rotation=u-t.rotation*n.degRad,h.anchor.x=h.anchor.y=.5,e.sprites=e.sprites||{},e.sprites[r.name]=h,h},i.Spine.prototype.createMesh=function(e,t){var r=t.rendererObject,n=r.page.rendererObject,a=new i.Texture(n),s=new i.Strip(a);return s.drawMode=i.Strip.DrawModes.TRIANGLES,s.canvasPadding=1.5,s.vertices=new i.Float32Array(t.uvs.length),s.uvs=t.uvs,s.indices=t.triangles,e.meshes=e.meshes||{},e.meshes[t.name]=s,s},i.BaseTextureCache={},i.BaseTextureCacheIdGenerator=0,i.BaseTexture=function(e,t){if(this.resolution=1,this.width=100,this.height=100,this.scaleMode=t||i.scaleModes.DEFAULT,this.hasLoaded=!1,this.source=e,this._UID=i._UID++,this.premultipliedAlpha=!0,this._glTextures=[],this.mipmap=!1,this._dirty=[!0,!0,!0,!0],e){if((this.source.complete||this.source.getContext)&&this.source.width&&this.source.height)this.hasLoaded=!0,this.width=this.source.naturalWidth||this.source.width,this.height=this.source.naturalHeight||this.source.height,this.dirty();else{var r=this;this.source.onload=function(){r.hasLoaded=!0,r.width=r.source.naturalWidth||r.source.width,r.height=r.source.naturalHeight||r.source.height,r.dirty(),r.dispatchEvent({type:"loaded",content:r})},this.source.onerror=function(){r.dispatchEvent({type:"error",content:r})}}this.imageUrl=null,this._powerOf2=!1}},i.BaseTexture.prototype.constructor=i.BaseTexture,i.EventTarget.mixin(i.BaseTexture.prototype),i.BaseTexture.prototype.destroy=function(){this.imageUrl?(delete i.BaseTextureCache[this.imageUrl],delete i.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete i.BaseTextureCache[this.source._pixiId],this.source=null,this.unloadFromGPU()},i.BaseTexture.prototype.updateSourceImage=function(e){this.hasLoaded=!1,this.source.src=null,this.source.src=e},i.BaseTexture.prototype.dirty=function(){for(var e=0;e<this._glTextures.length;e++)this._dirty[e]=!0},i.BaseTexture.prototype.unloadFromGPU=function(){this.dirty();for(var e=this._glTextures.length-1;e>=0;e--){var t=this._glTextures[e],r=i.glContexts[e];r&&t&&r.deleteTexture(t)}this._glTextures.length=0,this.dirty()},i.BaseTexture.fromImage=function(e,t,r){var n=i.BaseTextureCache[e];if(void 0===t&&-1===e.indexOf("data:")&&(t=!0),!n){var a=new Image;t&&(a.crossOrigin=""),a.src=e,n=new i.BaseTexture(a,r),n.imageUrl=e,i.BaseTextureCache[e]=n,-1!==e.indexOf(i.RETINA_PREFIX+".")&&(n.resolution=2)}return n},i.BaseTexture.fromCanvas=function(e,t){e._pixiId||(e._pixiId="canvas_"+i.TextureCacheIdGenerator++);var r=i.BaseTextureCache[e._pixiId];return r||(r=new i.BaseTexture(e,t),i.BaseTextureCache[e._pixiId]=r),r},i.TextureCache={},i.FrameCache={},i.TextureCacheIdGenerator=0,i.Texture=function(e,t,r,n){this.noFrame=!1,t||(this.noFrame=!0,t=new i.Rectangle(0,0,1,1)),e instanceof i.Texture&&(e=e.baseTexture),this.baseTexture=e,this.frame=t,this.trim=n,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.width=0,this.height=0,this.crop=r||new i.Rectangle(0,0,1,1),e.hasLoaded?(this.noFrame&&(t=new i.Rectangle(0,0,e.width,e.height)),this.setFrame(t)):e.addEventListener("loaded",this.onBaseTextureLoaded.bind(this))},i.Texture.prototype.constructor=i.Texture,i.EventTarget.mixin(i.Texture.prototype),i.Texture.prototype.onBaseTextureLoaded=function(){var e=this.baseTexture;e.removeEventListener("loaded",this.onLoaded),this.noFrame&&(this.frame=new i.Rectangle(0,0,e.width,e.height)),this.setFrame(this.frame),this.dispatchEvent({type:"update",content:this})},i.Texture.prototype.destroy=function(e){e&&this.baseTexture.destroy(),this.valid=!1},i.Texture.prototype.setFrame=function(e){if(this.noFrame=!1,this.frame=e,this.width=e.width,this.height=e.height,this.crop.x=e.x,this.crop.y=e.y,this.crop.width=e.width,this.crop.height=e.height,!this.trim&&(e.x+e.width>this.baseTexture.width||e.y+e.height>this.baseTexture.height))throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=e&&e.width&&e.height&&this.baseTexture.source&&this.baseTexture.hasLoaded,this.trim&&(this.width=this.trim.width,this.height=this.trim.height,this.frame.width=this.trim.width,this.frame.height=this.trim.height),this.valid&&this._updateUvs()},i.Texture.prototype._updateUvs=function(){this._uvs||(this._uvs=new i.TextureUvs);var e=this.crop,t=this.baseTexture.width,r=this.baseTexture.height;this._uvs.x0=e.x/t,this._uvs.y0=e.y/r,this._uvs.x1=(e.x+e.width)/t,this._uvs.y1=e.y/r,this._uvs.x2=(e.x+e.width)/t,this._uvs.y2=(e.y+e.height)/r,this._uvs.x3=e.x/t,this._uvs.y3=(e.y+e.height)/r},i.Texture.fromImage=function(e,t,r){var n=i.TextureCache[e];return n||(n=new i.Texture(i.BaseTexture.fromImage(e,t,r)),i.TextureCache[e]=n),n},i.Texture.fromFrame=function(e){var t=i.TextureCache[e];if(!t)throw new Error('The frameId "'+e+'" does not exist in the texture cache ');return t},i.Texture.fromCanvas=function(e,t){var r=i.BaseTexture.fromCanvas(e,t);return new i.Texture(r)},i.Texture.addTextureToCache=function(e,t){i.TextureCache[t]=e},i.Texture.removeTextureFromCache=function(e){var t=i.TextureCache[e];return delete i.TextureCache[e],delete i.BaseTextureCache[e],t},i.TextureUvs=function(){this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0},i.Texture.emptyTexture=new i.Texture(new i.BaseTexture),i.RenderTexture=function(e,t,r,n,a){if(this.width=e||100,this.height=t||100,this.resolution=a||1,this.frame=new i.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=new i.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.baseTexture=new i.BaseTexture,this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution,this.baseTexture._glTextures=[],this.baseTexture.resolution=this.resolution,this.baseTexture.scaleMode=n||i.scaleModes.DEFAULT,this.baseTexture.hasLoaded=!0,i.Texture.call(this,this.baseTexture,new i.Rectangle(0,0,this.width,this.height)),this.renderer=r||i.defaultRenderer,this.renderer.type===i.WEBGL_RENDERER){var s=this.renderer.gl;this.baseTexture._dirty[s.id]=!1,this.textureBuffer=new i.FilterTexture(s,this.width*this.resolution,this.height*this.resolution,this.baseTexture.scaleMode),this.baseTexture._glTextures[s.id]=this.textureBuffer.texture,this.render=this.renderWebGL,this.projection=new i.Point(.5*this.width,.5*-this.height)}else this.render=this.renderCanvas,this.textureBuffer=new i.CanvasBuffer(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this._updateUvs()},i.RenderTexture.prototype=Object.create(i.Texture.prototype),i.RenderTexture.prototype.constructor=i.RenderTexture,i.RenderTexture.prototype.resize=function(e,t,r){(e!==this.width||t!==this.height)&&(this.valid=e>0&&t>0,this.width=this.frame.width=this.crop.width=e,this.height=this.frame.height=this.crop.height=t,r&&(this.baseTexture.width=this.width,this.baseTexture.height=this.height),this.renderer.type===i.WEBGL_RENDERER&&(this.projection.x=this.width/2,this.projection.y=-this.height/2),this.valid&&this.textureBuffer.resize(this.width*this.resolution,this.height*this.resolution))},i.RenderTexture.prototype.clear=function(){this.valid&&(this.renderer.type===i.WEBGL_RENDERER&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},i.RenderTexture.prototype.renderWebGL=function(e,t,r){if(this.valid){var i=e.worldTransform;i.identity(),i.translate(0,2*this.projection.y),t&&i.append(t),i.scale(1,-1),e.worldAlpha=1;for(var n=e.children,a=0,s=n.length;s>a;a++)n[a].updateTransform();var o=this.renderer.gl;o.viewport(0,0,this.width*this.resolution,this.height*this.resolution),o.bindFramebuffer(o.FRAMEBUFFER,this.textureBuffer.frameBuffer),r&&this.textureBuffer.clear(),this.renderer.spriteBatch.dirty=!0,this.renderer.renderDisplayObject(e,this.projection,this.textureBuffer.frameBuffer),this.renderer.spriteBatch.dirty=!0}},i.RenderTexture.prototype.renderCanvas=function(e,t,r){if(this.valid){var i=e.worldTransform;i.identity(),t&&i.append(t),e.worldAlpha=1;for(var n=e.children,a=0,s=n.length;s>a;a++)n[a].updateTransform();r&&this.textureBuffer.clear();var o=this.textureBuffer.context,h=this.renderer.resolution;this.renderer.resolution=this.resolution,this.renderer.renderDisplayObject(e,o),this.renderer.resolution=h}},i.RenderTexture.prototype.getImage=function(){var e=new Image;
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
    12
return e.src=this.getBase64(),e},i.RenderTexture.prototype.getBase64=function(){return this.getCanvas().toDataURL()},i.RenderTexture.prototype.getCanvas=function(){if(this.renderer.type===i.WEBGL_RENDERER){var e=this.renderer.gl,t=this.textureBuffer.width,r=this.textureBuffer.height,n=new Uint8Array(4*t*r);e.bindFramebuffer(e.FRAMEBUFFER,this.textureBuffer.frameBuffer),e.readPixels(0,0,t,r,e.RGBA,e.UNSIGNED_BYTE,n),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new i.CanvasBuffer(t,r),s=a.context.getImageData(0,0,t,r);return s.data.set(n),a.context.putImageData(s,0,0),a.canvas}return this.textureBuffer.canvas},i.RenderTexture.tempMatrix=new i.Matrix,i.VideoTexture=function(e,t){if(!e)throw new Error("No video source element specified.");(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),i.BaseTexture.call(this,e,t),this.autoUpdate=!1,this.updateBound=this._onUpdate.bind(this),e.complete||(this._onCanPlay=this.onCanPlay.bind(this),e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("play",this.onPlayStart.bind(this)),e.addEventListener("pause",this.onPlayStop.bind(this)))},i.VideoTexture.prototype=Object.create(i.BaseTexture.prototype),i.VideoTexture.constructor=i.VideoTexture,i.VideoTexture.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this.updateBound),this.dirty())},i.VideoTexture.prototype.onPlayStart=function(){this.autoUpdate||(window.requestAnimationFrame(this.updateBound),this.autoUpdate=!0)},i.VideoTexture.prototype.onPlayStop=function(){this.autoUpdate=!1},i.VideoTexture.prototype.onCanPlay=function(){"canplaythrough"===event.type&&(this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.dispatchEvent({type:"loaded",content:this}))))},i.VideoTexture.prototype.destroy=function(){this.source&&this.source._pixiId&&(i.BaseTextureCache[this.source._pixiId]=null,delete i.BaseTextureCache[this.source._pixiId],this.source._pixiId=null,delete this.source._pixiId),i.BaseTexture.prototype.destroy.call(this)},i.VideoTexture.baseTextureFromVideo=function(e,t){e._pixiId||(e._pixiId="video_"+i.TextureCacheIdGenerator++);var r=i.BaseTextureCache[e._pixiId];return r||(r=new i.VideoTexture(e,t),i.BaseTextureCache[e._pixiId]=r),r},i.VideoTexture.textureFromVideo=function(e,t){var r=i.VideoTexture.baseTextureFromVideo(e,t);return new i.Texture(r)},i.VideoTexture.fromUrl=function(e,t){var r=document.createElement("video");return r.src=e,r.autoPlay=!0,r.play(),i.VideoTexture.textureFromVideo(r,t)},i.AssetLoader=function(e,t){this.assetURLs=e,this.crossorigin=t,this.loadersByType={jpg:i.ImageLoader,jpeg:i.ImageLoader,png:i.ImageLoader,gif:i.ImageLoader,webp:i.ImageLoader,json:i.JsonLoader,atlas:i.AtlasLoader,anim:i.SpineLoader,xml:i.BitmapFontLoader,fnt:i.BitmapFontLoader}},i.EventTarget.mixin(i.AssetLoader.prototype),i.AssetLoader.prototype.constructor=i.AssetLoader,i.AssetLoader.prototype._getDataType=function(e){var t="data:",r=e.slice(0,t.length).toLowerCase();if(r===t){var i=e.slice(t.length),n=i.indexOf(",");if(-1===n)return null;var a=i.slice(0,n).split(";")[0];return a&&"text/plain"!==a.toLowerCase()?a.split("/").pop().toLowerCase():"txt"}return null},i.AssetLoader.prototype.load=function(){function e(e){t.onAssetLoaded(e.data.content)}var t=this;this.loadCount=this.assetURLs.length;for(var r=0;r<this.assetURLs.length;r++){var i=this.assetURLs[r],n=this._getDataType(i);n||(n=i.split("?").shift().split(".").pop().toLowerCase());var a=this.loadersByType[n];if(!a)throw new Error(n+" is an unsupported file type");var s=new a(i,this.crossorigin);s.on("loaded",e),s.load()}},i.AssetLoader.prototype.onAssetLoaded=function(e){this.loadCount--,this.emit("onProgress",{content:this,loader:e}),this.onProgress&&this.onProgress(e),this.loadCount||(this.emit("onComplete",{content:this}),this.onComplete&&this.onComplete())},i.JsonLoader=function(e,t){this.url=e,this.crossorigin=t,this.baseUrl=e.replace(/[^\/]*$/,""),this.loaded=!1},i.JsonLoader.prototype.constructor=i.JsonLoader,i.EventTarget.mixin(i.JsonLoader.prototype),i.JsonLoader.prototype.load=function(){window.XDomainRequest&&this.crossorigin?(this.ajaxRequest=new window.XDomainRequest,this.ajaxRequest.timeout=3e3,this.ajaxRequest.onerror=this.onError.bind(this),this.ajaxRequest.ontimeout=this.onError.bind(this),this.ajaxRequest.onprogress=function(){},this.ajaxRequest.onload=this.onJSONLoaded.bind(this)):(this.ajaxRequest=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP"),this.ajaxRequest.onreadystatechange=this.onReadyStateChanged.bind(this)),this.ajaxRequest.open("GET",this.url,!0),this.ajaxRequest.send()},i.JsonLoader.prototype.onReadyStateChanged=function(){4!==this.ajaxRequest.readyState||200!==this.ajaxRequest.status&&-1!==window.location.href.indexOf("http")||this.onJSONLoaded()},i.JsonLoader.prototype.onJSONLoaded=function(){if(!this.ajaxRequest.responseText)return void this.onError();if(this.json=JSON.parse(this.ajaxRequest.responseText),this.json.frames&&this.json.meta&&this.json.meta.image){var e=this.baseUrl+this.json.meta.image,t=new i.ImageLoader(e,this.crossorigin),r=this.json.frames;this.texture=t.texture.baseTexture,t.addEventListener("loaded",this.onLoaded.bind(this));for(var a in r){var s=r[a].frame;if(s){var o=new i.Rectangle(s.x,s.y,s.w,s.h),h=o.clone(),u=null;if(r[a].trimmed){var l=r[a].sourceSize,d=r[a].spriteSourceSize;u=new i.Rectangle(d.x,d.y,l.w,l.h)}i.TextureCache[a]=new i.Texture(this.texture,o,h,u)}}t.load()}else if(this.json.bones)if(i.AnimCache[this.url])this.onLoaded();else{var c=this.url.substr(0,this.url.lastIndexOf("."))+".atlas",f=new i.JsonLoader(c,this.crossorigin),_=this;f.onJSONLoaded=function(){if(!this.ajaxRequest.responseText)return void this.onError();var e=new i.SpineTextureLoader(this.url.substring(0,this.url.lastIndexOf("/"))),t=new n.Atlas(this.ajaxRequest.responseText,e),r=new n.AtlasAttachmentLoader(t),a=new n.SkeletonJson(r),s=a.readSkeletonData(_.json);i.AnimCache[_.url]=s,_.spine=s,_.spineAtlas=t,_.spineAtlasLoader=f,e.loadingCount>0?e.addEventListener("loadedBaseTexture",function(e){e.content.content.loadingCount<=0&&_.onLoaded()}):_.onLoaded()},f.load()}else this.onLoaded()},i.JsonLoader.prototype.onLoaded=function(){this.loaded=!0,this.dispatchEvent({type:"loaded",content:this})},i.JsonLoader.prototype.onError=function(){this.dispatchEvent({type:"error",content:this})},i.AtlasLoader=function(e,t){this.url=e,this.baseUrl=e.replace(/[^\/]*$/,""),this.crossorigin=t,this.loaded=!1},i.AtlasLoader.constructor=i.AtlasLoader,i.EventTarget.mixin(i.AtlasLoader.prototype),i.AtlasLoader.prototype.load=function(){this.ajaxRequest=new i.AjaxRequest,this.ajaxRequest.onreadystatechange=this.onAtlasLoaded.bind(this),this.ajaxRequest.open("GET",this.url,!0),this.ajaxRequest.overrideMimeType&&this.ajaxRequest.overrideMimeType("application/json"),this.ajaxRequest.send(null)},i.AtlasLoader.prototype.onAtlasLoaded=function(){if(4===this.ajaxRequest.readyState)if(200===this.ajaxRequest.status||-1===window.location.href.indexOf("http")){this.atlas={meta:{image:[]},frames:[]};var e=this.ajaxRequest.responseText.split(/\r?\n/),t=-3,r=0,n=null,a=!1,s=0,o=0,h=this.onLoaded.bind(this);for(s=0;s<e.length;s++)if(e[s]=e[s].replace(/^\s+|\s+$/g,""),""===e[s]&&(a=s+1),e[s].length>0){if(a===s)this.atlas.meta.image.push(e[s]),r=this.atlas.meta.image.length-1,this.atlas.frames.push({}),t=-3;else if(t>0)if(t%7===1)null!=n&&(this.atlas.frames[r][n.name]=n),n={name:e[s],frame:{}};else{var u=e[s].split(" ");if(t%7===3)n.frame.x=Number(u[1].replace(",","")),n.frame.y=Number(u[2]);else if(t%7===4)n.frame.w=Number(u[1].replace(",","")),n.frame.h=Number(u[2]);else if(t%7===5){var l={x:0,y:0,w:Number(u[1].replace(",","")),h:Number(u[2])};l.w>n.frame.w||l.h>n.frame.h?(n.trimmed=!0,n.realSize=l):n.trimmed=!1}}t++}if(null!=n&&(this.atlas.frames[r][n.name]=n),this.atlas.meta.image.length>0){for(this.images=[],o=0;o<this.atlas.meta.image.length;o++){var d=this.baseUrl+this.atlas.meta.image[o],c=this.atlas.frames[o];this.images.push(new i.ImageLoader(d,this.crossorigin));for(s in c){var f=c[s].frame;f&&(i.TextureCache[s]=new i.Texture(this.images[o].texture.baseTexture,{x:f.x,y:f.y,width:f.w,height:f.h}),c[s].trimmed&&(i.TextureCache[s].realSize=c[s].realSize,i.TextureCache[s].trim.x=0,i.TextureCache[s].trim.y=0))}}for(this.currentImageId=0,o=0;o<this.images.length;o++)this.images[o].on("loaded",h);this.images[this.currentImageId].load()}else this.onLoaded()}else this.onError()},i.AtlasLoader.prototype.onLoaded=function(){this.images.length-1>this.currentImageId?(this.currentImageId++,this.images[this.currentImageId].load()):(this.loaded=!0,this.emit("loaded",{content:this}))},i.AtlasLoader.prototype.onError=function(){this.emit("error",{content:this})},i.SpriteSheetLoader=function(e,t){this.url=e,this.crossorigin=t,this.baseUrl=e.replace(/[^\/]*$/,""),this.texture=null,this.frames={}},i.SpriteSheetLoader.prototype.constructor=i.SpriteSheetLoader,i.EventTarget.mixin(i.SpriteSheetLoader.prototype),i.SpriteSheetLoader.prototype.load=function(){var e=this,t=new i.JsonLoader(this.url,this.crossorigin);t.on("loaded",function(t){e.json=t.data.content.json,e.onLoaded()}),t.load()},i.SpriteSheetLoader.prototype.onLoaded=function(){this.emit("loaded",{content:this})},i.ImageLoader=function(e,t){this.texture=i.Texture.fromImage(e,t),this.frames=[]},i.ImageLoader.prototype.constructor=i.ImageLoader,i.EventTarget.mixin(i.ImageLoader.prototype),i.ImageLoader.prototype.load=function(){this.texture.baseTexture.hasLoaded?this.onLoaded():this.texture.baseTexture.on("loaded",this.onLoaded.bind(this))},i.ImageLoader.prototype.onLoaded=function(){this.emit("loaded",{content:this})},i.ImageLoader.prototype.loadFramedSpriteSheet=function(e,t,r){this.frames=[];for(var n=Math.floor(this.texture.width/e),a=Math.floor(this.texture.height/t),s=0,o=0;a>o;o++)for(var h=0;n>h;h++,s++){var u=new i.Texture(this.texture.baseTexture,{x:h*e,y:o*t,width:e,height:t});this.frames.push(u),r&&(i.TextureCache[r+"-"+s]=u)}this.load()},i.BitmapFontLoader=function(e,t){this.url=e,this.crossorigin=t,this.baseUrl=e.replace(/[^\/]*$/,""),this.texture=null},i.BitmapFontLoader.prototype.constructor=i.BitmapFontLoader,i.EventTarget.mixin(i.BitmapFontLoader.prototype),i.BitmapFontLoader.prototype.load=function(){this.ajaxRequest=new i.AjaxRequest,this.ajaxRequest.onreadystatechange=this.onXMLLoaded.bind(this),this.ajaxRequest.open("GET",this.url,!0),this.ajaxRequest.overrideMimeType&&this.ajaxRequest.overrideMimeType("application/xml"),this.ajaxRequest.send(null)},i.BitmapFontLoader.prototype.onXMLLoaded=function(){if(4===this.ajaxRequest.readyState&&(200===this.ajaxRequest.status||-1===window.location.protocol.indexOf("http"))){var e=this.ajaxRequest.responseXML;if(!e||/MSIE 9/i.test(navigator.userAgent)||navigator.isCocoonJS)if("function"==typeof window.DOMParser){var t=new DOMParser;e=t.parseFromString(this.ajaxRequest.responseText,"text/xml")}else{var r=document.createElement("div");r.innerHTML=this.ajaxRequest.responseText,e=r}var n=this.baseUrl+e.getElementsByTagName("page")[0].getAttribute("file"),a=new i.ImageLoader(n,this.crossorigin);this.texture=a.texture.baseTexture;var s={},o=e.getElementsByTagName("info")[0],h=e.getElementsByTagName("common")[0];s.font=o.getAttribute("face"),s.size=parseInt(o.getAttribute("size"),10),s.lineHeight=parseInt(h.getAttribute("lineHeight"),10),s.chars={};for(var u=e.getElementsByTagName("char"),l=0;l<u.length;l++){var d=parseInt(u[l].getAttribute("id"),10),c=new i.Rectangle(parseInt(u[l].getAttribute("x"),10),parseInt(u[l].getAttribute("y"),10),parseInt(u[l].getAttribute("width"),10),parseInt(u[l].getAttribute("height"),10));s.chars[d]={xOffset:parseInt(u[l].getAttribute("xoffset"),10),yOffset:parseInt(u[l].getAttribute("yoffset"),10),xAdvance:parseInt(u[l].getAttribute("xadvance"),10),kerning:{},texture:i.TextureCache[d]=new i.Texture(this.texture,c)}}var f=e.getElementsByTagName("kerning");for(l=0;l<f.length;l++){var _=parseInt(f[l].getAttribute("first"),10),p=parseInt(f[l].getAttribute("second"),10),m=parseInt(f[l].getAttribute("amount"),10);s.chars[p].kerning[_]=m}i.BitmapText.fonts[s.font]=s,a.addEventListener("loaded",this.onLoaded.bind(this)),a.load()}},i.BitmapFontLoader.prototype.onLoaded=function(){this.emit("loaded",{content:this})},i.SpineLoader=function(e,t){this.url=e,this.crossorigin=t,this.loaded=!1},i.SpineLoader.prototype.constructor=i.SpineLoader,i.EventTarget.mixin(i.SpineLoader.prototype),i.SpineLoader.prototype.load=function(){var e=this,t=new i.JsonLoader(this.url,this.crossorigin);t.on("loaded",function(t){e.json=t.data.content.json,e.onLoaded()}),t.load()},i.SpineLoader.prototype.onLoaded=function(){this.loaded=!0,this.emit("loaded",{content:this})},i.AbstractFilter=function(e,t){this.passes=[this],this.shaders=[],this.dirty=!0,this.padding=0,this.uniforms=t||{},this.fragmentSrc=e||[]},i.AbstractFilter.prototype.constructor=i.AbstractFilter,i.AbstractFilter.prototype.syncUniforms=function(){for(var e=0,t=this.shaders.length;t>e;e++)this.shaders[e].dirty=!0},i.AlphaMaskFilter=function(e){i.AbstractFilter.call(this),this.passes=[this],e.baseTexture._powerOf2=!0,this.uniforms={mask:{type:"sampler2D",value:e},mapDimensions:{type:"2f",value:{x:1,y:5112}},dimensions:{type:"4fv",value:[0,0,0,0]}},e.baseTexture.hasLoaded?(this.uniforms.mask.value.x=e.width,this.uniforms.mask.value.y=e.height):(this.boundLoadedFunction=this.onTextureLoaded.bind(this),e.baseTexture.on("loaded",this.boundLoadedFunction)),this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D mask;","uniform sampler2D uSampler;","uniform vec2 offset;","uniform vec4 dimensions;","uniform vec2 mapDimensions;","void main(void) {","   vec2 mapCords = vTextureCoord.xy;","   mapCords += (dimensions.zw + offset)/ dimensions.xy ;","   mapCords.y *= -1.0;","   mapCords.y += 1.0;","   mapCords *= dimensions.xy / mapDimensions;","   vec4 original =  texture2D(uSampler, vTextureCoord);","   float maskAlpha =  texture2D(mask, mapCords).r;","   original *= maskAlpha;","   gl_FragColor =  original;","}"]},i.AlphaMaskFilter.prototype=Object.create(i.AbstractFilter.prototype),i.AlphaMaskFilter.prototype.constructor=i.AlphaMaskFilter,i.AlphaMaskFilter.prototype.onTextureLoaded=function(){this.uniforms.mapDimensions.value.x=this.uniforms.mask.value.width,this.uniforms.mapDimensions.value.y=this.uniforms.mask.value.height,this.uniforms.mask.value.baseTexture.off("loaded",this.boundLoadedFunction)},Object.defineProperty(i.AlphaMaskFilter.prototype,"map",{get:function(){return this.uniforms.mask.value},set:function(e){this.uniforms.mask.value=e}}),i.ColorMatrixFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={matrix:{type:"mat4",value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform float invert;","uniform mat4 matrix;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord) * matrix;","}"]},i.ColorMatrixFilter.prototype=Object.create(i.AbstractFilter.prototype),i.ColorMatrixFilter.prototype.constructor=i.ColorMatrixFilter,Object.defineProperty(i.ColorMatrixFilter.prototype,"matrix",{get:function(){return this.uniforms.matrix.value},set:function(e){this.uniforms.matrix.value=e}}),i.GrayFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={gray:{type:"1f",value:1}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","uniform float gray;","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord);","   gl_FragColor.rgb = mix(gl_FragColor.rgb, vec3(0.2126*gl_FragColor.r + 0.7152*gl_FragColor.g + 0.0722*gl_FragColor.b), gray);","}"]},i.GrayFilter.prototype=Object.create(i.AbstractFilter.prototype),i.GrayFilter.prototype.constructor=i.GrayFilter,Object.defineProperty(i.GrayFilter.prototype,"gray",{get:function(){return this.uniforms.gray.value},set:function(e){this.uniforms.gray.value=e}}),i.DisplacementFilter=function(e){i.AbstractFilter.call(this),this.passes=[this],e.baseTexture._powerOf2=!0,this.uniforms={displacementMap:{type:"sampler2D",value:e},scale:{type:"2f",value:{x:30,y:30}},offset:{type:"2f",value:{x:0,y:0}},mapDimensions:{type:"2f",value:{x:1,y:5112}},dimensions:{type:"4fv",value:[0,0,0,0]}},e.baseTexture.hasLoaded?(this.uniforms.mapDimensions.value.x=e.width,this.uniforms.mapDimensions.value.y=e.height):(this.boundLoadedFunction=this.onTextureLoaded.bind(this),e.baseTexture.on("loaded",this.boundLoadedFunction)),this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D displacementMap;","uniform sampler2D uSampler;","uniform vec2 scale;","uniform vec2 offset;","uniform vec4 dimensions;","uniform vec2 mapDimensions;","void main(void) {","   vec2 mapCords = vTextureCoord.xy;","   mapCords += (dimensions.zw + offset)/ dimensions.xy ;","   mapCords.y *= -1.0;","   mapCords.y += 1.0;","   vec2 matSample = texture2D(displacementMap, mapCords).xy;","   matSample -= 0.5;","   matSample *= scale;","   matSample /= mapDimensions;","   gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x + matSample.x, vTextureCoord.y + matSample.y));","   gl_FragColor.rgb = mix( gl_FragColor.rgb, gl_FragColor.rgb, 1.0);","   vec2 cord = vTextureCoord;","}"]},i.DisplacementFilter.prototype=Object.create(i.AbstractFilter.prototype),i.DisplacementFilter.prototype.constructor=i.DisplacementFilter,i.DisplacementFilter.prototype.onTextureLoaded=function(){this.uniforms.mapDimensions.value.x=this.uniforms.displacementMap.value.width,this.uniforms.mapDimensions.value.y=this.uniforms.displacementMap.value.height,this.uniforms.displacementMap.value.baseTexture.off("loaded",this.boundLoadedFunction)},Object.defineProperty(i.DisplacementFilter.prototype,"map",{get:function(){return this.uniforms.displacementMap.value},set:function(e){this.uniforms.displacementMap.value=e}}),Object.defineProperty(i.DisplacementFilter.prototype,"scale",{get:function(){return this.uniforms.scale.value},set:function(e){this.uniforms.scale.value=e}}),Object.defineProperty(i.DisplacementFilter.prototype,"offset",{get:function(){return this.uniforms.offset.value},set:function(e){this.uniforms.offset.value=e}}),i.PixelateFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={invert:{type:"1f",value:0},dimensions:{type:"4fv",value:new i.Float32Array([1e4,100,10,10])},pixelSize:{type:"2f",value:{x:10,y:10}}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform vec2 testDim;","uniform vec4 dimensions;","uniform vec2 pixelSize;","uniform sampler2D uSampler;","void main(void) {","   vec2 coord = vTextureCoord;","   vec2 size = dimensions.xy/pixelSize;","   vec2 color = floor( ( vTextureCoord * size ) ) / size + pixelSize/dimensions.xy * 0.5;","   gl_FragColor = texture2D(uSampler, color);","}"]},i.PixelateFilter.prototype=Object.create(i.AbstractFilter.prototype),i.PixelateFilter.prototype.constructor=i.PixelateFilter,Object.defineProperty(i.PixelateFilter.prototype,"size",{get:function(){return this.uniforms.pixelSize.value},set:function(e){this.dirty=!0,this.uniforms.pixelSize.value=e}}),i.BlurXFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={blur:{type:"1f",value:1/512}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform float blur;","uniform sampler2D uSampler;","void main(void) {","   vec4 sum = vec4(0.0);","   sum += texture2D(uSampler, vec2(vTextureCoord.x - 4.0*blur, vTextureCoord.y)) * 0.05;","   sum += texture2D(uSampler, vec2(vTextureCoord.x - 3.0*blur, vTextureCoord.y)) * 0.09;","   sum += texture2D(uSampler, vec2(vTextureCoord.x - 2.0*blur, vTextureCoord.y)) * 0.12;","   sum += texture2D(uSampler, vec2(vTextureCoord.x - blur, vTextureCoord.y)) * 0.15;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * 0.16;","   sum += texture2D(uSampler, vec2(vTextureCoord.x + blur, vTextureCoord.y)) * 0.15;","   sum += texture2D(uSampler, vec2(vTextureCoord.x + 2.0*blur, vTextureCoord.y)) * 0.12;","   sum += texture2D(uSampler, vec2(vTextureCoord.x + 3.0*blur, vTextureCoord.y)) * 0.09;","   sum += texture2D(uSampler, vec2(vTextureCoord.x + 4.0*blur, vTextureCoord.y)) * 0.05;","   gl_FragColor = sum;","}"]},i.BlurXFilter.prototype=Object.create(i.AbstractFilter.prototype),i.BlurXFilter.prototype.constructor=i.BlurXFilter,Object.defineProperty(i.BlurXFilter.prototype,"blur",{get:function(){return this.uniforms.blur.value/(1/7e3)},set:function(e){this.dirty=!0,this.uniforms.blur.value=1/7e3*e}}),i.BlurYFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={blur:{type:"1f",value:1/512}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform float blur;","uniform sampler2D uSampler;","void main(void) {","   vec4 sum = vec4(0.0);","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - 4.0*blur)) * 0.05;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - 3.0*blur)) * 0.09;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - 2.0*blur)) * 0.12;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - blur)) * 0.15;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y)) * 0.16;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + blur)) * 0.15;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 2.0*blur)) * 0.12;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 3.0*blur)) * 0.09;","   sum += texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + 4.0*blur)) * 0.05;","   gl_FragColor = sum;","}"]},i.BlurYFilter.prototype=Object.create(i.AbstractFilter.prototype),i.BlurYFilter.prototype.constructor=i.BlurYFilter,Object.defineProperty(i.BlurYFilter.prototype,"blur",{get:function(){return this.uniforms.blur.value/(1/7e3)},set:function(e){this.uniforms.blur.value=1/7e3*e}}),i.BlurFilter=function(){this.blurXFilter=new i.BlurXFilter,this.blurYFilter=new i.BlurYFilter,this.passes=[this.blurXFilter,this.blurYFilter]},i.BlurFilter.prototype=Object.create(i.AbstractFilter.prototype),i.BlurFilter.prototype.constructor=i.BlurFilter,Object.defineProperty(i.BlurFilter.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=this.blurYFilter.blur=e}}),Object.defineProperty(i.BlurFilter.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(e){this.blurXFilter.blur=e}}),Object.defineProperty(i.BlurFilter.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(e){this.blurYFilter.blur=e}}),i.InvertFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={invert:{type:"1f",value:1}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform float invert;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord);","   gl_FragColor.rgb = mix( (vec3(1)-gl_FragColor.rgb) * gl_FragColor.a, gl_FragColor.rgb, 1.0 - invert);","}"]},i.InvertFilter.prototype=Object.create(i.AbstractFilter.prototype),i.InvertFilter.prototype.constructor=i.InvertFilter,Object.defineProperty(i.InvertFilter.prototype,"invert",{get:function(){return this.uniforms.invert.value},set:function(e){this.uniforms.invert.value=e}}),i.SepiaFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={sepia:{type:"1f",value:1}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform float sepia;","uniform sampler2D uSampler;","const mat3 sepiaMatrix = mat3(0.3588, 0.7044, 0.1368, 0.2990, 0.5870, 0.1140, 0.2392, 0.4696, 0.0912);","void main(void) {","   gl_FragColor = texture2D(uSampler, vTextureCoord);","   gl_FragColor.rgb = mix( gl_FragColor.rgb, gl_FragColor.rgb * sepiaMatrix, sepia);","}"]},i.SepiaFilter.prototype=Object.create(i.AbstractFilter.prototype),i.SepiaFilter.prototype.constructor=i.SepiaFilter,Object.defineProperty(i.SepiaFilter.prototype,"sepia",{get:function(){return this.uniforms.sepia.value},set:function(e){this.uniforms.sepia.value=e}}),i.TwistFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={radius:{type:"1f",value:.5},angle:{type:"1f",value:5},offset:{type:"2f",value:{x:.5,y:.5}}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform vec4 dimensions;","uniform sampler2D uSampler;","uniform float radius;","uniform float angle;","uniform vec2 offset;","void main(void) {","   vec2 coord = vTextureCoord - offset;","   float distance = length(coord);","   if (distance < radius) {","       float ratio = (radius - distance) / radius;","       float angleMod = ratio * ratio * angle;","       float s = sin(angleMod);","       float c = cos(angleMod);","       coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);","   }","   gl_FragColor = texture2D(uSampler, coord+offset);","}"]},i.TwistFilter.prototype=Object.create(i.AbstractFilter.prototype),i.TwistFilter.prototype.constructor=i.TwistFilter,Object.defineProperty(i.TwistFilter.prototype,"offset",{get:function(){return this.uniforms.offset.value},set:function(e){this.dirty=!0,this.uniforms.offset.value=e}}),Object.defineProperty(i.TwistFilter.prototype,"radius",{get:function(){return this.uniforms.radius.value},set:function(e){this.dirty=!0,this.uniforms.radius.value=e}}),Object.defineProperty(i.TwistFilter.prototype,"angle",{get:function(){return this.uniforms.angle.value},set:function(e){this.dirty=!0,this.uniforms.angle.value=e}}),i.ColorStepFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={step:{type:"1f",value:5}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","uniform float step;","void main(void) {","   vec4 color = texture2D(uSampler, vTextureCoord);","   color = floor(color * step) / step;","   gl_FragColor = color;","}"]},i.ColorStepFilter.prototype=Object.create(i.AbstractFilter.prototype),i.ColorStepFilter.prototype.constructor=i.ColorStepFilter,Object.defineProperty(i.ColorStepFilter.prototype,"step",{get:function(){return this.uniforms.step.value},set:function(e){this.uniforms.step.value=e}}),i.DotScreenFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={scale:{type:"1f",value:1},angle:{type:"1f",value:5},dimensions:{type:"4fv",value:[0,0,0,0]}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform vec4 dimensions;","uniform sampler2D uSampler;","uniform float angle;","uniform float scale;","float pattern() {","   float s = sin(angle), c = cos(angle);","   vec2 tex = vTextureCoord * dimensions.xy;","   vec2 point = vec2(","       c * tex.x - s * tex.y,","       s * tex.x + c * tex.y","   ) * scale;","   return (sin(point.x) * sin(point.y)) * 4.0;","}","void main() {","   vec4 color = texture2D(uSampler, vTextureCoord);","   float average = (color.r + color.g + color.b) / 3.0;","   gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);","}"]},i.DotScreenFilter.prototype=Object.create(i.AbstractFilter.prototype),i.DotScreenFilter.prototype.constructor=i.DotScreenFilter,Object.defineProperty(i.DotScreenFilter.prototype,"scale",{get:function(){return this.uniforms.scale.value},set:function(e){this.dirty=!0,this.uniforms.scale.value=e}}),Object.defineProperty(i.DotScreenFilter.prototype,"angle",{get:function(){return this.uniforms.angle.value},set:function(e){this.dirty=!0,this.uniforms.angle.value=e}}),i.CrossHatchFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={blur:{type:"1f",value:1/512}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform float blur;","uniform sampler2D uSampler;","void main(void) {","    float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);","    gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);","    if (lum < 1.00) {","        if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) {","            gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);","        }","    }","    if (lum < 0.75) {","        if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) {","            gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);","        }","    }","    if (lum < 0.50) {","        if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) {","            gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);","        }","    }","    if (lum < 0.3) {","        if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) {","            gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);","        }","    }","}"]},i.CrossHatchFilter.prototype=Object.create(i.AbstractFilter.prototype),i.CrossHatchFilter.prototype.constructor=i.CrossHatchFilter,Object.defineProperty(i.CrossHatchFilter.prototype,"blur",{get:function(){return this.uniforms.blur.value/(1/7e3)},set:function(e){this.uniforms.blur.value=1/7e3*e}}),i.RGBSplitFilter=function(){i.AbstractFilter.call(this),this.passes=[this],this.uniforms={red:{type:"2f",value:{x:20,y:20}},green:{type:"2f",value:{x:-20,y:20}},blue:{type:"2f",value:{x:20,y:-20}},dimensions:{type:"4fv",value:[0,0,0,0]}},this.fragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform vec2 red;","uniform vec2 green;","uniform vec2 blue;","uniform vec4 dimensions;","uniform sampler2D uSampler;","void main(void) {","   gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/dimensions.xy).r;","   gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/dimensions.xy).g;","   gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/dimensions.xy).b;","   gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;","}"]},i.RGBSplitFilter.prototype=Object.create(i.AbstractFilter.prototype),i.RGBSplitFilter.prototype.constructor=i.RGBSplitFilter,Object.defineProperty(i.RGBSplitFilter.prototype,"red",{get:function(){return this.uniforms.red.value},set:function(e){this.uniforms.red.value=e}}),Object.defineProperty(i.RGBSplitFilter.prototype,"green",{get:function(){return this.uniforms.green.value},set:function(e){this.uniforms.green.value=e}}),Object.defineProperty(i.RGBSplitFilter.prototype,"blue",{get:function(){return this.uniforms.blue.value},set:function(e){this.uniforms.blue.value=e}}),"undefined"!=typeof r?("undefined"!=typeof t&&t.exports&&(r=t.exports=i),r.PIXI=i):"undefined"!=typeof define&&define.amd?define(i):e.PIXI=i}).call(this)},{}],randomColor:[function(e,t,r){!function(e,i){if("function"==typeof define&&define.amd)define([],i);else if("object"==typeof r){var n=i();"object"==typeof t&&t&&t.exports&&(r=t.exports=n),r.randomColor=n}else e.randomColor=i()}(this,function(){function e(e){var t=a(e.hue),r=h(t);return 0>r&&(r=360+r),r}function t(e,t){if("random"===t.luminosity)return h([0,100]);if("monochrome"===t.hue)return 0;var r=s(e),i=r[0],n=r[1];switch(t.luminosity){case"bright":i=55;break;case"dark":i=n-10;break;case"light":n=55}return h([i,n])}function r(e,t,r){var i=n(e,t),a=100;switch(r.luminosity){case"dark":a=i+20;break;case"light":i=(a+i)/2;break;case"random":i=0,a=100}return h([i,a])}function i(e,t){switch(t.format){case"hsvArray":return e;case"hsv":return f("hsv",e);case"rgbArray":return c(e);case"rgb":return f("rgb",c(e));default:return u(e)
0a2b4991d48c publish new version to server
ymh <ymh.work@gmail.com>
parents: 108
diff changeset
    13
}}function n(e,t){for(var r=o(e).lowerBounds,i=0;i<r.length-1;i++){var n=r[i][0],a=r[i][1],s=r[i+1][0],h=r[i+1][1];if(t>=n&&s>=t){var u=(h-a)/(s-n),l=a-u*n;return u*t+l}}return 0}function a(e){if("number"==typeof parseInt(e)){var t=parseInt(e);if(360>t&&t>0)return[t,t]}if("string"==typeof e&&_[e]){var r=_[e];if(r.hueRange)return r.hueRange}return[0,360]}function s(e){return o(e).saturationRange}function o(e){e>=334&&360>=e&&(e-=360);for(var t in _){var r=_[t];if(r.hueRange&&e>=r.hueRange[0]&&e<=r.hueRange[1])return _[t]}return"Color not found"}function h(e){return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]))}function u(e){function t(e){var t=e.toString(16);return 1==t.length?"0"+t:t}var r=c(e),i="#"+t(r[0])+t(r[1])+t(r[2]);return i}function l(e,t,r){var i=r[0][0],n=r[r.length-1][0],a=r[r.length-1][1],s=r[0][1];_[e]={hueRange:t,lowerBounds:r,saturationRange:[i,n],brightnessRange:[a,s]}}function d(){l("monochrome",null,[[0,0],[100,0]]),l("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),l("orange",[19,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),l("yellow",[47,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),l("green",[63,158],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),l("blue",[159,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),l("purple",[258,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),l("pink",[283,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function c(e){var t=e[0];0===t&&(t=1),360===t&&(t=359),t/=360;var r=e[1]/100,i=e[2]/100,n=Math.floor(6*t),a=6*t-n,s=i*(1-r),o=i*(1-a*r),h=i*(1-(1-a)*r),u=256,l=256,d=256;switch(n){case 0:u=i,l=h,d=s;break;case 1:u=o,l=i,d=s;break;case 2:u=s,l=i,d=h;break;case 3:u=s,l=o,d=i;break;case 4:u=h,l=s,d=i;break;case 5:u=i,l=s,d=o}var c=[Math.floor(255*u),Math.floor(255*l),Math.floor(255*d)];return c}function f(e,t){return e+"("+t.join(", ")+")"}var _={};d();var p=function(n){n=n||{};var a,s,o;if(n.count){var h=n.count,u=[];for(n.count=!1;h>u.length;)u.push(p(n));return u}return a=e(n),s=t(a,n),o=r(a,s,n),i([a,s,o],n)};return p})},{}]},{},[]);